Ralf, I just recreated the project and tested. It works fine. May be, I messed it up somewhere. Thanks/
-----Original Message----- From: Ralf Joachim [mailto:[EMAIL PROTECTED] Sent: Friday, October 27, 2006 12:15 PM To: [email protected] Subject: Re: [castor-user] Struts PlugIn Hi Shiva, I have some more questions on your problem: - How does your jdo-conf.xml look like? - Can you send a bit more of the stacktrace so we are able to see where things went wrong? - What does the getDatabasexml() method return (filename and path to jdo conf as String)? - As your classes are located in web-inf/classes. Where are jdo-conf.xml and mapping.xml files located? - As far as I can remember there are alternate loadConfiguration() methods where you can pass a classloader to use. Have you tried that? Regards Ralf Shiva P. Kodityala schrieb: > Tried it without plugin. It is giving the same error. > Tried to do new com.xyz.database.UserAddress(), it gets loaded, however > I see the same error on loading mapping.xml. Does it check connection to > the database while finding class's existence? > > > > -----Original Message----- > From: Shiva P. Kodityala [mailto:[EMAIL PROTECTED] > Sent: Friday, October 27, 2006 9:53 AM > To: [email protected] > Subject: [castor-user] Struts PlugIn > > It is a web app using struts. Trying to do initialize castor-jdo inside > plugin as below: > > Database.xml has mapping.xml inside. While loading mapping, it is > throwing error: class not found for the classes inside mapping.xml. All > of the classes are inside .../WEB-INF/classes/. Verified the package > name. everything seems to be correct. Do you see any issue with class > loaders? > > Any clue to solve this problem is appreciated. > > [10/27/06 9:35:31:053 PDT] 3ed71d01 SystemOut O [10/27/06 > 9:35:31:444 PDT] 3ed71d01 SystemErr R > org.exolab.castor.mapping.MappingException: Could not find the class > com.xyz.database.UserAddress > > <mapping> > <class name="com.xyz.database.UserAddress" identity="addressid"> > > <description> UserAddress Table mapping </description> > <map-to table="USERADDRESS"/> > --- > -- > </class> > > > > public class OracleDatabasePlugIn implements PlugIn { > > private String databasename = null; > private String databasexml = null; > > private IDatabase database = new OracleDatabase(); > private JDOManager jdo = null; > public void destroy() { > } > > public void init(ActionServlet arg0, ModuleConfig arg1) > throws ServletException { > try { > JDOManager.loadConfiguration(getDatabasexml()); > jdo = > JDOManager.createInstance(getDatabasename()); > } catch (MappingException e) { > e.printStackTrace(); > > arg0.getServletContext().setAttribute("DATABASE", null); > > } > > database = new OracleDatabase(jdo); > > arg0.getServletContext().setAttribute("DATABASE",database); > } > -- > -- > -- > -- > > > } > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

