Four Stars AB
Four Stars

ClassNotFound Exception trying to guess schema

Hi,

 

I'm running Talend Open Studio 6.4.1 and have an issue when I click the Guess schema button on a MSSQLInput component. The job can connect to the database fine when it runs but when I try to guess the schema of a query lookup I get an error java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver According to the modules view the jtds module is installed. 

 

I've seen a few similar posts explaining that I should copy the jtds library into the lib folder however this folder is cleaned out when I relaunch open studio. I can also see from the class path that the jtds library is not being included when the guess schema button is pressed. 

 

Can you advise me how to address this?

 

Thanks

4 REPLIES
Moderator

Re: ClassNotFound Exception trying to guess schema

Hello,

Your DB connection is configured to use "JTDS"? What's jtds module and MSSQL DB version you are using?

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.
Four Stars

Re: ClassNotFound Exception trying to guess schema

Hi,

 

I ran into the same issue. The situation is:

The Connection to the MS SQL Server is defined in metadata. For this Database I have to use the MS SQL Driver. The JTDS is (for whatever reason) not working. When I'm using this connection I'm perfectly able to fetch the rows as long as I define the schema manually. As soon as I'm creating a tMSSQLInput and I try to guess the schema, Talend Studio is using the jtds driver desprite of what is configured. This results in in a ClassNotFoundException:

org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaProcess$1: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver

        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaProcess.run(GuessSchemaProcess.java:410)
        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.runShadowProcess(GuessSchemaController.java:349)
        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.access$1(GuessSchemaController.java:333)
        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController$4$1.run(GuessSchemaController.java:822)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3983)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:175)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:390)
        at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:527)
        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.useMockJob(GuessSchemaController.java:814)
        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.createButtonCommand(GuessSchemaController.java:222)
        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController.access$0(GuessSchemaController.java:212)
        at org.talend.designer.core.ui.editor.properties.controllers.GuessSchemaController$1.widgetSelected(GuessSchemaController.java:197)

 

For me the expected behaviour would be that Talend Studio is using the driver which has been selected in the connection to guess the schema.

Four Stars

Re: ClassNotFound Exception trying to guess schema

Hello, I'm having this issue, Im using jtds.1.3.1 and TOS_DI 6.4.1.20170623_1246

Moderator

Re: ClassNotFound Exception trying to guess schema

Hello,

Could you please try to uninstall and re-install TOS, and then installed all the modules again to see if it works?

Please make sure that you have copied the ntlmauth.dll into the usual folders.

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.