Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.sql.SQLException: No suitable driver (HOT)

88 views
Skip to first unread message

brobbsnet

unread,
Oct 21, 2010, 5:21:49 PM10/21/10
to
I have TDI6.1.1 fixpack 9 on win xp.
We have an in house oracle custom adapter developed and works ok in
testing environment.

The issue we have right now is when we run the search assemblyline at
runtime we try to pass
database url to the jdbc connector like this:


var jdbc = thisConnector.getConnector();


jdbc.setParam("jdbcSource",paramValue); //change the jdbc url at run
time


jdbc.setParam("jdbcLogin",paramValue2); ////change the userid at run
time


jdbc.setParam("jdbcPassword", paramValue1); ////change the passwd at
run time


jdbc.setParam("jdbcDriver", "oracle.jdbc.driver.OracleDriver"); //
set
the driver

//jdbc.initialize(null);

we Used the re-initialize drop down for the connector when the
parameter changes.

at this point , the oracle.jar is in the classpath: , it is found in
this directories:
C:\ProgramXFiles\IBM\libs;C:\ProgramXFiles\IBM; C:\ProgramXFiles\IBM
\jars , C:\ProgramXFiles\IBM\jars\3rdparty , C:\ProgramXFiles\IBM\jars
\3rdparty\others etc...


The question is why are we getting :

java.sql.SQLException: No suitable driver
16:56:15 [Test] CTGDIS495I handleException , get,
java.sql.SQLException: No suitable driver
INFO [AssemblyLines/Test Connection] AssemblyLine.AssemblyLines/Test
Connection.520757002 16:56:15,990 - [Test] CTGDIS495I
handleException , get, java.sql.SQLException: No suitable driver
16:56:15 [Test] CTGDIS810E handleException - cannot handle
exception , get
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:186)
at com.ibm.di.connector.JDBCConnector.initialize(Unknown Source)
at com.ibm.di.server.AssemblyLineComponent.doInitialize(Unknown
Source)
at com.ibm.di.server.AssemblyLineComponent.checkInitialize(Unknown
Source)
at com.ibm.di.server.AssemblyLineComponent.getnext(Unknown Source)
at com.ibm.di.server.AssemblyLine.msGetNextIteratorEntry(Unknown
Source)
at com.ibm.di.server.AssemblyLine.executeMainStep(Unknown Source)

we have the oracle.jar in every possible place C:\ProgramXFiles\IBM
\jars , C:\ProgramXFiles\IBM\jars\3rdparty , C:\ProgramXFiles\IBM\jars
\3rdparty\others etc...

We also modified the start scripts to point to the oracle.jar as well.
Nothing seems to work.

Any insights ? ?


Command Line Parameters: //runtime classpath
[javaw.exe, -classpath, C:\ProgramXFiles\IBM\IDILoader.jar, -
Dlog4j.configuration=file:///C:\ProgramXFiles\IBM/etc/
executetask.properties, -Dos.name=Windows XP, -Djava.library.path=C:
\ProgramXFiles\IBM\jvm\jre\bin;.;C:\ProgramXFiles\IBM\jvm\jre\bin;C:
\ProgramXFiles\IBM\libs;C:\ProgramXFiles\IBM;

Marek

unread,
Oct 22, 2010, 7:44:39 AM10/22/10
to

How is it in test environment that it works? It's not parametrized?

Which version of oracle driver do you have?

I'm laborating with this for two hours and getting the same error. :(

Do you have the jdbc url set correctly for oracle?

Marek

unread,
Oct 22, 2010, 9:52:34 AM10/22/10
to

ok I simulated it on Oracle 10g Express Edition.

I got these errors when I haven't had the correct jdbc url, don't know
why it is throwing driver not found.

I checked the driver for my release so it was Oracle Database 10g
Release 2 (10.2.0.5) JDBC Drivers - so the jar was ojdbc14.jar

I put it in the /jars subdirectory.

I enabled the hook before initialize and put there the code similar to
yours:

var jdbc = thisConnector.getConnector();
jdbc.setParam("jdbcSource","jdbc:oracle:thin:@192.168.33.104:1521:XE");
jdbc.setParam("jdbcLogin","system");
jdbc.setParam("jdbcPassword", "***");


jdbc.setParam("jdbcDriver", "oracle.jdbc.driver.OracleDriver");

jdbc.setParam("jdbcTable", "testtable");

and what is important I set the initialization on - "only when used"
so it will initialize when it is used only and then terminated.

I hope it helps!

Cheers from Prague ;)

brobbsnet

unread,
Oct 22, 2010, 12:11:47 PM10/22/10
to
> Cheers from Prague ;)- Hide quoted text -
>
> - Show quoted text -


When all the jdbc parameters are applied correctly then it fails when
its starting to initialize the connector.

2010-10-22 11:57:55,465 INFO [AssemblyLine.AssemblyLines/Reconcile
Accounts.1571708334] - >>>> COMPLETED JDBC SETTINGS.
11:57:55 [Search] CTGDIS044I Initializing Connector.
2010-10-22 11:57:55,465 INFO [AssemblyLine.AssemblyLines/Reconcile
Accounts.1571708334] - [Search] CTGDIS044I Initializing Connector.
11:57:55 [Search] CTGDIS495I handleException , initialize,
java.sql.SQLException: No suitable driver
2010-10-22 11:57:55,481 INFO [AssemblyLine.AssemblyLines/Reconcile
Accounts.1571708334] - [Search] CTGDIS495I handleException ,
initialize, java.sql.SQLException: No suitable driver

I have both jar files ojdbc14_g.jar and oracle.jar in my classpath.

Still exception not going away.

Marek

unread,
Oct 23, 2010, 7:17:08 AM10/23/10
to

Maybe that's the problem. I had only one jar there.

Eddie Hartman

unread,
Oct 23, 2010, 10:38:12 AM10/23/10
to
Have you tried dropping the jars under TDI folders,
like %TDI_INSTALLDIR%/jars or under the
jvm/jre/lib/ext?

Or you can define your own CustomJars folder under
your Solution Directory, then edit the solution.properties
to tell TDI to use it:

com.ibm.di.userjars=CustomJars

This will make it relative to your SolDir. Under here you
can make sub-folders for each set of jars/libs.

Let me know if this helps.
-Eddie

0 new messages