could it be that you are using the 0.9.6 RC, as we have changed the format of the JDO config file. In general, the stack trace you've included definitely isn't related to using JNDI (or not).
Thanks
Werner
--Original Message Text---
From: Stephen Ince
Date: Wed, 1 Dec 2004 02:34:45 -0500
Hi. I am trying to upgrade to castor 9.5.4 and I am getting the following error. My configuration was working fine on 9.5.3 but for some reason castor is using it's built-in entity resolver for the jdo database configuration. How should I load a jndi datasource in a J2EE application?
Steve
Mapping file:
------------------------------------------------------------------------------------------
<database name="ods" engine="db2">
<jndi name="java:comp/env/jdbc/ods"/>
<mapping href=""/>
</database>
Java:
-----------------------------------------------------------------------------------------------------------------------
JDO.loadConfiguration(getClass().getResource( "/com/opendemand/jdo/database_db2.xml" ).toString(),getClass().getClassLoader() );
Exception:
-----------------------------------------------------------------------------------------------------------------------
FieldDescriptor for 'jndi' in ClassDescriptor of jdo-conf{file: jar:file:/C:/Pro
gram%20Files/Apache%20Group/Tomcat%204.1/server/webapps/openload/WEB-INF/lib/openload.jar!/com/opendemand/jdo/database_db2.xml; line: 7; column: 39}
unable to find FieldDescriptor for 'jndi' in ClassDescriptor of jdo-conf
org.xml.sax.SAXException: unable to find FieldDescriptor for 'jndi' in ClassDesc
riptor of jdo-conf
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.
java:1853)
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.
java:1330)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Sourc
e)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:657)
at org.exolab.castor.jdo.engine.JDOConfLoader.loadConfiguration(JDOConfL
oader.java:85)
at org.exolab.castor.jdo.engine.JDOConfLoader.getDatabase(JDOConfLoader.
java:101)
at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRe
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
