Emir Causevic wrote:
Hi Bruce, I'm not sure if the proposed method number 2 below is working. Here is my configuration file content:
<databases> <!-- this is line 2 listed in the exception message below --> <database name="SB" engine="oracle"> <driver class-name="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@murgle:1521:SB"> <param name="user" value="emir" /> <param name="password" value="emir" /> </driver> <mapping href="mapping.xml"/> </database>
<!-- Configuration for SAPDB database --> <database name="castor" engine="sapdb"> <driver class-name="com.sap.dbtech.jdbc.DriverSapDB" url="jdbc:sapdb://mssql2k/castor"> <param name="user" value="dba" /> <param name="password" value="dba" /> </driver> <mapping href="mapping.xml"/> </database> </databases>
I'm using same test code to test Oracle and SAPDB connection. Here is some java code excerpt: JDO jdo = new JDO(); jdo.setDatabaseName("castor"); // jdo.setDatabaseName("SB"); try { jdo.loadConfiguration("database.xml"); } catch(MappingException me) { System.out.println("==> Exception reported while loading db config file: " + me.getMessage()); }
And finally here's the output: ==> Exception reported while loading db config file: Nested error: org.xml.sax.SAXException: database is missing required attribute: name - line: 2 column: 12{file: file:///E:/java/JProjects/CastorJDO00/database.xml; line: 2; column: 12}
As far as I can see this parser expects name attribute in the databases
element too?!? I've tried renaming databases element to something else but the same
error is reported.
Emir,
Do you have the DOCTYPE delcaration in the database descriptor? The DOCTYPE delcaration usually looks like the following:
<!DOCTYPE databases PUBLIC
"-//EXOLAB/Castor JDO Configuration DTD Version 1.0//EN"
"http://castor.exolab.org/jdo-conf.dtd">Notice that it already contains the <databases> element in the DOCTYPE descriptor. In this case, you can leave the explicit <databases> and </databases> elements out of your database descriptor.
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://incubator.apache.org/projects/geronimo.html
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
