Bug 61721 - can't open a script with Java 9
Summary: can't open a script with Java 9
Status: RESOLVED DUPLICATE of bug 61529
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-03 20:33 UTC by Alex Podelko
Modified: 2017-11-08 21:13 UTC (History)
1 user (show)



Attachments
the jmeter log (9.09 KB, text/plain)
2017-11-03 20:33 UTC, Alex Podelko
Details
one of the scripts I tried to open (364.40 KB, application/xml)
2017-11-03 20:36 UTC, Alex Podelko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Podelko 2017-11-03 20:33:05 UTC
Created attachment 35480 [details]
the jmeter log

Can't open a script in apache-jmeter-r1814153 with Java 9 on Windows - getting:


2017-11-03 14:49:47,161 INFO o.a.j.g.a.Load: Loading file: C:\projects\JMeter\dmcs_171_modified.jmx
2017-11-03 14:49:47,162 INFO o.a.j.s.FileServer: Set new base='C:\projects\JMeter'
2017-11-03 14:49:47,339 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.ExceptionInInitializerError: null
	at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:989) ~[xstream-1.4.10.jar:1.4.10]
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:592) ~[xstream-1.4.10.jar:1.4.10]
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:514) ~[xstream-1.4.10.jar:1.4.10]
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:483) ~[xstream-1.4.10.jar:1.4.10]
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:429) ~[xstream-1.4.10.jar:1.4.10]
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:382) ~[xstream-1.4.10.jar:1.4.10]
	at org.apache.jmeter.save.SaveService$XStreamWrapper.<init>(SaveService.java:82) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.save.SaveService$XStreamWrapper.<init>(SaveService.java:80) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.save.SaveService.<clinit>(SaveService.java:113) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:130) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:102) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:89) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:45) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) ~[ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) ~[ApacheJMeter_core.jar:r1814153]
	at java.awt.event.InvocationEvent.dispatch(Unknown Source) ~[?:?]
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:?]
	at java.awt.EventQueue.access$500(Unknown Source) ~[?:?]
	at java.awt.EventQueue$3.run(Unknown Source) ~[?:?]
	at java.awt.EventQueue$3.run(Unknown Source) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:?]
	at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:?]
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:?]
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:?]
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:?]
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:?]
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:?]
	at java.awt.EventDispatchThread.run(Unknown Source) [?:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @554e218
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source) ~[?:?]
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source) ~[?:?]
	at java.lang.reflect.Field.checkCanSetAccessible(Unknown Source) ~[?:?]
	at java.lang.reflect.Field.setAccessible(Unknown Source) ~[?:?]
	at com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:40) ~[xstream-1.4.10.jar:1.4.10]
	at com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50) ~[xstream-1.4.10.jar:1.4.10]
	... 29 more


java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+163)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+163, mixed mode)
Comment 1 Alex Podelko 2017-11-03 20:36:46 UTC
Created attachment 35481 [details]
one of the scripts I tried to open
Comment 2 Philippe Mouawad 2017-11-03 20:49:27 UTC
Hello,
It seems you may be using an Early access version of Jdk.

Can you try using last version of JDK 9 ?

Thanks
Comment 3 Philippe Mouawad 2017-11-03 21:05:03 UTC
I also notice an issue I don't reproduce with more recent version of Java:

2017-11-03 14:49:12,032 WARN o.a.j.JMeter: Could not set LAF to: Darcula
java.lang.ClassNotFoundException: Darcula
	at java.net.URLClassLoader.findClass(Unknown Source) ~[?:?]
	at java.lang.ClassLoader.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 javax.swing.SwingUtilities.loadSystemClass(Unknown Source) ~[?:?]
	at javax.swing.UIManager.setLookAndFeel(Unknown Source) ~[?:?]
	at org.apache.jmeter.JMeter.startGui(JMeter.java:358) [ApacheJMeter_core.jar:r1814153]
	at org.apache.jmeter.JMeter.start(JMeter.java:519) [ApacheJMeter_core.jar:r1814153]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at org.apache.jmeter.NewDriver.main(NewDriver.java:248) [ApacheJMeter.jar:r1814153]


Anyway I don't reproduce your issue on Java 9+181
Comment 4 Alex Podelko 2017-11-05 02:37:21 UTC
Yes, with the latest version:

>java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

it looks like I can open my script. However it shows some warnings when starts:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/apache-jmeter-r1814153/lib/groovy-all-2.4.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Comment 5 Philippe Mouawad 2017-11-05 10:30:32 UTC
Hello Alexander,
Thanks for feedback.
The issues you mention are identified and are in groovy current version.

Is the darcula theme working also now for you ?


Thanks
Comment 6 Philippe Mouawad 2017-11-08 21:13:48 UTC

*** This bug has been marked as a duplicate of bug 61529 ***