seyyed / scalaris

Automatically exported from code.google.com/p/scalaris
Apache License 2.0
0 stars 0 forks source link

scalarisctr checkinstallation cannot find a Java class, does not print essential information #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I run scalarisctl checkinstallation, there are two issues with the output
------------------
reeuwijk@babylon:~/lab/scalaris-front$ bin/scalarisctl checkinstallation
Exception in thread "main" java.lang.NoClassDefFoundError: de/zib/scalaris/Main
Caused by: java.lang.ClassNotFoundException: de.zib.scalaris.Main
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: de.zib.scalaris.Main.  Program will exit.
ERROR: the hostnames reported by Erlang and Java do not match
 please check that /etc/hosts and DNS are consistent
erl -noinput -name boot -eval "io:format("~p~n", [node()]), halt(0)."
/home/reeuwijk/lab/scalaris-front/java-api/scalaris --noconfig -lh
------------------

First issue is obviously that a class cannot be found. Moreover, the message

------------------
ERROR: the hostnames reported by Erlang and Java do not match
------------------

could be lot more helpful if it actually printed what these hostnames are. 
Something like:

------------------
ERROR: the hostnames reported by Erlang ('tinkerbell.xtreemos.org') and Java 
('mx12312.xtreemos.org') do not match
------------------

Original issue reported on code.google.com by Kees.van...@gmail.com on 19 Aug 2010 at 11:36

GoogleCodeExporter commented 8 years ago
I forgot to add:

The output also says:

------------------
 please check that /etc/hosts and DNS are consistent
------------------

It would be helpful if the message would say which approach produces which 
output.

Original comment by Kees.van...@gmail.com on 19 Aug 2010 at 11:47

GoogleCodeExporter commented 8 years ago
And another thing: the missing class issue seems to be easy to solve: it looks 
like in the Makefile the line

------------------
all: compile
------------------

Should be:

------------------
all: compile java
------------------

Following the instructions in the README then results in a compiled .jar file.

Original comment by Kees.van...@gmail.com on 19 Aug 2010 at 1:05

GoogleCodeExporter commented 8 years ago
the Java API is optional so we can not add it to the default make target

nevertheless, I added more verbose debug output as you suggested 
(rev1009-rev1012)

Original comment by nico.kru...@googlemail.com on 19 Aug 2010 at 2:05

GoogleCodeExporter commented 8 years ago
Ok, but could you then please say explicitly in the README file that you have 
to do 'make java' for the Java API?

Original comment by Kees.van...@gmail.com on 19 Aug 2010 at 2:18

GoogleCodeExporter commented 8 years ago
The README file is just a quick summary of what is written in the 
user-dev-guide and only contains most essential parts. There you can find a 
section about the Java-API and how to use it (as well as the JSON API which is 
also not described in the README).
I'd thus rather keep it that way.

Original comment by nico.kru...@googlemail.com on 19 Aug 2010 at 2:44

GoogleCodeExporter commented 8 years ago
The bottom line is still that anyone freshly configuring and compiling Scalaris 
according to the README will end up with a system where 'scalarisctr 
checkinstallation' fails, because the Java .jar file cannot be found. Surely 
that is an undesirable situation?

And if you don't want to change the current situation, I think it would be 
really helpful to have more explicit pointers to the text about Java and JSON. 
There is only one reference to the user-dev-guide, and that is at the top of 
the README. Everyone will first try to configure things from the README, and 
there is not a hint there that you need to know more for Java or JSON. 

Original comment by Kees.van...@gmail.com on 19 Aug 2010 at 3:10

GoogleCodeExporter commented 8 years ago
Please note that as of rev1012 'scalarisctl checkinstallation' will not fail 
anymore if the java api hasn't been compiled - it will properly complain about 
the missing java files

Original comment by nico.kru...@googlemail.com on 19 Aug 2010 at 5:02