cancel
Showing results for 
Search instead for 
Did you mean: 
khayati
Pilgrim

No Suitable driver found error in custom code

Hi
I have a custom code which is using a java.sql.getConnection menthod() to call db2 connection .Wwhile using this method i m gettng No suitable driver found error.My installer is using the Java 142 which is sucessfully used by my ISMP installer
Can any pone help?
Is my IA taking some internal java with it.
The log file shows the system java only
Labels (1)
0 Kudos
5 Replies
RobertDickau
Pilgrim

Re: No Suitable driver found error in custom code

I don't have first-hand experience with this, but what did the working ISMP code look like? What does the equivalent IA custom code look like?
0 Kudos
khayati
Pilgrim

Re: No Suitable driver found error in custom code

well the menthod which is actually throwing this exception is actually the sql java method to get the connection and this inturns gets called in my methos
0 Kudos
khayati
Pilgrim

Re: No Suitable driver found error in custom code

Can you tell me which java is used while trying to make a connection to DB2.Actually i have set my Java_home path and haev included the installable as "Dont install the VM".so by default it should as is picking my JAVA_HOME path.But dnt know y when creating a connection with DB it throws "no suitable driver excpetion".
All appl are running jst fyn with this JAVA_HOME and have been using DB2.My guess is tht that IA might be intermigling with the system's java or something is rrestricting to access DB2.
0 Kudos
purcellk24
Pilgrim

Re: No Suitable driver found error in custom code

In your call to execute the custom code, make sure you have your db2 driver jar file listed as a dependency.
0 Kudos
Highlighted
khayati
Pilgrim

Re: No Suitable driver found error in custom code

Hi Thanks for the reply...I think i was missing this key thing .Do i have to include IA specific DB2 Drivers ?Because i used the drivers which my application is using and also as mentioned by u ,included in my code....but stil i m facing this issue [Smiley Sad].Its been too long since i m stuck with this problem and not able to find the workaround for this .

With this effect i changed the drivers my application was using from Type 2 -> Type 4 and executed my application but not i am running into diff set of exception - > com.ibm.db2.jcc.b.SqlException: IO Exception opening socket to server sdwbrh9.in.ibm.com on port 60001. The DB2 Server may be down.
at com.ibm.db2.jcc.a.a.(a.java:137)
at com.ibm.db2.jcc.a.b.a(b.java:1542)
at com.ibm.db2.jcc.b.o.(o.java:795)
at com.ibm.db2.jcc.a.b.(b.java:298)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:162)
at java.sql.DriverManager.getConnection(DriverManager.java:539)
at java.sql.DriverManager.getConnection(DriverManager.java:189)
at com.ibm.eReview.server.install.InstallType.getConnection1(InstallType.java:187)
at com.ibm.eReview.server.install.InstallType.getConnection(InstallType.java:107)
at com.ibm.eReview.server.install.InstallType.install(InstallType.java:46)
at com.zerog.ia.installer.actions.CustomAction.installSelf(DashoA10*..)
at ZeroGab8.run(DashoA10*..)





I have chlked the db2port and is set properly.What should i do ?
0 Kudos