You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by MUSTAFA SAIT OZEN <ms...@anadolu.edu.tr> on 2007/06/20 12:48:04 UTC

DB2 9 driver problem???

I have just started a new web project that DB2 database must be used. I am using two jars  'db2jcc.jar' and 'db2jcc_licence_cu.jar' to handle db connections. I have installed them in my repository with commands 'mvn install:install-file -Dfile=db2jcc.jar -DgroupId=com.ibm.db2 -DartifactId=db2jcc -Dversion=9 -Dpackaging=jar and 'mvn install:install-file -Dfile=db2jcc_license_cu.jar -DgroupId=com.ibm.db2 -DartifactId=db2jcc_license_cu -Dversion=9 -Dpackaging=jar'. When I started tests, I get an error like 

'[ERROR] SchemaExport - schema export unsuccessful <com.ibm.db2.jcc.c.SqlExceptio
n: [ibm][db2][jcc][10333][11649] No license was found. An appropriate license fi
le db2jcc_license_*.jar must be provided in the CLASSPATH setting.>com.ibm.db2.j
cc.c.SqlException: [ibm][db2][jcc][10333][11649] No license was found. An approp
riate license file db2jcc_license_*.jar must be provided in the CLASSPATH setting.
        at com.ibm.db2.jcc.c.o.d(o.java:534)
        at com.ibm.db2.jcc.c.p.a(p.java:332)
        at com.ibm.db2.jcc.c.p.<init>(p.java:404)
        at com.ibm.db2.jcc.b.b.<init>(b.java:256)
        at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:163)
        at java.sql.DriverManager.getConnection(DriverManager.java:525)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
..
...
.....' .

I  use Eclipse IDE  to develop this project with Maven plugin. I have checked the name of these jars in Maven2 Dependencies. Their names are db2jcc-9.jar anad db2jcc_licence-9.jar, respectively. I can not find any support for DB2. 

Can anyone help me???

-----------------------------------------------------------------------
Sait 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DB2 9 driver problem???

Posted by MustafaSait Özen <ms...@gmail.com>.
I have added test scope tag above those dependencies. But i still get
the same error "Embedded error: [ibm][db2][jcc][10333][11649] No
license was found. An appropria
te license file db2jcc_license_*.jar must be provided in the CLASSPATH
setting."
db2jcc_licence_cu.jar is renamed as db2jcc_licence_cu9.jar in my
Maven2 Dependencies when i look at eclipse. The jars' names are
changed when "mvn test" is executed? I think
db2jcc_licence_cu9.jar is enough to be used as db2jcc_license_*.jar.
Can anybody have an idea to fix this error? Please help.....


On 20/06/07, Thorsten Heit <th...@gmx.de> wrote:
> Hi,
>
> > I  use Eclipse IDE  to develop this project with Maven plugin. I have
> > checked the name of these jars in Maven2 Dependencies. Their names are
> > db2jcc-9.jar anad db2jcc_licence-9.jar, respectively. I can not find any support
> > for DB2.
> >
> > Can anyone help me???
>
> You should have at least the following dependencies in your pom.xml:
>
> <dependency>
>   <groupId>com.ibm.db2</groupId>
>   <artifactId>db2jcc</artifactId>
>   <version>9</version>
> </dependency>
>
> <dependency>
>   <groupId>com.ibm.db2</groupId>
>   <artifactId>db2jcc_license_cu</artifactId>
>   <version>9</version>
> </dependency>
>
> If you only need the jars in test classes, add <scope>test</scope> in the above dependencies.
>
> I'd assume that this should work...
>
>
> HTH
>
> Thorsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DB2 9 driver problem???

Posted by Thorsten Heit <th...@gmx.de>.
Hi,

> I  use Eclipse IDE  to develop this project with Maven plugin. I have
> checked the name of these jars in Maven2 Dependencies. Their names are
> db2jcc-9.jar anad db2jcc_licence-9.jar, respectively. I can not find any support
> for DB2. 
> 
> Can anyone help me???

You should have at least the following dependencies in your pom.xml:

<dependency>
  <groupId>com.ibm.db2</groupId>
  <artifactId>db2jcc</artifactId>
  <version>9</version>
</dependency>

<dependency>
  <groupId>com.ibm.db2</groupId>
  <artifactId>db2jcc_license_cu</artifactId>
  <version>9</version>
</dependency>

If you only need the jars in test classes, add <scope>test</scope> in the above dependencies.

I'd assume that this should work...


HTH

Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org