Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 228873

Summary: ClassNotFoundException when running ASF automation services without OSGi/ICU.
Product: z_Archived Reporter: Paul Slauenwhite <paulslau>
Component: TPTPAssignee: Paul Slauenwhite <paulslau>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: dkhodges, dmorris, jkubasta, mddunn, newboya1988
Version: unspecifiedFlags: dmorris: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch. none

Description Paul Slauenwhite CLA 2008-04-25 09:41:52 EDT
ClassNotFoundException when running ASF automation services without OSGi/ICU.

As a result of https://bugs.eclipse.org/bugs/show_bug.cgi?id=221150, the strings in the org.eclipse.hyades.execution plug-in were externalized using the OSGi's org.eclipse.osgi.util.NLS and ICU's com.ibm.icu.test.MessageFormt classes.  As such, OSGi/ICU are reuqired when running ASF automation clients (script, Ant and Java), otherwise a ClassNotFoundException is thrown.  

Since the ASF automation clients (script, Ant and Java) requires only a single automation-client JAR, the user is forced to require the OSGi/ICU dependencies.

The Common Base Event implementation in TPTP has a similar usage pattern, which is resolved using org.eclipse.hyades.internal.logging.core.internationalization.InternationalizationUtilities.java.  

Required by a consuming product.
Comment 1 Paul Slauenwhite CLA 2008-04-25 09:44:19 EDT
Work-around:  Add the following dependencies to the Java/ANT classpath before running:

-<Eclipse installation direcotry>\eclipse\plugins\org.eclipse.osgi_<version>.jar
-<Eclipse installation directory>\eclipse\plugins\com.ibm.icu_<version>.jar
Comment 2 Paul Slauenwhite CLA 2008-04-25 13:07:29 EDT
Add new tests under defect #228804 to cover the verify/execute/interrogate/publish test services for Ant, shell, Java clients:

/org.eclipse.hyades.test.core.services.tests/manual/Test.Execution.Services.testsuite
Comment 3 Paul Slauenwhite CLA 2008-04-25 16:25:00 EDT
Hours worked to create and test the patch.

Duwayne, please review the enclosed patch.
Comment 4 Paul Slauenwhite CLA 2008-04-25 16:25:42 EDT
Created attachment 97683 [details]
Patch.
Comment 5 DuWayne Morris CLA 2008-04-27 22:11:00 EDT
Reviewed patch.  One comment, the following file should have the copyright date corrected to 2008:

org.eclipse.hyades.automation.client.adapters.java.AutomationClientAdapter.java

DuWayne
Comment 6 Paul Slauenwhite CLA 2008-04-28 07:04:37 EDT
(In reply to comment #5)
> Reviewed patch.  One comment, the following file should have the copyright date
> corrected to 2008:
> 
> org.eclipse.hyades.automation.client.adapters.java.AutomationClientAdapter.java
> 
> DuWayne
> 

Thanks Duwayne for the review.  

The copyright date on org.eclipse.hyades.automation.client.adapters.java.AutomationClientAdapter.java is already correct at 2008.

PMC approval requested for this defect to be included in I7.
Comment 7 Paul Slauenwhite CLA 2008-04-28 11:46:22 EDT
PMC approved.

Patch checked into CVS (HEAD).
Comment 8 Mark D Dunn CLA 2008-05-27 12:41:46 EDT
When I tried to verify this bug, I got a different failure.  This failure occurred with the IAC and the stand alone agent controller (the RC1A version). 
It seems that I do not have the ability to reopen this defect, but this needs to be fixed.  I can not perform any command line execution commands. 


Here is the latest error:

D:\Program Files\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.cmdlineexecute_7.2.0.v200804151250>call cmdline.bat -configfile test.cfg -schedule googleschedule 
-results myresults -overwrite true  1>>testoutput.txt

java.lang.UnsatisfiedLinkError: hcclco (Not found in java.library.path)
        at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:993)
        at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:962)
        at java.lang.System.loadLibrary(System.java:465)
        at org.eclipse.hyades.internal.execution.remote.RemoteComponentSkeleton.<clinit>(RemoteComponentSkeleton.java:139)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at org.eclipse.hyades.logging.core.LoggingAgent.<init>(LoggingAgent.java:118)
        at org.eclipse.hyades.logging.core.LoggingAgent.<init>(LoggingAgent.java:93)
        at org.eclipse.hyades.logging.java.LoggingAgentHandler.publish(LoggingAgentHandler.java:280)
        at java.util.logging.Logger.log(Unknown Source)
        at com.ibm.etools.common.logging.listeners.CommonLoggingListener$1.run(CommonLoggingListener.java:107)
Comment 9 Mark D Dunn CLA 2008-05-27 12:56:58 EDT
Upon further investigation, the schedule did complete, and this error no longer showed up.  I understand there is already a defect open for the conditions I noted, so no further action is needed on this defect.
Comment 10 jkubasta CLA 2008-05-27 13:26:36 EDT
I must resubmit this defect since I found an error when trying to verify this bug.    
The problem I see now is this:
<install_dir>\plugins\com.ibm.rational.test.lt.cmdlineexecute_7.2.0.v200804151250>call cmdline.bat -configfile test.cfg -schedule googleschedule -results twouser -users 2  1>>testoutput.txt
java.lang.UnsatisfiedLinkError: hcclco (Not found in java.library.path)
        at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:993)
        at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:962)
        at java.lang.System.loadLibrary(System.java:465)
        at org.eclipse.hyades.internal.execution.remote.RemoteComponentSkeleton.<clinit>(RemoteComponentSkeleton.java:139)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at org.eclipse.hyades.logging.core.LoggingAgent.<init>(LoggingAgent.java:118)
        at org.eclipse.hyades.logging.core.LoggingAgent.<init>(LoggingAgent.java:93)
        at org.eclipse.hyades.logging.java.LoggingAgentHandler.publish(LoggingAgentHandler.java:280)
        at java.util.logging.Logger.log(Unknown Source)
        at com.ibm.etools.common.logging.listeners.CommonLoggingListener$1.run(CommonLoggingListener.java:107)
Comment 11 DuWayne Morris CLA 2008-05-27 13:48:40 EDT
The error you see is a separate defect filed by Kevin and currently assigned to Johnathan.  

https://bugs.eclipse.org/bugs/show_bug.cgi?id=233039

This defect should not have been re-opened, since we no longer see the error that was the subject of this defect.
Comment 12 Paul Slauenwhite CLA 2008-05-27 13:52:04 EDT
Confirmed with the originator that this defect has been fixed.
Comment 13 Paul Slauenwhite CLA 2008-06-10 10:56:03 EDT
Verified in TPTP-4.5.0RC3-200806031051.  Closing.