JasperStudio dataAdapter uses JDK8, JDK11 is needed

0

Hi team

I have some class files  exported from PTC Windchill 12.0.2. (Windchill used Java11).

Jasper Studio data adapter seems to use JDK8 to compiles some Java using Windchill's exported class files and gives this error:

java.lang.UnsupportedClassVersionError: com/ptc/wbr/datasource/providers/Site_PartReportWNCProvider 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
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at net.sf.jasperreports.eclipse.classpath.JavaProjectClassLoader.findClass(JavaProjectClassLoader.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:190)
at net.sf.jasperreports.data.provider.DataSourceProviderDataAdapterService.getProvider(DataSourceProviderDataAdapterService.java:92)
at com.jaspersoft.studio.data.jrdsprovider.JrdsProviderDataAdapterDescriptor.getFieldProvider(JrdsProviderDataAdapterDescriptor.java:70)
at com.jaspersoft.studio.data.jrdsprovider.JrdsProviderDataAdapterDescriptor.getFields(JrdsProviderDataAdapterDescriptor.java:55)

 

It looks as if Jasper is compiling using Java8, but the classes exported from Windchill are Java11. I have attempted to change the Jasper project to use Jdk11 but it still seems to be using JDK8.

Java11 is backwards compatible, but Jdk8 does not accept jdk11 class files.

How can I configure the dataAdapter to use Java11? What is needed to get this working?

thanks -- Rick

richard.w.leir's picture
Joined: Jul 26 2021 - 10:09am
Last seen: 1 month 2 weeks ago

4 Answers:

0

The Community Edition - Jaspersoft Studio version 6.15.0 (2020-10-07) readme file contains : 
--------------------------------------------

- RCP stand-alone version now ships AdoptOpenJDK JRE 11.0.8

- Improved Java 11 support

Hence ensure you are using at least this version.

Also refer to:

https://community.jaspersoft.com/questions/1190481/jaspersoft-studio-usi...

vchiem's picture
24011
Joined: May 1 2017 - 5:33pm
Last seen: 2 hours 41 min ago
0

Hi vchiem

Yes, my version has Java11. And I have been all through the preferences, checking Java versions. In one setting it was Java8 and I changed it to Java11. But the component which creates the data adaptor still  runs Java8 despite all my efforts. I cannot find any preferences screen for that component. Where is it?

thanks

Rick

richard.w.leir's picture
Joined: Jul 26 2021 - 10:09am
Last seen: 1 month 2 weeks ago
0

Another workaround would be if PTC Windchill was able to export using Java8. I tried that. The PTC exporter program was compiled using Java11 so I cannot run it using Java8 

  java.lang.UnsupportedClassVersionError: com/ptc/util/wbr/export/ExportDataSource 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

Now my big question is: in Jasper Studio 7.9.0 , how can I configure the execution environment for the dataAdaptor to run using Java11. Some help from Jaspersoft staff would be greatly appreciated!

thanks

Rick

richard.w.leir's picture
Joined: Jul 26 2021 - 10:09am
Last seen: 1 month 2 weeks ago
0

JasperStudio uses Java8 to start, and does not start when this is removed:
C:\Users\username\Desktop\TIBCO\Jaspersoft Studio\7.9.0\jaspersoftstudiopro\features\jre.win32.win32.x86_64.feature_1.8.0.u151

richard.w.leir's picture
Joined: Jul 26 2021 - 10:09am
Last seen: 1 month 2 weeks ago
Feedback