• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB2 Connection error

 
Nils Persson
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the following error when I try to run my servlet, trying to connect to a DB2 database.

I have also tried net insted of app.
I use Tomcat 4.
I have the db2java.zip file in my classpath. Does Tomcat have its own classpath?
Should I put something in web.xml or server.xml?
 
Monty Ireland
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My client has had simular errors about a month ago.
Need more information:
What version of java are you using?
What version of jdbc are you using?
What platform is you client running on?
What platform is db2 running on?
I check back in an hour or so?
 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think ur dsn name is not suitable for ur connection.Just u create new dsn name and test it .this is my advice only...
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick fix: rename the .zip to .jar and put it in the [ TOMCAT_HOME ]/common/lib directory.
Yes, Tomcat maintains its own 'classpath' (it actually has multiple ClassLoaders to manage borders between applications) and can automatically load archives. The problem with loading these archives is that it will only load jars and not zip files.
What you should do is rename it .jar and put it in the [ TOMCAT_HOME ]/webapps/[ CONTEXT ]/web-inf/lib directory. The difference is that the original fix will make it available to ALL web apps, the second will only make it available to a single web app. The second is the preferred solution.
Dave
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic