Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314483 - SetConfig doesn't accept 1.4 JREs
Summary: SetConfig doesn't accept 1.4 JREs
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Mike Reid CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 11:04 EDT by Alan Haggarty CLA
Modified: 2016-05-05 10:51 EDT (History)
4 users (show)

See Also:
kathy: pmc_approved? (oec)
kathy: pmc_approved? (ernest)
kathy: pmc_approved? (kathy)
paulslau: pmc_approved+
jgwest: pmc_approved+
jcayne: review+


Attachments
Patch (4.75 KB, patch)
2010-05-27 10:39 EDT, Mike Reid CLA
no flags Details | Diff
Revised patch (4.88 KB, patch)
2010-05-27 16:03 EDT, Mike Reid CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Haggarty CLA 2010-05-26 11:04:33 EDT
Build Identifier: I20100520-1744

With the latest TPTP 4.7 build I cannot use SetConfig to configure the agent controller to use JRE 1.4.2.

With IBM I get:
D:\alan\tptp\47\ac\bin>SetConfig.bat
Specify the fully qualified path of "javaw.exe" (e.g. c:\jdk1.4\jre\bin\javaw.exe):
  Default>"D:\JRE\ibm6_7\jre\bin\java.exe" (Press <ENTER> to accept the default value)
  New value>D:\JRE\ibm142_13\jre\bin\javaw.exe
ERROR: Minimum JDK version required: 1.4
  New value>


With Sun 1.4.2_14 it hangs after I enter it.

Reproducible: Always

Steps to Reproduce:
1. Download and unzip agent controller
2. Run SetConfig.bat
3. Give it IBM 1.4.2_13 java or javaw.exe
Comment 1 Kathy Chan CLA 2010-05-26 14:30:50 EDT
Mike, 

Please take a look as this looks like a regression.
Comment 2 Mike Reid CLA 2010-05-26 16:44:39 EDT
This is introduced by the update to Java 5 (bug 311768). In order to determine the version of the target VM we run:

  org.eclipse.tptp.platform.agentcontroller.config.GetJavaVersion

which just prints the value of the "java.version" system property. However since it is now compiled with Java 5, the Java 1.4 VM cannot load it and so SetConfig thinks its invalid.

Investigating further to determine best approach to fix.
Comment 3 Mike Reid CLA 2010-05-27 10:39:36 EDT
Created attachment 170195 [details]
Patch

Attached patch with the following changes:

- Move GetJavaVersion.java into its own source folder: src-config-14
- Updated build.properties to include classes-config-14 in config.jar

The other part will be to check in a pre-compiled .class of GetJavaVersion, compiled for Java 1.4. The build will then package this version into config.jar and things should then work again as they did before.
Comment 4 Mike Reid CLA 2010-05-27 11:15:39 EDT
Joel, can you please review the patch?
Comment 5 Joel Cayne CLA 2010-05-27 15:26:34 EDT
Patch looks good.

Please add the new src folder to the source build and update the Copyright.
Comment 6 Mike Reid CLA 2010-05-27 16:03:19 EDT
Created attachment 170258 [details]
Revised patch

Attached new patch with the requested change.
Comment 7 Mike Reid CLA 2010-05-27 16:08:14 EDT
Requesting for PMC approval:

   1.   Explain why you believe this is a stop-ship defect. How does the defect manifest itself, and how will users of TPTP / consuming products be affected if the defect is not fixed?

User's cannot configure the Agent Controller to use a v1.4 JVM.

   2. Is there a work-around? If so, why do you believe the work-around is insufficient?

The only workaround would be to manually edit serviceconfig.xml after having configuring the AC with Java 1.5+.

   3. Is this a regression or API breakage? Explain.

Regression introduced in the update to Java 1.5 (bug 311768)
   
   4. Does this require new API?

No. 
  
   5. Who performed the code review?
   
Joel Cayne.

   6. Is there a test case attached to the bugzilla record?

No.
   
   7. What is the nature of the fix? What is the scope of the fix? What is the risk associated with this fix?

Build change, target one .class to Java 1.4. All executions of SetConfig would be affected; however there is no code change. I would say this is low risk.

   8. Is this fix related to any standards that TPTP adheres to? If so, who has validated that the fix continues to adhere to the standard?

   N/A.
Comment 8 Kathy Chan CLA 2010-05-27 16:14:04 EDT
Requesting PMC approval for TPTP 4.7.
Comment 9 Joel Cayne CLA 2010-05-27 17:20:47 EDT
Patch checked into HEAD.
Comment 10 Alan Haggarty CLA 2010-06-02 12:37:05 EDT
Retested with 0528 and 0601 builds, fixed.