The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
Hi team
Following the instructions in
"Authoring Jasper Report Using ReportTemplate"
At step 12 Jasper Studio compiles some Java using class files exported from Windchill 12.0.2 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 changed the Jasper project to use Java11 but this error still occurs.
The PTC documented steps don't seem to cover the steps needed to make the Java versions compatible. What is needed to get this working?
thanks -- Rick
"Java 8 is being used by Windchill instead of Java 11": https://www.ptc.com/en/support/article/CS332734
Hi Vladimir
Thanks for the article.
I am seeing the opposite problem: the Windchill exporter is using Java11, which causes problems when I use JasperStudio. I will try using Java8 for the Windchill exporter, that might work.
cheers -- Rick
Hi Rick,
Tell us later what you will get.
Vladimir:
I tried to export from Windchill using Java8 but the exporter was compiled with java11:
$ JAVA_HOME=/opt/ptc/Windchill_12/Corretto8 /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java com.ptc.util.wbr.export.ExportDataSource reportTemplate -u e411842 -r 25
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" 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
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
Can PTC provide the exporter ExportDataSource compiled by Java8?
thanks
Rick
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
So we need to find a way in Windchill to export using Java8.
Could PTC staff help please?
thanks -- Rick
Try open a support "Case", here: https://support.ptc.com/apps/case_logger_viewer/cs/auth/ssl/log
They make you jump through hoops on that form. I entered all my info then they asked for our SCN. I have last years SCN, which they reject so I guess I will have to re-enter the information on Monday. Oh well ..
Silly me, I thought perhaps I could find a Java8 version of ExportDataSource.class in our old WC 11.0 server. But no, it is new with WC12.
Maybe I will decompile it and re-compile it for Java8...
Article CS336353 "How to install & configure Jasper Report Studio with Windchill PDMLink" (link below) says you should start with ordinary Eclipse then install the Jaspersoft Studio plugin.
We did something different because we had not seen that article. We purchased Jaspersoft Studio, which comes packaged as a standalone app which is, when you start it, based on Eclipse. In its default configuration it runs Java8, giving me the problems described previously.
I have tried to configure its .ini file to load a Java11 vm without success, maybe I am doing it wrong.
In c:/Users/usrnm/Desktop/TIBCO/Jaspersoft Studio/7.9.0/jaspersoftstudiopro/Jaspersoft Studio Professional.ini :
-vm
features/jre.win32.win32.x86_64.feature_1.8.0.u151/jre/bin
I tried instead:
-vm
C:\Program Files\Amazon Corretto\jdk11.0.10_9\bin\javaw.exe
The log said:
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.jaspersoft.studio [9]
Unresolved requirement: Require-Bundle: com.jaspersoft.studio.properties; bundle-version="7.9.0"; visibility:="reexport"
Why can't it find the studio bundle?
https://www.ptc.com/en/support/article/CS336353
Hello,
I also had same problem with version of the java.
I decided to install an Eclipse and configure it to use the java coreto11 and then install a Jasper Studio Plugin.
And The Eclipse works . Also. there is a bug in Jasper Studio and is necessary to apply a patch.
PTC Article
https://www.ptc.com/support/article/CS354392?source=Case%20Viewer
Jasper Community patch
https://community.jaspersoft.com/jaspersoft-studio/issues/13616#comment-873711
Best Regards
PetrH