[ grinder-Bugs-3133650 ] Relative classpath issues in 3.4
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.grinder.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #3133650, was opened at 2010-12-09 16:51 Message generated for change (Comment added) made by philipa You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=118598&aid=3133650&group_id=18598 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Documentation Group: None Status: Open >Resolution: Accepted >Priority: 3 Private: No Submitted By: Jared C (concealed) Assigned to: Philip Aston (philipa) Summary: Relative classpath issues in 3.4 Initial Comment: I think the relative path issues in previous versions may have resurfaced in 3.4. This only happens when I am using the console. I have a startup script like this: set GRINDERPATH=..\lib set LIBPATH=lib set GRINDERPROPERTIES=mytest.properties set JYTHON_HOME=..\..\jython252 java -cp "%GRINDERPATH%\grinder.jar;%LIBPATH%\somelib.jar;%JYTHON_HOME%\jython.jar;" -Dgrinder.jvm.arguments=-Dpython.home=%JYTHON_HOME% net.grinder.Grinder %GRINDERPROPERTIES% It connects to the console just fine but when I click start, I get the following error while working the worker process because it can't find the Grinder libraries: java.lang.NoClassDefFoundError: net/grinder/engine/process/WorkerProcessEntryPoint Same goes for the jython libraries. If I change the two to an absolute path (such as C:\path\to\jython225), it works just fine. The LIBPATH doesn't have any issues (maybe because it doesn't reverse back any directories). The worker process will startup just fine if I do not use the console. ---------------------------------------------------------------------- >Comment By: Philip Aston (philipa) Date: 2010-12-10 10:42 Message: The problem is that when the process runs under the console, it does so in the "blah-filestore/current" directory. This is advantageous for reading jython modules, property files, and other distributed artefacts, but means that the relative paths the worker process requires are different. Your JYTHON_HOME should be "..\..\..\lib\jython252". You can fix up the classpath by adding -Dgrinder.jvm.classpath=..\..\%GRINDER_PATH%\grinder.jar to the command line. I don't propose to "fix" this, because there's no way of knowing what properties should be adjusted before passing them to the worker process. Instead, I'll add a note to the documentation. Thanks for the report. ---------------------------------------------------------------------- Comment By: Philip Aston (philipa) Date: 2010-12-10 10:30 Message: Wow - I've reproduced this :-) ---------------------------------------------------------------------- Comment By: Philip Aston (philipa) Date: 2010-12-10 10:29 Message: 1. The javaagent part of the command line is calculated by the agent process - if the agent jar is found, it will always be expanded to a full path. 2. The file store update has nothing to do with being able to find jython. It is handled purely by the agent (which doesn't load jython). ---------------------------------------------------------------------- Comment By: Jared C (concealed) Date: 2010-12-09 18:40 Message: I changed everything to forward paths, but for some reason the command always comes out like this: '-javaagent:C:\tools\grinders\grinder-3.4\pdfgen\..\lib\grinder-agent.jar' ....... However that is a non-issue. I tried with an absolute grinder path and left the jython path relative, the grinder jar was found and the script started until it tried to import string from jython and died. Still couldn't find jython even with forward slashes. ../jython252/jython.jar; Whats weird is it finds jython just find when it updates the file store just before launching the worker process: 12/9/10 12:34:56 PM (agent): Updating file store: "jython252\cachedir\packages\xmltooling-1.1.0.pkc" (10787 bytes) ---------------------------------------------------------------------- Comment By: Philip Aston (philipa) Date: 2010-12-09 18:26 Message: Please can you try with forward paths throughout. That is, in the command line as well. ---------------------------------------------------------------------- Comment By: Jared C (concealed) Date: 2010-12-09 17:29 Message: I tried a forward slash, and it still didn't work. 12/9/10 11:12:45 AM (agent): Worker process command line: java '-javaagent:C:\tools\grinders\grinder-3.4\pdfgen\..\lib\grinder-agent.jar' '-Dpython.home=C:\tools\grinders\jython252' -classpath 'lib/somelib.jar;;../lib\grinder.jar;C:\tools\grinders\jython252\jython.jar;' net.grinder.engine.process.WorkerProcessEntryPoint This command is the same if I am using the console or not. ---------------------------------------------------------------------- Comment By: Philip Aston (philipa) Date: 2010-12-09 17:01 Message: Not sure this is related to previous issues - they were due to how The Grinder resolves script files. If the agent can start, but the worker can't, there's something funny in the creation of the worker process command line. Please: 1. Try using forward slashes. 2. Copy the worker process command line that the agent writes out to this bug report. Thanks, - Phil ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=118598&aid=3133650&group_id=18598 ------------------------------------------------------------------------------