Jim,
Did you make sure the directory which contains your class is part of your classpath?
--Keith
jim burton wrote:
I'm new to castor and trying to run a little test against mysql, from the tutorial at java boutique but getting a MappingException that I don't understand. This is my mapping.xml:
<mapping> <class name="Media" identity="id"> <map-to table="media" /> <field name="id" type="integer"> <sql name="id" type="integer"/> </field> <field name="type" type="string"> <sql name="type" type="char" /> </field> </class> </mapping>
the Media class is in the same dir as mapping.xml & database.xml & my TestCastor class (no packages involved) which contains the code which initialises JDO:
JDO jdo = new JDO("mydb"); jdo.setConfiguration("database.xml");
evrything compiles OK but running TestCastor gives me this error:
log4j:WARN No appenders could be found for logger (org.exolab.castor.jdo.engine.DatabaseRegistry).
log4j:WARN Please initialize the log4j system properly.
org.exolab.castor.mapping.MappingException: Could not find the class Media
at org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingLoader.java:396)
at org.exolab.castor.jdo.engine.JDOMappingLoader.createDescriptor(JDOMappingLoader.java:135)
at org.exolab.castor.mapping.loader.MappingLoader.loadMapping(MappingLoader.java:289)
at org.exolab.castor.jdo.engine.JDOMappingLoader.loadMapping(JDOMappingLoader.java:324)
at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:291)
at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:295)
at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:571) at TestCastor.main(TestCastor.java:11)
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
