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(Unknown
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(Unknown
Source)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown
Source)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorFromQuery(Unknown
Source)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorByQuery(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.getConnectionFromPool(Unknown
Source)
at
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(Unknown
Source)
at
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(Unknown
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.newConnectionFromDriverManager(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]
>
>