java.lang.ClassNotFoundException: Class com.ibm.db2.jcc.DB2Driver not found in Worklight platform or project
Asked Answered
H

2

6

I try to test an sql adapter that connects to db2 but I get the following result:

java.lang.ClassNotFoundException: Class com.ibm.db2.jcc.DB2Driver not found in Worklight platform or project

here is my code:

<dataSourceDefinition>
    <driverClass>com.ibm.db2.jcc.DB2Driver</driverClass>
    <url>jdbc:db2://localhost:50000/WLTEST</url>
    <user>db2admin</user>
    <password>db2admin</password> 
</dataSourceDefinition>

any idea what is going wrong?

Hallagan answered 2/10, 2013 at 1:49 Comment(0)
M
3

Do you mean that your Worklight database is DB2-based? If yes,

  • make sure to also edit worklight.properties with the correct DB2 setup

Also make sure that:

  • the DB2 connector driver exists in the server\lib folder
Malleolus answered 2/10, 2013 at 2:6 Comment(1)
Thank you, I added the DB2connector into the server\lib and it workedHallagan
P
9

Add the two jars:

db2jcc.jar
db2jcc_license_cu.jar

Add them to the libraries jar folder.

Poaceous answered 12/7, 2016 at 13:51 Comment(2)
add a link to where to get them and i'll be forever thankfulKalil
found this oneKalil
M
3

Do you mean that your Worklight database is DB2-based? If yes,

  • make sure to also edit worklight.properties with the correct DB2 setup

Also make sure that:

  • the DB2 connector driver exists in the server\lib folder
Malleolus answered 2/10, 2013 at 2:6 Comment(1)
Thank you, I added the DB2connector into the server\lib and it workedHallagan

© 2022 - 2024 — McMap. All rights reserved.