Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
GP1608113771
Contributor II
Contributor II

Regarding Java.lang.UnsupportedClassVersionError

Can anyone please help me with this issue. I have installed the Talend studio (Talend Data Fabric 7.3.1) successfully. But when i tried connecting to Azure SQL database using tDBInput component , it showed me an error that jar "mssql-jdbc.jar" is missing. Since the download button is disabled.

Please see the below snapshot showing that download button is disabled

0693p00000AbdhZAAR.png

I manually downloaded the jar "mssql-jdbc-8.4.0.jre11" and pointed it to the component. When i executed my Talend job it showed following error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 55.0 at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:315) at psc_co_biopharm.test_job_0_1.Test_job.tDBInput_2Process(Test_job.java:727) at psc_co_biopharm.test_job_0_1.Test_job.runJobInTOS(Test_job.java:1458) at psc_co_biopharm.test_job_0_1.Test_job.main(Test_job.java:1240)

So, i tried a work around . Used tlibraryload component to import the jar "mssql-jdbc-8.2.1jre11". It worked and i was able to query the Azure SQL database.

0693p00000AbdheAAB.png

But using tlibraryload is not the best practice, could someone please tell me how to point this version of jar "mssql-jdbc-8.2.1jre11" directly to component.

I tried loading this jre via windows->show_view->Modules. But it showing that "This module is already installed with the maven URI"

0693p00000AbdhjAAB.png

Kindly help me and advise how to point this version of jar "mssql-jdbc-8.2.1jre11" directly to component.

Labels (3)
1 Solution

Accepted Solutions
GP1608113771
Contributor II
Contributor II
Author

Thanks Prakhar.

The issue got resolved its working in TMC as well. "The Network Adapter could not establish the connection." issue was because of pointing the job to a wrong Remote engine.

 

I got to know the correct Remote engine from Admin team and ran the job. It worked 🙂

 

Thanks much for your help.

View solution in original post

12 Replies
Anonymous
Not applicable

Hello,

Error is because the jar has already been installed before in the maven repository, so it won't deploy it again.

For now, maybe the best is to:

- try to install module / detect => will show error as you mentioned.

- Use the copy/paste button near the text of the maven URI

- Select "Find by Maven URI" : Paste the text

- Detect / OK => no problem

Let us know if it works.

Best regards

Sabrina

GP1608113771
Contributor II
Contributor II
Author

Hi Sabrina,

 

Thanks Much for your reply.

 

I can find the copy/paste button near the text of the maven URI as highlighted in the below screenshot. But i couldn't find "Find by Maven URI" to paste the copied text.

 

Kindly correct me, if i miss anything here.

 

0693p00000AbetcAAB.png 

Kind Regards,

Gopinath P

Anonymous
Not applicable

Hello,

Please have a look at this online documentation about: TalendHelpCenter: Editing user routine libraries

Best regards

Sabrina

 

GP1608113771
Contributor II
Contributor II
Author

Thanks Sabrina, the link is very useful. I really appreciate your help on this.

 

I tried the following approach and it worked.

 

The mistake i have done is , At the first place itself i should have downloaded the "mssql-jdbc-8.2.1jre11" jar and pointed it to the component, instead i have downloaded "mssql-jdbc-9.1jre" and pointed to the component. That's a terrible mistake.

 

Since i already downloaded different version of jar and pointed to the component at first place, it's not accepting the correct version of jar "mssql-jdbc-8.2.1jre11" which i am pointing now.

 

So, i deleted the old jar from the following folder and then tried importing the correct version of jar. It worked for me.

 

Windows(c)->Talend_Studio->Configuration->.m2->repository->org->Talend->Libraries

 

Under this libraries folder, i deleted the MySQL directory

 

Then i tried importing the jar via windows->show_view->Modules it worked. 🙂

 

 

Anonymous
Not applicable

Hello,

Great it works. Thanks for sharing it with us.

Best regards

Sabrina

GP1608113771
Contributor II
Contributor II
Author

Hi Sabrina,

 

The error got resolved and working fine in the Talend studio which is installed in my VDI.

 

But when i published the job to cloud and executed in Talend Management Console , it's failing with the same error. Could you please help me on this.

 

It is working fine in Talend studio with out any errors but failing when i run it in TMC. Kindly help me on this please.

 

Please find the below mentioned error details which i got in TMC.

 

WARN | 2021-01-06T21:46:32.053+0530 | org.talend.ipaas.rt.deployment-agent:2.9.2 | 5ff5e1a462ad055ea9334446/1.1:

Step 1ce6c019-66e1-4735-bbbf-64d8ffe87fc1 failed with code -1 and error Job stopped with errors or unable to run.

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver has been

 compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Anonymous
Not applicable

Hello,

Are you referring to Remote Engine/Cloud engine?

It would be great if you could create a support case on talend support portal so that we could give you a remote assistance through support cycle with priority.

Best regards

Sabrina

 

Prakhar1
Creator III
Creator III

Are you using the same java version in TMC and Studio ?

 

GP1608113771
Contributor II
Contributor II
Author

Thanks much Prakhar and Sabrina for your help.

 

@prakhar dubey​ 

As you mentioned the java version in TMC seems to be bit different , so i tried importing 7.2.2 version of jar "mssql-jdbc-7.2.2.jre8" , With this version of jar the job is running in Talend studio and in TMC as well the error got resolved.

 

Now the TMC is throwing the following different error

 

Exception in component tDBInput_1 (JOB_LND2STG) java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection.

 

The job is running in Talend studio but in TMC only its failing with above error. I believe it is some firewall issue. Please correct me , if i am wrong here.

 

If it's a firewall issue, i will check with Network team to resolve this error.

 

Thanks much Prakhar. I really appreciate your help on this