| Summary: | The new AC fails to launch java agents on linux | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Geoff Lambourne <glam001> |
| Component: | TPTP | Assignee: | Guru Nagarajan <guru.nagarajan> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | CC: | glam001 |
| Version: | unspecified | Keywords: | plan |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | closed460 | ||
the following change makes it work for me. ================= --- AgentBase.make 2006-09-08 12:25:39.000000000 +1000 +++ AgentBase.make.new 2006-09-08 12:25:19.000000000 +1000 @@ -43,7 +43,7 @@ # list of additional libraries to be linked with # (separated by blanks) #----------------------------------- -LIBS := uuid dl transportSupport tptpUtils tptpLogUtils tptpConfig pthread xerces-c +LIBS := uuid dl transportSupport tptpUtils tptpLogUtils tptpConfig processControlUtil pthread xerces-c #----------------------------------- # list of additional library directories to search from Guru, The tptpConfig-should-link-in-processControlUtil problem should be assigned to me... I just checked and we put this in on Windows but not on Linux. I can fix that. But I'm not sure that this is a single bug... is the "replace" stuff a separate bug? That's not mine... but the linking is... so if there is another bug you need to break it out prior to assigning to me. The fix is a simple one will attach it. The code will be part of Head-CVS in 4.4 Resolved As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. |
Steps I took. 1. unzip archive agntctrl.linux_ia32-TPTP-4.2.0.2.zip 2. from bin directory ran ./SetConfig.sh - accepted defaults 3. edited agents/org.eclipse.tptp.TimeColector/agent.xml as described in the readme.txt 3. edited agents/org.eclipse.tptp.JavaTimeCollector/agent.xml set the executable to point to my installation of java set the classpath parameter to point to my installation of tptpcore.jar (org.eclipse.tptp.platform.execution_4.2.0.v200606140100/tptpcore.jar) see below. Note the first Parameter uses the position="replace" option. This was needed otherwise the java execution failed with "Exception in thread "main" java.lang.NoClassDefFoundError:" This is another bug - however using position="replace" was is a workaround. 4. started the server with ./ACServer 5. Ran ./SampleClient to check it worked - it did. 6. From within the eclipse SDK, ran org.eclipse.tptp.platform.execution.samples.SampleClientAC.java. to check that it worked. This is a java client talking to a c++ agent. It worked. 7. Modified SampleClientAC.java to talk to JavaTimeCollector instead of TimeCollector 8. Ran SampleClientAC and the ./ACServer reports an exception. see below My investigations into the exeception have found... 1. freeEnvironmentStrings is declared in libprocessControlUtil.so.4.2.0 2. libtptpConfig.so.4.2.0 has an undefined reference to it 3. libtptpConfig or libjavaBaseAgent should be linked against libprocessControlUtil to resolve this. ==== ACServer output ====== ./ACServer java.lang.UnsatisfiedLinkError: /space/geoff/downloads/eclipse/3.2/agntctrl/lib/libjavaBaseAgent.so.4.2.0: /space/geoff/downloads/eclipse/3.2/agntctrl/lib/libtptpConfig.so.4: undefined symbol: freeEnvironmentStrings at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at org.eclipse.tptp.platform.execution.datacollection.BaseAgent.<clinit>(BaseAgent.java:98) org.eclipse.tptp.platform.execution.exceptions.NativeLibraryNotFound: Error: The native library not found. at org.eclipse.tptp.platform.execution.datacollection.BaseAgent.init(BaseAgent.java:161) at org.eclipse.tptp.platform.execution.samples.TPTPJavaAgent.<init>(TPTPJavaAgent.java:54) at org.eclipse.tptp.platform.execution.samples.TPTPJavaAgent.main(TPTPJavaAgent.java:63) Exception in thread "main" java.lang.UnsatisfiedLinkError: register0 at org.eclipse.tptp.platform.execution.datacollection.BaseAgent.register0(Native Method) at org.eclipse.tptp.platform.execution.datacollection.BaseAgent.register(BaseAgent.java:202) at org.eclipse.tptp.platform.execution.samples.TPTPJavaAgent.main(TPTPJavaAgent.java:68) === modified agent.xml === <?xml version="1.0" encoding="UTF-8" ?> <!-- The Java Time Collector will work with the following ServiceConfig settings. (Bugzilla# 115006) a) The TransportLayer namedPipeTL element that contains the named pipe name in the PipeName element must be set to "ramaster". b) The TransportLayer sharedMemTL element that contains the shared mem buffer name in the element MemName must be set to "rabuffer" --> <Agent Name="org.eclipse.tptp.JavaTimeCollector"> <Interface>org.eclipse.tptp.agent</Interface> <Interface>org.eclipse.tptp.collector</Interface> <SingleInstance>0</SingleInstance> <Bound>0</Bound> <MaxControllers>-1</MaxControllers> <MaxObservers>-1</MaxObservers> <ConfigFile>c:\tptp\agents\org.eclipse.tptp.JavaTimeCollector\config\agentconfig.xml</ConfigFile> <LaunchConfiguration> <launchInfo> <Application executable="java" path="%JAVA_PATH%"> <Parameter position="replace" value="-Djava.library.path=/space/geoff/downloads/eclipse/3.2/agntctrl/lib" /> <Parameter value="-classpath" /> <Parameter value="/space/geoff/downloads/eclipse/3.2/extensions/tptp-4.2.0.2-200608021100/eclipse/plugins/org.eclipse.tptp.platform.execution_4.2.0.v200606140100/tptpcore.jar" /> <Parameter value="org.eclipse.tptp.platform.execution.samples.TPTPJavaAgent"/> </Application> </launchInfo> </LaunchConfiguration> </Agent>