Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLiM server died before a connection could be established #726

Closed
Thurmann opened this issue Apr 29, 2015 · 24 comments
Closed

SLiM server died before a connection could be established #726

Thurmann opened this issue Apr 29, 2015 · 24 comments
Milestone

Comments

@Thurmann
Copy link

Problem Description

I think I have uncovered a possible defect in Fitnesse, more specifically after version 20140901.
I can't seem to find any other person that have experienced a similar problem, so I figured that I should post it here.

When starting a test in Fitnesse I get the following error:

Could not complete testing: fitnesse.slim.SlimError: Error SLiM server died before a connection could be established.

My OS is Windows 7 and I'm running Fitnesse in a Java project which uses jdk1.7.

Problem Diagnosis

I have performed some diagnosis to try to figure out what could be the reason for this error.

I am cooperating with another person who uses a Mac instead of Windows, and he does not experience this error.

When ONLY changing the Fitnesse version in maven pom I have uncovered the following:

  1. This problem does NOT occur on version 20140901.
  2. I get the reported error message on version 20150424 and 20150226.
  3. When using version 20150114 the test just hangs and never exits.

When debugging the error I have found the following:

  1. The exception is thrown on line 92 in SlimCommandRunningClient.java
  2. This seems to be because the isDead() method returns true for the process in slimRunner(CommandRunner)
  3. This process is implemented as a java.lang.ProcessImpl for Windows, while on Mac it is implemented as a UNIXProcess
  4. The exitValue for the process is 1

Another peculiar thing that I found was that when using the remote debug option in Fitnesse(?responder=test&remote_debug=true), the test works and no errors occur(This works on version 20150114, 20150424 and 20150226).

So, what could be the cause for this error? According to my diagnosis this problem started to occur after version 20140901.

@six42
Copy link
Contributor

six42 commented May 2, 2015

Hello Thurmann,

could you share what kind of test you are running and the command string generated by FitNesse?
You can see the command string when you click on the "Output Captured" or "Errors Occurred" button on the test result page.
Do you see this error when you run one of the standard FitNesse acceptance tests?

Please share the command string for your test with and and without debug option and for a standard FitNesse acceptance test. Run all with your latest FitNesse version and run it directly from the Wiki. Also share standard out and standard error captured during each run which you can see on the same page.

I assume there are some spaces or quotes in the slim command line and the processing of the same has changed some time back. Due to this your client doesn't starts at all but dies immediately.

@Thurmann
Copy link
Author

Thurmann commented May 4, 2015

Hi,

Thanks for your reply.

The error message I get is the following:

Error: Could not find or load main class Files\Java\jdk1.8.0_25\jre\lib\charsets.jar;C:\Program

This error message seems a bit strange since all the modules in my project are configured to use jdk 1.7.

Update: It seems like the project was configured to use 1.8 while the modules used 1.7. However, after I changed the project setting to 1.7 I still get the same error message, only with the path slightly changed("jdk1.7.0_67" instead of "jdk1.8.0_25")

The command line starts with the following:

"C:\Program Files\Java\jdk1.7.0_67\bin\java" -cp C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;"C:\Program Files\Java\jdk1.7.0_67\jre\lib\charsets.jar;

Note that there is a space in between "Program" and "Files". Could this be the problem?

I receive this error message for all the tests that I have in my suite. It doesn't matter what the tests contain, be it script tables, query tables etc., the result is always the same.
The only difference between the test strings generated by FitNesse are the postfix which is "?test" for a regular test and "?responder=test&remote_debug=true" when debugging remotely.

When running the standard acceptance tests in FitNesse I do not get this error. The test string for the acceptance test only contains the postfix "?test"

@mgaertne
Copy link
Collaborator

mgaertne commented May 4, 2015

Seems like the classpath has not been put into quotation marks.

Dipl.-Inform. Markus Gärtner
Author of ATDD by Example - A Practical Guide to Acceptance
Test-Driven Development

http://www.shino.de/blog
http://www.mgaertne.de
http://www.it-agile.de
Twitter: @mgaertne

On 04.05.2015, at 08:54, Thurmann notifications@github.com wrote:

Hi,

Thanks for your reply.

The error message I get is the following:

Error: Could not find or load main class Files\Java\jdk1.8.0_25\jre\lib\charsets.jar;C:\Program

I receive this error message for all the tests that I have in my suite. It doesn't matter what the tests contain, be it script tables, query tables etc., the result is always the same.
The only difference between the test strings generated by FitNesse are the postfix which is "?test" for a regular test and "?responder=test&remote_debug=true" when debugging remotely.

When running the standard acceptance tests in FitNesse I do not get this error. The test string for the acceptance test only contains the postfix "?test"


Reply to this email directly or view it on GitHub.

@Thurmann
Copy link
Author

Thurmann commented May 4, 2015

Why should this not be a problem for version 20140901 of FitNesse? I have no problems with the classpath for anything else, so why should it be a problem with FitNesse? And how can the remote debug option still work?

@Thurmann
Copy link
Author

Thurmann commented May 4, 2015

I tried again now after changing the classpath to include quotations. Still I get the same error message.

Command line for ordinary test:

"C:\Program Files\Java\jdk1.7.0_67\bin\java" -cp C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;"C:\Program Files\Java\jdk1.7.0_67\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\zipfs.jar;C:\Repositories\ccl-atst\ccl-atst-slim\target\classes;C:\Repositories\ccl-atst\ccl-atst-cfg\target\classes;C:\Users\E212786.m2\repository\org\simpleframework\simple-xml\2.7.1\simple-xml-2.7.1.jar;C:\Users\E212786.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\E212786.m2\repository\stax\stax\1.2.0\stax-1.2.0.jar;C:\Users\E212786.m2\repository\xpp3\xpp3\1.1.3.3\xpp3-1.1.3.3.jar;C:\Repositories\ccl-atst\ccl-atst-service\target\classes;C:\Users\E212786.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-client\1.18.3\jersey-client-1.18.3.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-core\1.18.3\jersey-core-1.18.3.jar;C:\Users\E212786.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar;C:\Users\E212786.m2\repository\joda-time\joda-time\2.6\joda-time-2.6.jar;C:\Users\E212786.m2\repository\org\jasypt\jasypt\1.9.1\jasypt-1.9.1.jar;C:\Users\E212786.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\E212786.m2\repository\com\jcraft\jsch\0.1.51\jsch-0.1.51.jar;C:\Users\E212786.m2\repository\org\hibernate\hibernate-validator\4.3.1.Final\hibernate-validator-4.3.1.Final.jar;C:\Users\E212786.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\E212786.m2\repository\org\jboss\logging\jboss-logging\3.1.0.CR2\jboss-logging-3.1.0.CR2.jar;C:\Users\E212786.m2\repository\org\beanio\beanio\2.1.0\beanio-2.1.0.jar;C:\Repositories\ccl-atst\ccl-atst-db\target\classes;C:\Users\E212786.m2\repository\org\jdbi\jdbi\2.57\jdbi-2.57.jar;C:\Users\E212786.m2\repository\cglib\cglib-nodep\3.1\cglib-nodep-3.1.jar;C:\Users\E212786.m2\repository\com\fasterxml\classmate\0.9.0\classmate-0.9.0.jar;C:\Users\E212786.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;C:\Users\E212786.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\E212786.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\E212786.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\E212786.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\E212786.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\E212786.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\E212786.m2\repository\com\jolbox\bonecp\0.8.0.RELEASE\bonecp-0.8.0.RELEASE.jar;C:\Users\E212786.m2\repository\com\oracle\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar;C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmlparser\2.1\htmlparser-2.1.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmllexer\2.1\htmllexer-2.1.jar;C:\Users\E212786.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\E212786.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\E212786.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\E212786.m2\repository\org\json\json\20140107\json-20140107.jar;C:\Users\E212786.m2\repository\com\googlecode\java-diff-utils\diffutils\1.3.0\diffutils-1.3.0.jar;C:\Users\E212786.m2\repository\org\eclipse\jgit\org.eclipse.jgit\3.6.2.201501210735-r\org.eclipse.jgit-3.6.2.201501210735-r.jar;C:\Users\E212786.m2\repository\com\googlecode\javaewah\JavaEWAH\0.7.9\JavaEWAH-0.7.9.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpclient\4.1.3\httpclient-4.1.3.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpcore\4.1.4\httpcore-4.1.4.jar;C:\Users\E212786.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\E212786.m2\repository\org\slf4j\slf4j-api\1.7.9\slf4j-api-1.7.9.jar;C:\Users\E212786.m2\repository\org\slf4j\jcl-over-slf4j\1.7.9\jcl-over-slf4j-1.7.9.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-classic\1.1.2\logback-classic-1.1.2.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-core\1.1.2\logback-core-1.1.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.1.1\lib\idea_rt.jar" fitnesse.slim.SlimService 8088

Command line for remote debug test, which still works:

"C:\Program Files\Java\jdk1.7.0_67\bin\java" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -cp "C:\Program Files\Java\jdk1.7.0_67\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\zipfs.jar;C:\Repositories\ccl-atst\ccl-atst-slim\target\classes;C:\Repositories\ccl-atst\ccl-atst-cfg\target\classes;C:\Users\E212786.m2\repository\org\simpleframework\simple-xml\2.7.1\simple-xml-2.7.1.jar;C:\Users\E212786.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\E212786.m2\repository\stax\stax\1.2.0\stax-1.2.0.jar;C:\Users\E212786.m2\repository\xpp3\xpp3\1.1.3.3\xpp3-1.1.3.3.jar;C:\Repositories\ccl-atst\ccl-atst-service\target\classes;C:\Users\E212786.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-client\1.18.3\jersey-client-1.18.3.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-core\1.18.3\jersey-core-1.18.3.jar;C:\Users\E212786.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar;C:\Users\E212786.m2\repository\joda-time\joda-time\2.6\joda-time-2.6.jar;C:\Users\E212786.m2\repository\org\jasypt\jasypt\1.9.1\jasypt-1.9.1.jar;C:\Users\E212786.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\E212786.m2\repository\com\jcraft\jsch\0.1.51\jsch-0.1.51.jar;C:\Users\E212786.m2\repository\org\hibernate\hibernate-validator\4.3.1.Final\hibernate-validator-4.3.1.Final.jar;C:\Users\E212786.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\E212786.m2\repository\org\jboss\logging\jboss-logging\3.1.0.CR2\jboss-logging-3.1.0.CR2.jar;C:\Users\E212786.m2\repository\org\beanio\beanio\2.1.0\beanio-2.1.0.jar;C:\Repositories\ccl-atst\ccl-atst-db\target\classes;C:\Users\E212786.m2\repository\org\jdbi\jdbi\2.57\jdbi-2.57.jar;C:\Users\E212786.m2\repository\cglib\cglib-nodep\3.1\cglib-nodep-3.1.jar;C:\Users\E212786.m2\repository\com\fasterxml\classmate\0.9.0\classmate-0.9.0.jar;C:\Users\E212786.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;C:\Users\E212786.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\E212786.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\E212786.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\E212786.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\E212786.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\E212786.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\E212786.m2\repository\com\jolbox\bonecp\0.8.0.RELEASE\bonecp-0.8.0.RELEASE.jar;C:\Users\E212786.m2\repository\com\oracle\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar;C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmlparser\2.1\htmlparser-2.1.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmllexer\2.1\htmllexer-2.1.jar;C:\Users\E212786.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\E212786.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\E212786.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\E212786.m2\repository\org\json\json\20140107\json-20140107.jar;C:\Users\E212786.m2\repository\com\googlecode\java-diff-utils\diffutils\1.3.0\diffutils-1.3.0.jar;C:\Users\E212786.m2\repository\org\eclipse\jgit\org.eclipse.jgit\3.6.2.201501210735-r\org.eclipse.jgit-3.6.2.201501210735-r.jar;C:\Users\E212786.m2\repository\com\googlecode\javaewah\JavaEWAH\0.7.9\JavaEWAH-0.7.9.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpclient\4.1.3\httpclient-4.1.3.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpcore\4.1.4\httpcore-4.1.4.jar;C:\Users\E212786.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\E212786.m2\repository\org\slf4j\slf4j-api\1.7.9\slf4j-api-1.7.9.jar;C:\Users\E212786.m2\repository\org\slf4j\jcl-over-slf4j\1.7.9\jcl-over-slf4j-1.7.9.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-classic\1.1.2\logback-classic-1.1.2.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-core\1.1.2\logback-core-1.1.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.1.1\lib\idea_rt.jar" fitnesse.slim.SlimService 8087

@mgaertne
Copy link
Collaborator

mgaertne commented May 4, 2015

I think you ought to out each individual path in quotes, iirc.

Dipl.-Inform. Markus Gärtner
Author of ATDD by Example - A Practical Guide to Acceptance
Test-Driven Development

http://www.shino.de/blog
http://www.mgaertne.de
http://www.it-agile.de
Twitter: @mgaertne

On 04.05.2015, at 15:05, Thurmann notifications@github.com wrote:

I tried again now after changing the classpath to include quotations. Still I get the same error message.

Command line for ordinary test:

"C:\Program Files\Java\jdk1.7.0_67\bin\java" -cp C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;"C:\Program Files\Java\jdk1.7.0_67\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_67\ jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\zipfs.jar;C:\Repositories\ccl-atst\ccl-atst-slim\target\classes;C:\Repositories\ccl-atst\ccl-atst-cfg\target\classes;C:\Users\E212786.m2\repository\org\simpleframework\simple-xml\2.7.1\simple-xml-2.7.1.jar;C:\Users\E212786.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\E212786.m2\repository\stax\stax\1.2.0\stax-1.2.0.jar;C:\Users\E212786.m2\repository\xpp3\xpp3\1.1.3.3\xpp3-1.1.3.3.jar;C:\Repositories\ccl-atst\ccl-atst-service\target\classes;C:\Users\E212786.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-client\1.18.3\jersey-client-1.18.3.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-core\1.18.3\jersey-core-1.18.3.jar;C:\Users\E212786.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar;C:\Users\E 212786.m2\repository\joda-time\joda-time\2.6\joda-time-2.6.jar;C:\Users\E212786.m2\repository\org\jasypt\jasypt\1.9.1\jasypt-1.9.1.jar;C:\Users\E212786.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\E212786.m2\repository\com\jcraft\jsch\0.1.51\jsch-0.1.51.jar;C:\Users\E212786.m2\repository\org\hibernate\hibernate-validator\4.3.1.Final\hibernate-validator-4.3.1.Final.jar;C:\Users\E212786.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\E212786.m2\repository\org\jboss\logging\jboss-logging\3.1.0.CR2\jboss-logging-3.1.0.CR2.jar;C:\Users\E212786.m2\repository\org\beanio\beanio\2.1.0\beanio-2.1.0.jar;C:\Repositories\ccl-atst\ccl-atst-db\target\classes;C:\Users\E212786.m2\repository\org\jdbi\jdbi\2.57\jdbi-2.57.jar;C:\Users\E212786.m2\repository\cglib\cglib-nodep\3.1\cglib-nodep-3.1.jar;C:\Users\E212786.m2\repository\com\fasterxml\classmate\0.9.0\classmate-0.9.0.jar;C:\Users\E212786.m2\repository\org\antlr\antlr-ru ntime\3.4\antlr-runtime-3.4.jar;C:\Users\E212786.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\E212786.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\E212786.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\E212786.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\E212786.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\E212786.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\E212786.m2\repository\com\jolbox\bonecp\0.8.0.RELEASE\bonecp-0.8.0.RELEASE.jar;C:\Users\E212786.m2\repository\com\oracle\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar;C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmlparser\2.1\htmlparser-2.1.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmllexer\2.1\htmllexer-2.1.jar;C:\Users\E212786.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7. jar;C:\Users\E212786.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\E212786.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\E212786.m2\repository\org\json\json\20140107\json-20140107.jar;C:\Users\E212786.m2\repository\com\googlecode\java-diff-utils\diffutils\1.3.0\diffutils-1.3.0.jar;C:\Users\E212786.m2\repository\org\eclipse\jgit\org.eclipse.jgit\3.6.2.201501210735-r\org.eclipse.jgit-3.6.2.201501210735-r.jar;C:\Users\E212786.m2\repository\com\googlecode\javaewah\JavaEWAH\0.7.9\JavaEWAH-0.7.9.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpclient\4.1.3\httpclient-4.1.3.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpcore\4.1.4\httpcore-4.1.4.jar;C:\Users\E212786.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\E212786.m2\repository\org\slf4j\slf4j-api\1.7.9\slf4j-api-1.7.9.jar;C:\Users\E212786.m2\repository\org\slf4j\jcl-over-slf4j\1.7 .9\jcl-over-slf4j-1.7.9.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-classic\1.1.2\logback-classic-1.1.2.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-core\1.1.2\logback-core-1.1.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.1.1\lib\idea_rt.jar" fitnesse.slim.SlimService 8088

Command line for remote debug test, which still works:

"C:\Program Files\Java\jdk1.7.0_67\bin\java" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -cp "C:\Program Files\Java\jdk1.7.0_67\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\su nec.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_67\jre\lib\ext\zipfs.jar;C:\Repositories\ccl-atst\ccl-atst-slim\target\classes;C:\Repositories\ccl-atst\ccl-atst-cfg\target\classes;C:\Users\E212786.m2\repository\org\simpleframework\simple-xml\2.7.1\simple-xml-2.7.1.jar;C:\Users\E212786.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\E212786.m2\repository\stax\stax\1.2.0\stax-1.2.0.jar;C:\Users\E212786.m2\repository\xpp3\xpp3\1.1.3.3\xpp3-1.1.3.3.jar;C:\Repositories\ccl-atst\ccl-atst-service\target\classes;C:\Users\E212786.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-client\1.18.3\jersey-client-1.18.3.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-core\1.18.3\jersey-core-1.18.3.jar;C:\Users\E212786.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar;C:\Users\E212786.m2\repo sitory\joda-time\joda-time\2.6\joda-time-2.6.jar;C:\Users\E212786.m2\repository\org\jasypt\jasypt\1.9.1\jasypt-1.9.1.jar;C:\Users\E212786.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\E212786.m2\repository\com\jcraft\jsch\0.1.51\jsch-0.1.51.jar;C:\Users\E212786.m2\repository\org\hibernate\hibernate-validator\4.3.1.Final\hibernate-validator-4.3.1.Final.jar;C:\Users\E212786.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\E212786.m2\repository\org\jboss\logging\jboss-logging\3.1.0.CR2\jboss-logging-3.1.0.CR2.jar;C:\Users\E212786.m2\repository\org\beanio\beanio\2.1.0\beanio-2.1.0.jar;C:\Repositories\ccl-atst\ccl-atst-db\target\classes;C:\Users\E212786.m2\repository\org\jdbi\jdbi\2.57\jdbi-2.57.jar;C:\Users\E212786.m2\repository\cglib\cglib-nodep\3.1\cglib-nodep-3.1.jar;C:\Users\E212786.m2\repository\com\fasterxml\classmate\0.9.0\classmate-0.9.0.jar;C:\Users\E212786.m2\repository\org\antlr\antlr-runtime\3.4\antl r-runtime-3.4.jar;C:\Users\E212786.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\E212786.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\E212786.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\E212786.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\E212786.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\E212786.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\E212786.m2\repository\com\jolbox\bonecp\0.8.0.RELEASE\bonecp-0.8.0.RELEASE.jar;C:\Users\E212786.m2\repository\com\oracle\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar;C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmlparser\2.1\htmlparser-2.1.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmllexer\2.1\htmllexer-2.1.jar;C:\Users\E212786.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\E 212786.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\E212786.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\E212786.m2\repository\org\json\json\20140107\json-20140107.jar;C:\Users\E212786.m2\repository\com\googlecode\java-diff-utils\diffutils\1.3.0\diffutils-1.3.0.jar;C:\Users\E212786.m2\repository\org\eclipse\jgit\org.eclipse.jgit\3.6.2.201501210735-r\org.eclipse.jgit-3.6.2.201501210735-r.jar;C:\Users\E212786.m2\repository\com\googlecode\javaewah\JavaEWAH\0.7.9\JavaEWAH-0.7.9.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpclient\4.1.3\httpclient-4.1.3.jar;C:\Users\E212786.m2\repository\org\apache\httpcomponents\httpcore\4.1.4\httpcore-4.1.4.jar;C:\Users\E212786.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\E212786.m2\repository\org\slf4j\slf4j-api\1.7.9\slf4j-api-1.7.9.jar;C:\Users\E212786.m2\repository\org\slf4j\jcl-over-slf4j\1.7.9\jcl-over-sl f4j-1.7.9.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-classic\1.1.2\logback-classic-1.1.2.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-core\1.1.2\logback-core-1.1.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.1.1\lib\idea_rt.jar" fitnesse.slim.SlimService 8087


Reply to this email directly or view it on GitHub.

@Thurmann
Copy link
Author

Thurmann commented May 5, 2015

I haven't manipulated the command line in any way, that change was merely the consequence of me changing the classpath to include quotes. Additionally, I can't see why this should be a problem now when it's not a problem for FitNesse version 20140901 and remote debug.

@six42
Copy link
Contributor

six42 commented May 7, 2015

Hi Thurmann

Looking at the cp of your test you see that it starts without a quote and with jar: C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20150424\fitnesse-20150424.jar;

And after this the remaining cp is in one single set of quotes.

The same jar is repeated in the remaining cp again. So it is not required at the beginning.

Looking at your debug test you see it does not starts with this jar and all cp elements are in one set of quotes. This is how it should be.

I assume you have to remove this jar for your test and it will work. Did you modified the testrunner variable for your test? Otherwise test and debug test should have the same cp.

@Thurmann
Copy link
Author

Thurmann commented May 7, 2015

The jar file that you mention is added by FitNesse, it's not something I have added manually if that's what you're thinking.

If you look in ClientBuilder.java you can see:

static final String[] DEFAULT_COMMAND_PATTERN = {
javaExecutable(),
"-cp",
fitnesseJar(System.getProperty("java.class.path")) + File.pathSeparator + "%p",
"%m" };

Here the %p is replaced with the classpath.
So first, the fitnesse jar is added to the command line and then the classpath. This classpath gets taken from the ClassPath.java where the toString() method contains the following:

if (result.contains(" ") && !(result.startsWith(""") && result.endsWith("""))) {
result = """+result +""";
}

So that's why the quote is not added to the fitnesse jar, but to the rest of the command line. Which I think is a bug.

Regarding why debug still works, you can look at the ClientBuilder.java again and see that it contains:

static final String[] DEFAULT_JAVA_DEBUG_COMMAND = {
javaExecutable(),
"-Xdebug",
"-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000",
"-cp",
"%p",
"%m"};

This string does not seem to contain the fitnesse jar, which would explain why debug works.

@six42
Copy link
Contributor

six42 commented May 8, 2015 via email

@Thurmann
Copy link
Author

Thurmann commented May 8, 2015

I looked into the history of the ClassPath.java and saw that there was a commit on 01.10.2014 which added the quotes to the toString() method. Additionally this class did not exist before 06.09.2014 so it could not have been used at all in the 20140901 release. I think this would explain why the 20140901 version works, while all the later ones does not.

The command line from version 20140901:

C:\java\jdk1.7.0_67\bin\java -cp C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20140901\fitnesse-20140901.jar;C:\java\jdk1.7.0_67\jre\lib\charsets.jar;C:\java\jdk1.7.0_67\jre\lib\deploy.jar;C:\java\jdk1.7.0_67\jre\lib\javaws.jar;C:\java\jdk1.7.0_67\jre\lib\jce.jar;C:\java\jdk1.7.0_67\jre\lib\jfr.jar;C:\java\jdk1.7.0_67\jre\lib\jfxrt.jar;C:\java\jdk1.7.0_67\jre\lib\jsse.jar;C:\java\jdk1.7.0_67\jre\lib\management-agent.jar;C:\java\jdk1.7.0_67\jre\lib\plugin.jar;C:\java\jdk1.7.0_67\jre\lib\resources.jar;C:\java\jdk1.7.0_67\jre\lib\rt.jar;C:\java\jdk1.7.0_67\jre\lib\ext\access-bridge-64.jar;C:\java\jdk1.7.0_67\jre\lib\ext\dnsns.jar;C:\java\jdk1.7.0_67\jre\lib\ext\jaccess.jar;C:\java\jdk1.7.0_67\jre\lib\ext\localedata.jar;C:\java\jdk1.7.0_67\jre\lib\ext\sunec.jar;C:\java\jdk1.7.0_67\jre\lib\ext\sunjce_provider.jar;C:\java\jdk1.7.0_67\jre\lib\ext\sunmscapi.jar;C:\java\jdk1.7.0_67\jre\lib\ext\zipfs.jar;C:\Repositories\ccl-atst\ccl-atst-slim\target\classes;C:\Repositories\ccl-atst\ccl-atst-cfg\target\classes;C:\Users\E212786.m2\repository\org\simpleframework\simple-xml\2.7.1\simple-xml-2.7.1.jar;C:\Users\E212786.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\E212786.m2\repository\stax\stax\1.2.0\stax-1.2.0.jar;C:\Users\E212786.m2\repository\xpp3\xpp3\1.1.3.3\xpp3-1.1.3.3.jar;C:\Repositories\ccl-atst\ccl-atst-service\target\classes;C:\Users\E212786.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-client\1.18.3\jersey-client-1.18.3.jar;C:\Users\E212786.m2\repository\com\sun\jersey\jersey-core\1.18.3\jersey-core-1.18.3.jar;C:\Users\E212786.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar;C:\Users\E212786.m2\repository\joda-time\joda-time\2.6\joda-time-2.6.jar;C:\Users\E212786.m2\repository\org\jasypt\jasypt\1.9.1\jasypt-1.9.1.jar;C:\Users\E212786.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\E212786.m2\repository\com\jcraft\jsch\0.1.51\jsch-0.1.51.jar;C:\Users\E212786.m2\repository\org\hibernate\hibernate-validator\4.3.1.Final\hibernate-validator-4.3.1.Final.jar;C:\Users\E212786.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\E212786.m2\repository\org\jboss\logging\jboss-logging\3.1.0.CR2\jboss-logging-3.1.0.CR2.jar;C:\Users\E212786.m2\repository\org\beanio\beanio\2.1.0\beanio-2.1.0.jar;C:\Repositories\ccl-atst\ccl-atst-db\target\classes;C:\Users\E212786.m2\repository\org\jdbi\jdbi\2.57\jdbi-2.57.jar;C:\Users\E212786.m2\repository\cglib\cglib-nodep\3.1\cglib-nodep-3.1.jar;C:\Users\E212786.m2\repository\com\fasterxml\classmate\0.9.0\classmate-0.9.0.jar;C:\Users\E212786.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;C:\Users\E212786.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\E212786.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\E212786.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\E212786.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\E212786.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\E212786.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\E212786.m2\repository\com\jolbox\bonecp\0.8.0.RELEASE\bonecp-0.8.0.RELEASE.jar;C:\Users\E212786.m2\repository\com\oracle\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar;C:\Users\E212786.m2\repository\org\fitnesse\fitnesse\20140901\fitnesse-20140901.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmlparser\2.1\htmlparser-2.1.jar;C:\Users\E212786.m2\repository\org\htmlparser\htmllexer\2.1\htmllexer-2.1.jar;C:\Users\E212786.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\E212786.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\E212786.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;C:\Users\E212786.m2\repository\org\json\json\20140107\json-20140107.jar;C:\Users\E212786.m2\repository\com\googlecode\java-diff-utils\diffutils\1.2.1\diffutils-1.2.1.jar;C:\Users\E212786.m2\repository\org\eclipse\jgit\org.eclipse.jgit\2.3.1.201302201838-r\org.eclipse.jgit-2.3.1.201302201838-r.jar;C:\Users\E212786.m2\repository\org\slf4j\slf4j-api\1.7.9\slf4j-api-1.7.9.jar;C:\Users\E212786.m2\repository\org\slf4j\jcl-over-slf4j\1.7.9\jcl-over-slf4j-1.7.9.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-classic\1.1.2\logback-classic-1.1.2.jar;C:\Users\E212786.m2\repository\ch\qos\logback\logback-core\1.1.2\logback-core-1.1.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.1.1\lib\idea_rt.jar fitnesse.slim.SlimService 8086

As you can see this command does not contain any quotes even though the classpath contains spaces(see installation folder for IntelliJ, the last argument). And this works.

@hansjoachim
Copy link
Contributor

Just wanted to note that I've seen similar issues with the classpath for another project when trying to upgrade from FitNesse 20140901 to a newer version. (The same project also ran into issue in an older FitNesse release, but have not seen it in 20140901. Might have been the same as #498, since that was also partly caused by paths containing spaces.)

One thing I find interesting with your classpath is that you seem to be running your project from IntelliJ IDEA. I've seen similar issues when running FitNesse from IntelliJ, but have not been able to reproduce it when starting from Eclipse. Presumably the two IDEs organize/construct the classpath in slightly different ways, so that might explain it. I don't remember if there was any obvious differences in the classpath output though.

Could you check with your project if you run into the same problems when starting from Eclipse? If so, we might want to look into how these two constructs the classpath and why FitNesse seems to have trouble with it.

@six42
Copy link
Contributor

six42 commented May 10, 2015

Hi @Thurmann,

I think you found the root cause.
The default_command_pattern that adds the fitnesseJar to the classpath without quotes and the toString function of ClassPath that adds quotes if a path with a space exists generate together an invalid command.

Could you try to add below on your test page, just to see if the test then works with the latest FitNesse version:
!define COMMAND_PATTERN {"C:\Program Files\Java\jdk1.7.0_67\bin\java" -cp %p %m}

The quotes around the classpath are not required forJava but are required for the fitsharp runner as mentioned by @sergebug in PR #532.

The cleanest solution I see is to add another replacement option %P (uppercase) to ClientBuilder. This is replaced with the concatenation of fitnesseJar and classPath combined with proper quotes.
In addition the default command pattern is then defined with this new option:

static final String COMMAND_PATTERN = "COMMAND_PATTERN";
static final String[] DEFAULT_COMMAND_PATTERN = {
javaExecutable(),
"-cp",
"%P",
"%m" };

@Thurmann
Copy link
Author

@six42 I added the command pattern to the test and then the test works on version 20150424.
So I think we have identified the problem.

@hansjoachim I can't see how this could only be a problem for IntelliJ? The default command pattern strings consists of an incorrect sequence imo. and I'm a little bit confused as to how this specific issue has seemingly not been reported before. I will try to run it from Eclipse and see whether that changes anything

@six42
Copy link
Contributor

six42 commented May 11, 2015

Glad to hear that it works.

I think the error was not noticed before as most people avoid folders with spaces as this creates always trouble.

As you are already deep in the code would you like to create a pull request to fix this?

@Thurmann
Copy link
Author

I really don't think I have enough knowledge about the FitNesse project to propose any changes. The solution may seem trivial enough but there should be a reason for why the fitnesse jar was added to the command pattern in the first place?

@hansjoachim
Copy link
Contributor

I can't see how this could only be a problem for IntelliJ?

@Thurmann To be fair, I don't know. However, I've seen similar issues with FitNesse and classpaths. There, everything would run without issues if launched from Eclipse, but if you launched from IntelliJ instead, the tests wouldn't run. Through investigation/debugging, the only difference found was how the classpath looked between the two. In this case, the problem went away with 20140901, but has since resurfaced. Unfortunately, I haven't had time to dig properly into it, so I can't say for certain, but I suspect it might be the same issue as this one.

@amolenaar amolenaar added this to the Next release milestone Jun 15, 2015
@alexkogon
Copy link
Contributor

Hi gals and guys,

I'm getting the same error message for quite a different reason, because any failure is hard coded to display it, in SlimCommandRunningClient at line 93 you have:

    throw new SlimError("Error SLiM server died before a connection could be established.");

if you look deeper into the code the actual error message is logged at line 82 of command runner, but it is not displayed to the output. I'm going to try to fix that and make a pull request...

@alexkogon
Copy link
Contributor

Actual output of the error message from the command line added here:

#772

@amolenaar
Copy link
Collaborator

#772 has been merged. I suppose that resolves the issue (for now).

@alexkogon
Copy link
Contributor

Actually I do see here that FitNesse knows that the Java process failed to startup, so would there be different exception hangling code run if the server dies later, so we can differentiate between a startup failure and the server dying? This is in reference to the other note I put on the pull request @amolenaar

Let me know if we should do anything else or we can leave it as so.

@hansjoachim
Copy link
Contributor

As I mentioned above, I've seen similar issues. After some debugging and rereading this, I understand more of the comments above.

The core of the issue is outlined in #726 (comment) and #726 (comment). While FitNesse wraps the classpath in quotation marks if it contains spaces, the COMMAND_PATTERN will prepend fitnesse.jar to this String which triggers the problem.

Unfortunately I am still able to reproduce this with 20150814, so it is not fixed. @Thurmann could you confirm?

A suggested fix is mentioned above, by introducing a new COMMAND_PATTERN which will combine the fitnesse jar and the rest of the classpath with proper quotes. Alternatively, both in this case and in the project where I see the problem, it looks like fitnesse.jar is already part of the classpath, so perhaps it doesn't need to be explicitly added by the COMMAND_PATTERN? (I'm no classpath expert though, so I don't know if there might be cases where it isn't included.)

Other comments and questions:
@Thurmann " I can't see how this could only be a problem for IntelliJ? "
I have a better answer now, and I can't believe I didn't see this earlier. It's not just that IntelliJ and Eclipse order the classpaths differently, IntelliJ adds several jars from the JRE to the classpath. On Windows these happen to reside in C:\Program Files which means the path contains a space and gets wrapped in quotation marks. Eclipse, on the other hand, does not add these extra jars, doesn't have any other spaces and doesn't run into any problems since it doesn't get the quotation marks. I was able to trigger the same issue in Eclipse by adding a jar located in a folder with space in the name to the class path.

I also verified that @six42's workaround (!define COMMAND_PATTERN {"C:\Program Files\Java\jdk1.7.0_67\bin\java" -cp %p %m}) worked, though hardcoding the Java binary path isn't a lasting solution. Is it possible to find this at runtime? I notice that for instance !path ${java.class.path} is common to find the class path. I'd like to find a list of variables like java.class.path to see if I the java binary path is one of them, but I don't know what these variables are called or where to look for them.

@amolenaar
Copy link
Collaborator

...the COMMAND_PATTERN will prepend fitnesse.jar to this String which triggers the problem.

So the executed command will look like: java -cp fitnesse.jar:"my jars/jar1.jar:jar2.jar"?

@hansjoachim
Copy link
Contributor

So the executed command will look like: java -cp fitnesse.jar:"my jars/jar1.jar:jar2.jar"?

Correct. See the first part of #726 (comment) for a real life example. Also note that it works when run as debug (since debug run use a different pattern, DEFAULT_JAVA_DEBUG_COMMAND, which doesn't add the fitnesse jar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants