|
Hi The document for configuring data-source (http://castor.exolab.org/database-conf.html#The-Castor-configuration-file) reads: "The data-source element specifies the JDBC 2.0 DataSource for obtaining new connections to the database server. DataSources are defined in the JDBC 2.0 standard extension API which is included with Castor, and implement the interface javax.sql.DataSource. The DataSource implementation class name is specified by the class-name attribute and configured through Bean-like accessor methods specified for the param element. The DTD for the param element is undefined and depends on the DataSource being used." Actually it does NOT work with "param" element. When I
define:
<database name="mysampledb" engine="informix"
>
<data-source class-name="com.informix.jdbcx.IfxConnectionPoolDataSource"> <param name="description" value="Pollux"/> <param name="ifxIFXHOST" value="sun02"/> <param name="portNumber" value="17620"/> <param name="user" value="ayu"/> <param name="password" value="********"/> <param name="serverName" value="onl1_sun02_soc"/> <param name="databaseName" value="pollux"/> </data-source> <mapping href="mapping.xml" /> </database> I got:
[java] org.xml.sax.SAXException:
unable to find FieldDescriptor for 'param' in ClassDescriptor of
data-source
[java] at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1107) [java] Nested error: org.xml.sax.SAXException: unable to find FieldDescriptor for 'param' in ClassDescriptor of data-source{file: file:/export/home/ayu/tmp_spider_test/atlas/pollux2/sample/etc/config/informix.xml; line: 38; column: 49} [java] at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340) [java] at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214) [java] at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806) [java] at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182) [java] at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) [java] at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) [java] at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:530) [java] at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:241) [java] at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:583) I also found only very limited "params" element for data-source works. For
example, the Oralce data-source configuration in the example works. If you
have more parameters to configure like Informix, it does NOT work.
Best regards, Albert
-----------------------------
Albert Yu Software Engineer IMTF Software Ltd.
Airport Business Park Building 4500 Kinsale Road Cork Ireland System Integrators for eDocuments
http://www.imtf.com DISCLAIMER
This message is intended only for use by the person to whom it is addressed. It may contain information that is privileged and confidential. Its content does not constitute a formal commitment by IMTF. If you are not the intended recipient of this message, kindly notify the sender immediately and destroy this message. Thank You. ---------------------------------------- |
