I am runnig Castor JDO 0.94 in a Servlet on WebSphere 4 but it can't seem to
find my data class .
It seems that setting the classloader is usually the issue here but as far
as I can tell I'm setting it correctly. 
I have tried both the servlet's classloader as well as the data class. And I
tested that the servlet found the data class correctly.

any other suggestions?
 
thanks



I am getting the following error :

TestrServlet.doGet-- org.exolab.castor.mapping.MappingException: Nested
error: org.exolab.castor.mapping.MappingException: Could not find the class
xxx.dao.app.MasterGroup

org.exolab.castor.mapping.MappingException: Could not find the class
xxx.dao.app.MasterGroup
        at
org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(Unknown
Source)
        at
org.exolab.castor.jdo.engine.JDOMappingLoader.createDescriptor(Unknown
Source)
        at
org.exolab.castor.mapping.loader.MappingLoader.loadMapping(Unknown Source)
        at org.exolab.castor.jdo.engine.JDOMappingLoader.loadMapping(Unknown
Source)
        at org.exolab.castor.mapping.Mapping.getResolver(Unknown Source)
        at
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(Unknown Source)
        at org.exolab.castor.jdo.JDO.loadConfiguration(Unknown Source)
        at xxx.servlets.TestrServlet.doGet(TestrServlet.java:48)


and this is my code 
           
            MasterGroup mgg = new MasterGroup();
            mgg.setId(34);
            System.out.println("mgg = " + mgg.getId());
            PrintWriter writer = Logger.getSystemLogger();

            String mapfile = "WEB-INF/castor-permissions.xml";
            String dbfile = "WEB-INF/castor-db.xml";
            ClassLoader classloader = MasterGroup.class.getClassLoader();
            Mapping mapping = new Mapping(classloader);

            JDO jdo = null;
            Database db = null;
            
            mapping.setLogWriter(writer);
            mapping.loadMapping(new
InputSource(GlobalProperties.getFilePath(mapfile)));

            jdo = new JDO();
            jdo.setClassLoader(classloader);

            jdo.setLogWriter(writer);
            jdo.loadConfiguration(new
InputSource(GlobalProperties.getFilePath(dbfile)),null,null );
            jdo.setDatabaseName("db");

            db = jdo.getDatabase();
            db.begin();




**************************************************************
NOTICE: The information contained in this e-mail is confidential and may be
privileged or otherwise protected from disclosure.  This e-mail is intended
solely for the use of the named addressee.  Please be aware that any other
use, printing, copying, disclosure or dissemination may be subject to legal
restriction.  If you are not the intended recipient, please notify us
immediately by return e-mail to the sender. 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to