We help IT Professionals succeed at work.

Websphere- DB2 action: validate-db-driver fails

sashadelenn
sashadelenn asked
on
Medium Priority
2,415 Views
Last Modified: 2013-12-10
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)


Comment
Watch Question

what happens if you copy the db2java.zip file to webshpere's jar directory?

Author

Commented:
you mean in C:\WebSphere\PortalServer\shared\app folder?
Do you think I have to change the link in the wkplc file too?
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

Author

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.
CERTIFIED EXPERT
Top Expert 2014

Commented:
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.

Author

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??

Author

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.
CERTIFIED EXPERT
Top Expert 2014
Commented:
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.  

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
I am now trying to use type 4 driver. (way better ! :)) thank you.
CERTIFIED EXPERT
Top Expert 2014

Commented:
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.

Author

Commented:
Thank you for the tip!!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.