Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (4)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

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

View solution in original post

13 Replies
Anonymous
Not applicable
Author

Hi,

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

Best regards

Sabrina

Anonymous
Not applicable
Author

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

TRF
Champion II
Champion II

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

TRF
Champion II
Champion II

Is the SQL user authorized to drop the table? 

Anonymous
Not applicable
Author

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

TRF
Champion II
Champion II

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

Anonymous
Not applicable
Author

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

TRF
Champion II
Champion II

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

Anonymous
Not applicable
Author

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