[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2344
  • Last Modified:

Websphere- DB2 action: validate-db-driver fails

Server: Win2003 64 bit
App: Websphere and DB2 connect
I have cataloged the databases, and I can connect to them with db2 connect <database> user *** using ***

I have set in the wkplc_dbtype.properties:
###############################################################################
# DB2 Properties
###############################################################################

# DbDriver: The name of class SqlProcessor will use to import SQL files
# For DB2 Type 2 driver use COM.ibm.db2.jdbc.app.DB2Driver
# For DB2 Type 4 driver use COM.ibm.db2.jdcc.DB2Driver
db2.DbDriver=COM.ibm.db2.jdbc.app.DB2Driver


# DbLibrary: The directory and name of the zip/jar file containing JDBC driver class
# For DB2 Type 2 driver use <SQLLIB>/java/db2java.zip
# For DB2 Type 4 driver use <SQLLIB>/java/db2jcc.jar;<SQLLIB>/java/db2jcc_license_cu.jar
# Please use the system specific file separator names, e.g. for windows semicolon and for unix colon.
db2.DbLibrary=C:/IBM/SQLLIB/java/db2java.zip


# JdbcProviderName: The name of jdbc provider to be used
db2.JdbcProviderName=wpdbJDBC_db2

###############################################################################
# END: DB2 Properties
###############################################################################

And when I run the validate-db-driver i get build failed with this error:
BUILD FAILED
C:\WebSphere\PortalServer\base\wp.db.impl\config\includes\wp.db.impl_cfg.xml:659
: The following error occurred while executing this line:
C:\WebSphere\PortalServer\base\wp.db.impl\config\includes\wp.db.impl_cfg.xml:665
: ERROR: Validate DbDriver: The release.DbDriver: COM.ibm.db2.jdbc.app.DB2Driver
 could not be found.


In the configTrace.log this error shows up:

 [sqlproc] action: validate-db-driver
  [sqlproc] _________________________________________________________
  [sqlproc] DbDomain: release
  [sqlproc] Could not load driver
  [sqlproc] java.sql.SQLException: java.lang.UnsatisfiedLinkError: db2jdbc64 (Not found in java.library.path)
  [sqlproc]       at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
  [sqlproc]       at java.lang.Class.newInstanceImpl(Native Method)
  [sqlproc]       at java.lang.Class.newInstance(Class.java:1328)
  [sqlproc]       at com.ibm.wps.config.SqlProcessor.process(SqlProcessor.java:169)
  [sqlproc]       at com.ibm.wps.config.SqlProcessor.process(SqlProcessor.java:148)
  [sqlproc]       at com.ibm.wps.config.SqlProcessorTask.validateDbDriver(SqlProcessorTask.java:756)
  [sqlproc]       at com.ibm.wps.config.SqlProcessorTask.execute(SqlProcessorTask.java:227)
  [sqlproc]       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [sqlproc]       at org.apache.tools.ant.Task.perform(Task.java:364)
  [sqlproc]       at org.apache.tools.ant.Target.execute(Target.java:341)
  [sqlproc]       at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [sqlproc]       at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [sqlproc]       at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
  [sqlproc]       at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
  [sqlproc]       at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
  [sqlproc]       at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
  [sqlproc]       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [sqlproc]       at org.apache.tools.ant.Task.perform(Task.java:364)
  [sqlproc]       at com.ibm.wps.config.ForTask.execute(ForTask.java:56)
  [sqlproc]       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [sqlproc]       at org.apache.tools.ant.Task.perform(Task.java:364)
  [sqlproc]       at org.apache.tools.ant.Target.execute(Target.java:341)
  [sqlproc]       at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [sqlproc]       at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [sqlproc]       at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
  [sqlproc]       at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
  [sqlproc]       at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
  [sqlproc]       at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [sqlproc]       at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [sqlproc]       at org.apache.tools.ant.Main.start(Main.java:150)
  [sqlproc]       at com.ibm.wps.config.ConfigEngine.process(ConfigEngine.java:861)
  [sqlproc]       at com.ibm.wps.config.ConfigEngine.main(ConfigEngine.java:236)
  [sqlproc]       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [sqlproc]       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
  [sqlproc]       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [sqlproc]       at java.lang.reflect.Method.invoke(Method.java:618)
  [sqlproc]       at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:263)
  [sqlproc]       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [sqlproc]       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
  [sqlproc]       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [sqlproc]       at java.lang.reflect.Method.invoke(Method.java:618)
  [sqlproc]       at com.ibm.wps.config.launch.WpsConfigLauncher.process(WpsConfigLauncher.java:243)
  [sqlproc]       at com.ibm.wps.config.launch.WpsConfigLauncher.main(WpsConfigLauncher.java:459)
  [sqlproc] (ErrCode=0, SqlState=null)
  [sqlproc] _________________________________________________________
  [sqlproc] Ant Database Properties:

  [sqlproc] DbDomain specific settings (release):
  [sqlproc] release.DbType     = db2
  [sqlproc] release.DbUrl      = jdbc:db2:release
  [sqlproc] release.DbName     = release
  [sqlproc] release.DbSchema   = release
  [sqlproc] release.DbUser     = db2admin
  [sqlproc] release.DbPassword = PASSWORD_REMOVED

  [sqlproc] DbType specific settings (db2):
  [sqlproc] db2.DbDriver   = COM.ibm.db2.jdbc.app.DB2Driver
  [sqlproc] db2.DbLibrary  = C:\IBM\SQLLIB\java\db2java.zip
  [sqlproc] _________________________________________________________

  [sqlproc] Please check if the file(s):
  [sqlproc] C:\IBM\SQLLIB\java\db2java.zip
  [sqlproc] contain(s) the class file COM.ibm.db2.jdbc.app.DB2Driver

  [sqlproc] _________________________________________________________
Target finished: action-validate-database-driver-dbdomain
Target finished: validate-database-drive



Sorry for the lengthy question :(

PS
I have checked that the file exists like it asks me too. I know that on the Unix machine that I am also setting up it had to do with the user rights as in this thec note from IBM (http://www-01.ibm.com/support/docview.wss?rs=688&context=SSHRKX&dc=DB520&dc=DB560&uid=swg21312990&loc=en_US&cs=UTF-8&lang=en&rss=ct688websphere)


0
sashadelenn
Asked:
sashadelenn
  • 6
  • 3
  • 2
1 Solution
 
momi_sabagCommented:
what happens if you copy the db2java.zip file to webshpere's jar directory?
0
 
sashadelennAuthor Commented:
you mean in C:\WebSphere\PortalServer\shared\app folder?
Do you think I have to change the link in the wkplc file too?
0
 
momi_sabagCommented:
no
just wondering what happens if you copy the zip file to the directory where websphere keeps all it's jar files
this way it should find the file and work
just want to be sure that this is the problem
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
sashadelennAuthor Commented:
Ah I tried to run the same task again after i copied in the *.zip file. But It still comes out with the same error. I might add I am running websphere app/portal server 6.1.0.1.
0
 
giltjrCommented:
The IBM driver is actually two files.  In addition to the db2java.zip file I think you need the db2jcc.jar file  Both need to be in the class path.

Also, is DB2 running on the same server as WebSphere?  You are using the type 2 driver which IIRC requires that WAS and DB2 be running on the same server.  If DB2 is on a different server you need to use the type 4 driver.
0
 
sashadelennAuthor Commented:
I run a db2 client on the same server as websphere. I am using a type 2 driver yes. I have set up remote db and i can connect to them. In windows(server2003 64 bit), how do you prpopuse i set up the env. varibales correctly. I cant find in the documentation that this has to be done. Does this not install itself at installation??
0
 
sashadelennAuthor Commented:
Btw, just reading your answer again giltjr and I was woundering one thing. You said that if the actual db2 server is on a different machine.. I need to use type4 driver. So as in portal 6.0 you cannot connect to remote db using type 2 drivers anymore? This is confusing.
0
 
giltjrCommented:
This gets down to what you are really connecting to and this is also based on my understanding of what DB2 development has told us.

If the definition of your data source points to a remote db2, then you should be using the type 4 connector.

If the definition of your data source points to a local DB2 (either server or client) that then "redirects" the requests to a remote DB2, then you can use the type 2 connector because from the drivers point of view the DB2 connection is local.


We use the type 4 JDBC driver and go directly to the database server, we do not have DB2 client installed on the WebSphere server.  
0
 
sashadelennAuthor Commented:
I am now trying to use type 4 driver. (way better ! :)) thank you.
0
 
giltjrCommented:
Hope it works for you.  Just a quick note, make sure you get the most current JDBC driver that works with your level of DB2 on z/OS.  Especially if you are planning on taking advantage of Parallel Sysplex in a DB2 data sharing enviroment.   We have found a few issues with this.
0
 
sashadelennAuthor Commented:
Thank you for the tip!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now