This felt like a nested ClassLoader issue from the beginning... I am
not familiar with the Axis2 archive details, but is it possible to
put Cayenne jar at the same level as the application classes?
Alternatively you can try upgrading to 3.0M1 (you can grab an
*unofficial* build from here: http://people.apache.org/~aadamchik/
release/3.0M1/). 3.0 uses String class names as keys and should
hopefully be free from this problem. Please let me know if that
worked - we will definitely need to fix it if it is still broken in 3.0.
> // DataMaps can contain all kinds of garbage...
> // TODO (Andrus, 10/18/2005) it would be nice
> to log something
> // here, but since EntityResolver is used on
> the client, log4J is
> // a no-go...
Good catch. This is also obsolete in 3.0 - we can use commons
logging. Let me clean it up.
Andrus
> // TODO (Andrus, 10/18/2005) it would be nice
> to log something
> // here, but since EntityResolver is used on
> the client, log4J is
> // a no-go...
On Jul 20, 2007, at 9:15 PM, Ajay H. Daptardar wrote:
> Hi Andrus,
>
> The structure of the Axis2 archive (app.aar) is as follows:
>
> META-INF/
> META-INF/MANIFEST.MF
> META-INF/services.xml
> lib/
> lib/bcel.jar
> lib/cayenne.jar
> lib/jibx-bind.jar
> lib/jibx-extras.jar
> lib/jibx-genbinding.jar
> lib/jibx-genschema.jar
> lib/jibx-run.jar
> lib/mysql-connector-java-5.0.6-bin.jar
> lib/qdox-1.6.1.jar
> lib/stax-api.jar
> lib/wstx-asl.jar
> lib/xmlpull_1_1_4.jar
> lib/xpp3.jar
> app/<APPLICATION CLASSES>
>
> Cayenne jar is in the application's lib folder not axis'. After
> stepping through the debugger, I found out that even though the
> application can load the Cayenne data context, the entity resolver,
> when it PUTS object entities in the cache, it uses the name of the
> entity and when it tries to GET the object entity, it tries to use the
> oe.getJavaClass() which throws an exception. This is not logged and
> the comment there is:
>
> // DataMaps can contain all kinds of garbage...
> // TODO (Andrus, 10/18/2005) it would be nice
> to log something
> // here, but since EntityResolver is used on
> the client, log4J is
> // a no-go...
>
> the Util.getJavaClass() fails to load the (application) class it
> seems.
>
> Thanks,
> Best,
> - Ajay
>
>
>
>
>
> On 7/19/07, Andrus Adamchik <andru..bjectstyle.org> wrote:
>> That is strange... I assume Cayenne jars are in "axis2/WEB-INF/lib",
>> and not in some shared location?
>>
>> Andrus
>>
>> On Jul 18, 2007, at 11:53 PM, Ajay H. Daptardar wrote:
>> > Hello all,
>> >
>> > I am trying to use Cayenne within Axis2. I copied the three
>> > configuration XML files into the classes folder for Axis2:
>> >
>> > /opt/apache-tomcat-6.0.13/webapps/axis2/WEB-INF/classes
>> >
>> > I can create the data context object but during runtime, data
>> > context's entity resolver cannot find the mapped class and I get
>> the
>> > following:
>> >
>> > "Class is not mapped with Cayenne"
>> >
>> > However when I run the same application as standalone, I have no
>> > errors.
>> >
>> > Any help much appreciated.
>> >
>> > Best,
>> > - Ajay
>> >
>>
>>
>
>
> --
> The mind is everything; what you think, you become. -- Buddha
>
This archive was generated by hypermail 2.0.0 : Fri Jul 20 2007 - 14:40:16 EDT