Thanks Charles for your reply .

so i found the probleme , i recieved a new log file from the administrator
and i localised the error message clearly : it was probleme with CCSID
(iSeries) . we used the default value wiche don't make a conversion between
jdbc type and the database type 66535 i think.  so i replaced this value by
th French EBCIDIC and it works fine.

thx

On 4/7/06, Charles Anthony <[EMAIL PROTECTED]> wrote:
>
> Hi Abou Lina,
>
> Caused by: java.sql.SQLException: INTERNAL ERROR:  Creation of DB2Driver
> object for registering with DriverManager failed.
>     at java.lang.Throwable.<init>(Throwable.java:195)
>     at java.lang.Exception.<init>(Exception.java:41)
>     at java.sql.SQLException.<init>(SQLException.java:40)
>     at com.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:255)
>     at java.lang.Class.forName(Class.java:242)
>
> This shows that the library IS on the classpath, (cos the the driver is
> part
> of the stack trace) but there was an error in it's constructor. I assume
> that this code is running ON the AS400 (the native driver only works ON
> the
> AS400); maybe the Library List is not set up correctly ?
>
> When we run on AS400, we actually use the toolkit driver - our reasonably
> extensive tests across multiple AS400/iSeries machines and on multiple
> versions of OS400 show the performance difference to be negligble (and we
> are talking a heavy-duty financial application here, not a simple webapp);
> moreover the native driver always seems to more buggy than the toolbox
> driver , and it just makes life easier to be able to use the Type 4
> Driver,
> since we can run on it on any platform. On the occasions we have used the
> native driver, it "worked" first time - we didn't have to any much time
> configuring or playing with classpath/library list etc...
>
> My advice is "Try The Toolkit Driver".
>
> Just my 2 cents,
>
> Charles.
>
> -----Original Message-----
> From: ABOU LINA [mailto:[EMAIL PROTECTED]
> Sent: 06 April 2006 16:51
> To: OJB Users List
> Subject: Re: OJB : DB2 NATIVE JDBC DRIVER
>
>
> Thank for yours reply.
>
> so i give you more detail :
>
> 1. driver name  : db2_classes.jar  (native driver : need native db2
> library
> to be
>     installed)
>
> 2. stacktrace :
> log4j:WARN No appenders could be found for logger (
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
> log4j:WARN Please initialize the log4j system properly.
> org.apache.ojb.broker.PersistenceBrokerException: Used ConnectionManager
> instance could not obtain a connection
>     at java.lang.Throwable.<init>(Throwable.java:195)
>     at java.lang.Exception.<init>(Exception.java:41)
>     at java.lang.RuntimeException.<init>(RuntimeException.java:43)
>     at org.apache.commons.lang.exception.NestableRuntimeException.<init>(
> NestableRuntimeException.java:86)
>     at org.apache.ojb.broker.OJBRuntimeException.<init>(Unknown Source)
>     at org.apache.ojb.broker.PersistenceBrokerException.<init>(Unknown
> Source)
>     at
> org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement
> (Unkn
> own
> Source)
>     at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery
> (Unknown
> Source)
>     at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery
> (Unknown
> Source)
>     at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source)
>     at
> org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(Unknown
> Source)
>     at
> org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterator
> (Unkn
> own
> Source)
>     at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery
> (Unkn
> own
> Source)
>     at
>
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorFromQ
> uery(Unknown
> Source)
>     at
>
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorByQue
> ry(Unknown
> Source)
>     at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCount(Unknown
> Source)
>     at
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCount(Unknown
> Source)
>     at
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCount(Unknown
> Source)
>     at framework.services.dao.ojb.OJBPersistenceService.getCount(
> OJBPersistenceService.java:971)
>     at
> application.oct.metier.manager.MigrationManager.getContratsByProduitCode(
> MigrationManager.java:1366)
>     at utile.migration.DataValidator.validateData(DataValidator.java:81)
>     at utile.migration.DataValidator.execute(DataValidator.java:37)
>     at utile.migration.DataValidator.main(DataValidator.java:144)
> Caused by: org.apache.ojb.broker.accesslayer.LookupException: Could not
> borrow connection from pool -
> org.apache.ojb.broker.metadata.JdbcConnectionDescriptor:
> [EMAIL PROTECTED]
>   jcd-alias=default
>   default-connection=true
>   dbms=Db2
>   jdbc-level=2.0
>   driver=com.ibm.db2.jdbc.app.DB2Driver
>   protocol=jdbc
>   sub-protocol=db2
>   db-alias=localhost/DB2ADMIN
>   user=db2test
>   password=*****
>   eager-release=false
>   ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1,
> maxActive=21,
> maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10,
> testWhileIdle=false, minEvictableIdleTimeMillis=600000,
> testOnReturn=false,
> logAbandoned=false, removeAbandonedTimeout=300,
> timeBetweenEvictionRunsMillis=-1, testOnBorrow=true}
>   batchMode=false
>   useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
>   ignoreAutoCommitExceptions=false
>   sequenceDescriptor=
> [EMAIL PROTECTED]
>      sequenceManagerClass=class
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
>      Properties={globalSequenceId=true, globalSequenceStart=10000,
> grabSize=5}
> ]
> ]
>     at java.lang.Throwable.<init>(Throwable.java:195)
>     at java.lang.Exception.<init>(Exception.java:41)
>     at org.apache.commons.lang.exception.NestableException.<init>(
> NestableException.java:142)
>     at org.apache.ojb.broker.OJBException.<init>(Unknown Source)
>     at org.apache.ojb.broker.accesslayer.LookupException.<init>(Unknown
> Source)
>     at
>
> org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.getConnectionF
> romPool(Unknown
> Source)
>     at
>
> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnec
> tion(Unknown
> Source)
>     at
> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection
> (Unknow
> n
> Source)
>     ... 17 more
> Caused by: org.apache.ojb.broker.accesslayer.LookupException: Error
> getting
> Connection from DriverManager with url (jdbc:db2:localhost/DB2ADMIN) and
> driver (com.ibm.db2.jdbc.app.DB2Driver)
>     at java.lang.Throwable.<init>(Throwable.java:195)
>     at java.lang.Exception.<init>(Exception.java:41)
>     at org.apache.commons.lang.exception.NestableException.<init>(
> NestableException.java:142)
>     at org.apache.ojb.broker.OJBException.<init>(Unknown Source)
>     at org.apache.ojb.broker.accesslayer.LookupException.<init>(Unknown
> Source)
>     at
>
> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectio
> nFromDriverManager(Unknown
> Source)
>     at
>
> org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactory
> .makeObject(Unknown
> Source)
>     at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(
> GenericObjectPool.java:816)
>     ... 20 more
> Caused by: java.sql.SQLException: INTERNAL ERROR:  Creation of DB2Driver
> object for registering with DriverManager failed.
>     at java.lang.Throwable.<init>(Throwable.java:195)
>     at java.lang.Exception.<init>(Exception.java:41)
>     at java.sql.SQLException.<init>(SQLException.java:40)
>     at com.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:255)
>     at java.lang.Class.forName(Class.java:242)
>     at org.apache.ojb.broker.util.ClassHelper.getClass(Unknown Source)
>     ... 23 more
> java.lang.NullPointerException
>     at java.lang.Throwable.<init>(Throwable.java:180)
>     at java.lang.Exception.<init>(Exception.java:29)
>     at java.lang.RuntimeException.<init>(RuntimeException.java:32)
>     at java.lang.NullPointerException.<init>(NullPointerException.java:36)
>     at utile.migration.DataValidator.validateData(DataValidator.java:88)
>     at utile.migration.DataValidator.execute(DataValidator.java:37)
>     at utile.migration.DataValidator.main(DataValidator.java:144)
>
>
> 3. About my name "Abou Lina" = Lina's Father so Abou = Father and Lina is
> the name of my daughter. so is only an alias and not my realy name.
>
> thx in advance.
>
> On 4/6/06, Charles Anthony <[EMAIL PROTECTED]> wrote:
> >
> > The AS400 has it's own JDBC driver, which talks to a different set of
> > background jobs on the AS400. They are (in theory) more efficient that
> the
> > DRDA jobs which the normal DB2 driver uses when talking to the AS400.
> >
> > Abou Lina (or Lina Abou - sorry not, sure which way round your names go)
> :
> > what is the error reported ? Full stacktrace would be useful.
> >
> > Is the toolbox driver definitely on the class path ? (jt400.jar)
> >
> > Cheers,
> >
> > Charles.
> >
> > -----Original Message-----
> > From: Geigl Maximilian, R235 [mailto:[EMAIL PROTECTED]
> > Sent: 06 April 2006 14:16
> > To: OJB Users List
> > Subject: AW: OJB : DB2 NATIVE JDBC DRIVER
> >
> >
> > 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]
> >
> >
> >
> > ___________________________________________________________
> > HPD Software Ltd. - Helping Business Finance Business
> > Email terms and conditions: www.hpdsoftware.com/disclaimer
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ___________________________________________________________
> HPD Software Ltd. - Helping Business Finance Business
> Email terms and conditions: www.hpdsoftware.com/disclaimer
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to