AnsweredAssumed Answered

Spark log-out (Ticket SPARK-1215)

Question asked by mirceac on Aug 15, 2011
Latest reply on Sep 23, 2011 by mirceac

Hi,

 

I made some testing on Spark log-out/Spark log-out with reason menu actions and I noticed the following behavior:

 

1.Test on Windows XP - works with no problem for Spark installed from Spark 2.6.3 installer

2.Test on Windows 7 - works with no problem for Spark installed from Spark 2.6.3. installer

3.Test on Fedora Core 12 - unpacked Spark 2.6.3 tar.gz and started Spark by launching the start script - it does not work, it just exit spark without starting it again

4.Run spark using java command: java -jar startup.jar on all systems above and it fails for every case with following error in the console:

 

java.io.IOException: Cannot run program "/home/mirceac/.Spark/bin/spark": java.io.IOException: error=2, No such file or directory

          at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)

          at java.lang.Runtime.exec(Runtime.java:610)

          at java.lang.Runtime.exec(Runtime.java:448)

          at java.lang.Runtime.exec(Runtime.java:345)

 

These findings are very similar with SPARK-1215 ticket description

 

So I was thinking to make a different approach of this feature:

1. use java -cp <classpath> org.jivesoftware.launcher.Startup

a) the location of Startup.class is operating system independent retrieved using java.lang capabilities

b) the <classpath> is operating system independent calculated given the location retrieved in a)

 

I am attaching a patch with this approach - that is tested on Windows XP, Windows 7, Fedora Core 12 and it has no importance how you start spark (using java -jar command or by running a start script, or by running an exe in windows)

 

It should work for MAC as well since there are the same commands working on MAC

 

Please have a look on the patch and let me know if worth changing the restart mechanism given above findings

Attachments

Outcomes