Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315421 - Exception starting ACServer configured for 1.4.2 JRE with security on
Summary: Exception starting ACServer configured for 1.4.2 JRE with security on
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All Windows All
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Mike Reid CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard: closed472
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 12:39 EDT by Alan Haggarty CLA
Modified: 2016-05-05 10:53 EDT (History)
1 user (show)

See Also:


Attachments
Secure AC .class dependencies (3.16 KB, text/plain)
2010-06-03 10:01 EDT, Mike Reid CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Haggarty CLA 2010-06-02 12:39:32 EDT
Build Identifier: 

When I configure the ACServer on EM64T W2K3 to use Sun JRE 1.4.2 and security on I get an exception when I try to start it.

Reproducible: Always

Steps to Reproduce:
1. Run SetConfig.bat
2. Configure for 1.4.2 JRE and security on 
3. Run ACServer
Comment 1 Alan Haggarty CLA 2010-06-02 12:40:29 EDT
C:\ractest\rac\bin>SetConfig.bat
Specify the fully qualified path of "javaw.exe" (e.g. c:\jdk1.4\jre\bin\javaw.ex
e):
  Default>"C:\ractest\ibm15_9\jre\bin\javaw.exe" (Press <ENTER> to accept the de
fault value)
  New value>C:\j2sdk1.4.2_14-x64\jre\bin\javaw.exe
Network access mode (ALL=allow any host, LOCAL=allow only this host, CUSTOM=list
 of hosts):
  Default>"ALL" (Press <ENTER> to accept the default value)
  New value>
Security enabled. (true/false):
  Default>"TRUE" (Press <ENTER> to accept the default value)
  New value>
Please enter 'ANY' to grant all users access or 'CUSTOM' to allow a list of user
s:
  Default>"ANY" (Press <ENTER> to accept the default value)
  New value>

C:\ractest\rac\bin>ACServer.exe
java.lang.UnsupportedClassVersionError: org/eclipse/hyades/execution/security/Se
cureServer (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
nativeInit(): Failed. Cannot find Java class: org.eclipse.tptp.platform.agentcon
troller.jsse.SSLNativeBinding
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
java.lang.UnsupportedClassVersionError: org/eclipse/hyades/execution/security/Se
cureServer (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
java.lang.UnsupportedClassVersionError: org/eclipse/tptp/platform/agentcontrolle
r/jsse/SSLNativeBinding (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Error starting transport layers, Agent controller exiting.
See servicelog.log for error report.

For troubleshooting information, type ACServer -help
Comment 2 Alan Haggarty CLA 2010-06-02 12:42:46 EDT
After playing around with this and then trying to reconfig without security in a different console I now get:

  Default>"C:\j2sdk1.4.2_14-x64\jre\bin\javaw.exe" (Press <ENTER> to accept the
default value)
  New value>
java.io.IOException: CreateProcess: C:\j2sdk1.4.2_14-x64\jre\bin\javaw.exe -cp C
:\ractest\rac\plugins\com.ibm.icu_4.2.1.v20100412.jar;..\lib\config.jar;..\lib\c
onfig.nl1.jar;..\lib\config.nl2.jar;..\lib\config.nl2a.jar org.eclipse.tptp.plat
form.agentcontroller.config.GetJavaVersion error=193
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
        at java.lang.Runtime.exec(Runtime.java:591)
        at java.lang.Runtime.exec(Runtime.java:429)
        at java.lang.Runtime.exec(Runtime.java:326)
        at org.eclipse.tptp.platform.agentcontroller.config.TestJvm.jvmVersion(T
estJvm.java:50)
        at org.eclipse.tptp.platform.agentcontroller.config.TestJvm.isSupportedJ
ava(TestJvm.java:22)
        at org.eclipse.tptp.platform.agentcontroller.config.SetConfig.isValidJav
a(SetConfig.java:695)
        at org.eclipse.tptp.platform.agentcontroller.config.SetConfig.promptJava
Path(SetConfig.java:474)
        at org.eclipse.tptp.platform.agentcontroller.config.SetConfig.askUser(Se
tConfig.java:347)
        at org.eclipse.tptp.platform.agentcontroller.config.SetConfigSkeleton.ru
n(SetConfigSkeleton.java:134)
        at org.eclipse.tptp.platform.agentcontroller.config.SetConfig.generateCo
nfig(SetConfig.java:140)
        at org.eclipse.tptp.platform.agentcontroller.config.SetConfig.main(SetCo
nfig.java:88)
ERROR: Minimum JDK version required: 1.4
  New value>
Comment 3 Alan Haggarty CLA 2010-06-02 12:47:54 EDT
I can also reproduce this on Windows XP with either IBM or Sun 1.4.2 JRE
Comment 4 Kathy Chan CLA 2010-06-02 15:22:39 EDT
Alan, is this problem only on EM64T or on IA32 as well?  It seems like you're now getting problem with or without security mode enabled?  I thought you were able to get some JVMPI scenario working with JRE 1.4.2.

Mike, please take a look.
Comment 5 Mike Reid CLA 2010-06-03 10:00:31 EDT
First, a quite note on the CreateProcess exception:

java.io.IOException: CreateProcess: C:\j2sdk1.4.2_14-x64\jre\bin\javaw.exe -cp
C:\ractest\rac\plugins\com.ibm.icu_4.2.1.v20100412.jar;..\lib\config.jar;..\lib\c
onfig.nl1.jar;..\lib\config.nl2.jar;..\lib\config.nl2a.jar org.eclipse.tptp.platform.agentcontroller.config.GetJavaVersion error=193

This is a problem with the javaw.exe file on that system. If you double-click the same file from Windows explorer you get an error saying it is not a valid Win32 executable.

On to the UnsupportedClassVersionError:

Similar to bug 314483, there are additional dependencies the AC loads through the configured JVM. With security enabled there are additional classes that are needed.

Through trial and error, I came upon a list which I have attached to the defect. The list spans the following projects/jars:

 org.eclipse.tptp.platform.agentcontroller(jsse.jar)
 org.eclipse.hyades.execution(hexl.jar)
 org.eclipse.hyades.execution(hexcore.jar)
 org.eclipse.tptp.platform.collection.framework(hcframe.jar)

We either need to roll back the target .class version on these projects, or manually package 1.4 .class files.
Comment 6 Mike Reid CLA 2010-06-03 10:01:40 EDT
Created attachment 170959 [details]
Secure AC .class dependencies
Comment 7 Jonathan West CLA 2010-06-03 12:03:42 EDT
Hi folks,

After discussing with Kathy and Mike, it sounds like the following is a good solution:

With security on:
- The version of Java that is specified to the agent controller will not affect the profile on server case. When an application server launches, it is using its own JVM, and does not invoke the AC's JVM. So we're covered here.
- The 'attach to agent' case is also unaffected, meaning the user can still manually specify our JVMPI profiler arguments to the JVM.
- However, outside of the profile on server case, it is rare that the JVM is fixed to a specific version in a backward non-compatible way. The user is nearly always free to change the JVM, because there is no specific restriction. As the JVM is backwards compatible, specifying a 1.5 JVM is recommended.

With security off:
- The specified JVM version is irrelevant in this scenario. 1.4.2 may be specified without any problems.
- If for some reason the user is not profiling an app server, and absolutely must use 1.4.2, workaround is to disable secure and add host restrictions to the JVM, so that only specific users can use the AC.

So, without security, no changes are required. With security, profiling on an application server is unaffected. If they are not profiling on an app server, the user needs to change their Java version to 1.5, OR turn security off, OR set the JVM to 1.5 and use the attach to agent scenario.

This to me seems like a fair workaround.
Comment 8 Kathy Chan CLA 2010-06-03 15:21:57 EDT
Alan, please try the workarounds Jonathan noted.  Deferring to TPTP 4.7.1. for follow-up.
Comment 9 Jonathan West CLA 2010-11-25 12:43:39 EST
No plans to fix at this time.
Comment 10 Kathy Chan CLA 2011-02-11 13:40:56 EST
This defect had been resolved as WONTFIX for more than 1 month.  Closing this on the reporter's behalf.  Please re-open if you have further comment on this issue.
Comment 11 Kathy Chan CLA 2011-02-11 14:51:23 EST
Closed in TPTP 4.7.2.