Andreas,
Try
<jdo-conf>
<database name="mydb" engine="oracle" >
<data-source class-name="org.apache.commons.dbcp.BasicDataSource">
<param name="url" value="jdbc:oracle:thin:@blabla:1521:mydb" />
<param name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<param name="username" value="user" />
<param name="password" value="pass" />
<param name="maxActive" value="10" />
</data-source>
<mapping href="castor-mapping.xml" />
</database>
<transaction-demarcation mode="local" />
</jdo-conf>
Werner
wg> -----Original Message-----
wg> From: Andreas Vombach [mailto:[EMAIL PROTECTED]
wg> Sent: Wednesday, May 18, 2005 3:27 PM
wg> To: [email protected]
wg> Subject: Re: [castor-user] [jdo] castor and dbcp
wg>
wg>
wg> My conf now looks like
wg>
wg> ...
wg> <jdo-conf>
wg> <database name="mydb" engine="oracle" >
wg> <data-source
wg> class-name="org.apache.commons.dbcp.BasicDataSource">
wg> <param name="url"
wg> value="jdbc:oracle:thin:@blabla:1521:mydb" />
wg> <param name="driverClassName"
wg> value="oracle.jdbc.driver.OracleDriver" />
wg> <param name="username" value="user" />
wg> <param name="password" value="pass" />
wg> <param name="maxActive" value="10" />
wg> </data-source>
wg> <mapping href="castor-mapping.xml" />
wg> <transaction-demarcation mode="local" />
wg> </database>
wg> </jdo-conf>
wg>
wg> but I get the exception
wg>
wg> org.exolab.castor.jdo.DatabaseNotFoundException: Nested
wg> error: unable to
wg> add 'transaction-demarcation'
wg> to <database> due to the following exception:
wg> [java] >>>--- Begin Exception ---<<<
wg> [java] java.lang.IllegalStateException:
wg> java.lang.ClassCastException: org.exolab.castor.jdo.conf.Database
wg> [java] at
wg> org.exolab.castor.jdo.conf.JdoConfDescriptor$2.setValue(JdoC
wg> onfDescriptor.java:122)
wg> [java] at
wg> org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalH
wg> andler.java:1016)
wg> [java] at
wg> org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalH
wg> andler.java:1084)
wg> [java] at
wg> org.apache.xerces.parsers.AbstractSAXParser.endElement(Unkno
wg> wn Source)
wg> [java] at
wg> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyEle
wg> ment(Unknown
wg> Source)
wg> [java] at
wg> org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unkn
wg> own Source)
wg> [java] at
wg> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt
wg> artElement(Unknown
wg> Source)
wg> [java] at
wg> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme
wg> ntContentDispatcher.dispatch(Unknown
wg> Source)
wg> [java] at
wg> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo
wg> cument(Unknown
wg> Source)
wg> [java] at
wg> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
wg> [java] at
wg> org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
wg> [java] at
wg> org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
wg> [java] at
wg> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
wg> [java] at
wg> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:657)
wg> [java] at
wg> org.exolab.castor.jdo.engine.JDOConfLoader.loadConfiguration
wg> (JDOConfLoader.java:95)
wg> [java] at
wg> org.exolab.castor.jdo.engine.JDOConfLoader.getDatabases(JDOC
wg> onfLoader.java:134)
wg> [java] at
wg> org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(D
wg> atabaseRegistry.java:253)
wg> [java] at
wg> org.exolab.castor.jdo.JDO.getDatabase(JDO.java:565)
wg> [java] at
wg> processing.app_login_service.getIdFromName(app_login_service.
wg> java:225)
wg> ...
wg>
wg> Is it something with xerces? Which version do I have to
wg> have, is the
wg> jdk1.5 one sufficient?
wg> Thanks in advance
wg>