Four Stars

tCreateTable ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver with both JDK1.7 and JDK 1.8

I'm trying to use tCreateTable to create table but get below error. I tried use JDK 1.7 and UCanAccess, but still get the same error. Please help!

[statistics] connected
Exception in component tCreateTable_1
java.lang.RuntimeException: Creating table failed
at local_project.test_0_1.test.tCreateTable_1Process(test.java:348)
at local_project.test_0_1.test.runJobInTOS(test.java:590)
at local_project.test_0_1.test.main(test.java:447)
Caused by: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at local_project.test_0_1.test.tCreateTable_1Process(test.java:320)
... 2 more

  • Data Integration
13 REPLIES
Moderator

Re: tCreateTable ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver with both JDK1.7 and JDK 1.8

Hi,

Which DB are you using? Does your table name already exist in this database?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Hello together,

 

I have a problem with tCreateTable, if the table already exists it should be droped but instead I get the error :

 

Exception in component tCreateTable_1 (****)
java.lang.RuntimeException: Creating table failed
    ..
Caused by: java.sql.SQLException: There is already an object named 'IMP_LAGERBESTAND' in the database.
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
    at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
    at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)

 

The settings are as follow : Table Action  "Drop table if exists ans create"

I'm using  TOS V6.4.1 and my database is MSQL  Express 2017

Thank you a lot!!

Eleven Stars TRF
Eleven Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Are you sure the SQL user is authorized to drop the table? 


TRF
Eleven Stars TRF
Eleven Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Is the SQL user authorized to drop the table? 


TRF
Five Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Yes the User is authorized to drop he table, I check it with MSQL Management Studio and it is possible

Eleven Stars TRF
Eleven Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Any other object (primary key or something else) already existing somewhere in the database with the same name?


TRF
Five Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

I've looked for that and there are no other objects with the same name also primary keys

Eleven Stars TRF
Eleven Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

What if you try to drop the table first (using tMSSQLRow) then create it (using tCreateTable)?


TRF
Five Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Yes, We did it already and it was working.

First we drop the table manually with the same user from SQL Server management studio

Then we ran the job and it was creating the table without errors

After that running the same job again, we got the same problem

 

Do you have some other ideas?

Thanks!


TRF wrote:

What if you try to drop the table first (using tMSSQLRow) then create it (using tCreateTable)?


 

Five Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Ok, sorry. I will do that. Ignore the first comment


TRF wrote:

What if you try to drop the table first (using tMSSQLRow) then create it (using tCreateTable)?



 

Eleven Stars TRF
Eleven Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Hum... did you try to drop/create the table using tMSSQLOutput component?

TRF
Five Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Thank you a lot TRF,

the problem was in the user credeltials as you commented in the first answer. 

Now it works without any problem.

 

Tanks!!!

Eleven Stars TRF
Eleven Stars

Re: tCreateTable Exception in component tCreateTable_1 (**tablename**) java.lang.RuntimeException: Creating table failed

Great!

Don't forget to select the answer which solved the topic - Kudos also appreciated.


TRF