This one time, at band camp, tek1 said:
t>can someone please explain how classes are loaded by castor?
t>
t>when running castor locally (i.e. on some junit tests), i had no problem
t>using castor.
t>
t>however, i packaged up my persistence-related classes and castor-specific
t>configuration files (database.xml and mapping.xml) into a persistence.jar,
t>then into a .war (with servlets that use the persistence.jar and other
t>supporting .jars), and then into an .ear (had to specify some info in
t>application.xml).
t>
t>i deployed the .ear to jboss3.0.2's server/default/deploy directory, but
t>when my code in persistence.jar reached JDO.getDatabase(), at which it
t>reads the mapping.xml and tries to load the classes specified there, i get
t>the error message:
t>
t>14:20:00,154 ERROR [PersistenceMgr] Nested error:
t>org.exolab.castor.mapping.MappingException: Could not find the class
t>persistence.entity.User.
t>
t>the User class is in the persistence.jar, but for some reason the User
t>class can't be found. i even tried putting the User class in its proper
t>package/folder hierarchy in the /server/default/lib directory, but didn't work...
t>
t>i searched the castor mailing list and found that someone else had a
t>similar problem, but with a different app server:
t>http://www.mail-archive.com/[email protected]/msg07386.html
I have not worked with ear files before, but I have worked with war
files under Tomcat and this sounds like a classloader issue. Have
you tried making use of the org.exolab.castor.jdo.JDO.setClassloader()
method?
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev