Hi,

don't know if i understand you correctly (what is the native driver?), but 
maybe ...

We used the type 2 jdbc driver with DB/2 v7
- DB/2 client must be installed
- we had to set some environment variables for the tomcat
    DB2DIR=%Db2dir%/sqllib; export DB2DIR
    DB2INSTANCE=%%Db2instance%%; export DB2INSTANCE
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DB2DIR/lib; export LD_LIBRARY_PATH
- CATALOG the NODE and the DATABASE with the client
- our connection decriptor:
    protocol="jdbc"
    subprotocol="db2"
    dbalias="%%Dbinstances%%"
  where %%Dbinstances%% is the alias configured with the CATALOG command

Maybe you set the envitonment in a tomcat startup script so this works and 
maybe you have to set the same environment for the java startup skript for your 
java application.

Now we use the type  driver for DB/2 v8 and everything is much easier:
- driver: com.ibm.db2.jcc.DB2Driver
- our connection decriptor:
    protocol="jdbc"
    subprotocol="db2"
    dbalias="//<server>:<port>/<dataBaseName>"
- get the two jar Files: db2jcc.jar and db2jcc_license_cu.jar (e.g. from a 
server or client 
  installation) copy it in your classpath or set the classpath accordingly
- no environment settings needed

Sorry if this is beyond your problem, but maybe it helped

Regards
Max




MfG
Max Geigl

Tel. : 1752
eMail: [EMAIL PROTECTED]



> -----Ursprüngliche Nachricht-----
> Von: ABOU LINA [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 6. April 2006 13:20
> An: OJB Users List
> Betreff: OJB : DB2 NATIVE JDBC DRIVER
> 
> 
> Hi;
> 
> i use the native jdbc driver for DB2/AS400.
> 
> i configure the ojb connection parameters like this :
> dbms=Db2
> jdbc-level=2.0
> driver=com.ibm.db2.jdbc.app.DB2Driver
> protocol=jdbc
> sub-protocol=db2
> db-alias=localhost/DB2ADMIN
> user=test
> password=***
> 
> so with this configuration the web application make 
> connection succusfuly
> but with java application ojb
> could not borrow connection. !!!
> 
> Thx in advance.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to