Stephen Ince wrote:
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="/com/opendemand/jdo/mapping_sql.xml"/>
</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
That's very odd. I am using the latest CVS with a JNDI ENC and having no problem. Unfortunately I wasn't much involved in that release. Werner, do you have any idea what's up with this?
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
The Castor Project http://www.castor.org/
Apache Geronimo http://geronimo.apache.org/
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
