Hi Clovis,

as a first try can you please check if a driver configuration works for you. The following is from our test cases:

<?xml version="1.0" ?>
<!DOCTYPE jdo-conf PUBLIC
          "-//EXOLAB/Castor JDO Configuration DTD Version 1.0//EN"
          "http://castor.exolab.org/jdo-conf.dtd";>
<jdo-conf>
    <database name="sapdb" engine="sapdb" >
        <driver url="jdbc:sapdb://localhost/test"
                class-name="com.sap.dbtech.jdbc.DriverSapDB">
            <param name="user" value="DBA" />
            <param name="password" value="DBA" />
            <!--param name="sqlmode" value="ORACLE" /-->
        </driver>
        <mapping href="mapping.xml" />
    </database>
    <transaction-demarcation mode="local" />
</jdo-conf>

Having said that I think that nowone run the test cases for sapdb for a long time :-( . The problem with sapdb is that none of the commiters have it installed yet. We would very much apreciate if you could help use with this task ;-) .

The problem with datasource configuration is that the parameters passed to the datasource vary from driver to driver. Below you find the datasource part of my jdo-conf that I use to connect to oracle.

<data-source class-name="oracle.jdbc.pool.OracleConnectionCacheImpl">
    <param name="URL" value="jdbc:oracle:thin:@server:1521:sid" />
    <param name="user" value="user" />
    <param name="password" value="password" />
    <param name="min-limit" value="5" />
    <param name="max-limit" value="10" />
</data-source>

If you find a configuration that works for you I'd like you to post that on the list so that I can add that to our test configuration. If it still fails unmarshalling the jdo-conf please point me to a location where I can get the driver you are using so that I can check that myself.

Regards
Ralf


clovis_wichoski schrieb:
Hi,

I'm migrating from version 0.9.3.9 to 0.9.7,
using the generated jar from castor-0.9.7-src.tgz
I changed the old database conf to new jdo-conf, change my class that uses JDO 
to JDOManager, and now when I start my application I get the follow Exception:

java.lang.NullPointerException
        at 
org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:763)
        at 
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDataSource(DatabaseRegistry.java:375)
        at 
org.exolab.castor.jdo.engine.DatabaseRegistry.initFromDataSource(DatabaseRegistry.java:313)
        at 
org.exolab.castor.jdo.engine.DatabaseRegistry.initDatabase(DatabaseRegistry.java:279)
        at 
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:200)
        at 
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:153)
        at 
org.exolab.castor.jdo.JDOManager.loadConfiguration(JDOManager.java:289)
        at 
org.exolab.castor.jdo.JDOManager.loadConfiguration(JDOManager.java:322)
...

the code that trows above exception is:

JDOManager.loadConfiguration("/opt/myapp/conf/castor/dbMyApp.xml");
JDOManager myServer = JDOManager.createInstance("myapp");

contents of dbMyApp.xml is:

<jdo-conf>
  <database name="myapp" engine="sapdb" >
    <data-source class-name="com.sap.dbtech.jdbcext.DataSourceSapDB">
      <param name="serverName" value="localhost" />
      <param name="networkProtocol" value="jdbc:sapdb:" />
      <param name="user" value="TEST" />
      <param name="password" value="test" />
      <param name="databaseName" value="TEST" />
    </data-source>
    <mapping href="/opt/myapp/conf/castor/map/mapPerson.xml" />
  </database>
  <transaction-demarcation mode="local" />
</jdo-conf>

What is wrong?

Thanks for any help

Clovis


-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

--

Syscon Ingenieurbüro für
Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
D-72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Email: [EMAIL PROTECTED]
Web:   www.syscon-world.de

-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to