Aaron Mulder wrote:
> 
>         I ran into something like this yesterday, and was convinced that
> my new install was totally broken.  But it turned out that I didn't have
> the "java" executale on my path, and the Hypersonic service executes a
> command like "java org.hsql.startup", so if you don't have "java" on your
> path, it never starts.

um, i have /usr/local/java/bin in my PATH but i followed your line of
thinking: if i do 'java -classpath ./hsql.jar org.hsql.Server' from one
terminal and the server comes up (i'm prompted with 'Server 1.4 is running').
i can then go away to another terminal and run the run.sh script for jBoss
and everything works wonderfully.

i've looked at org/jboss/main/jdbc/HypersonicDatabase.java and added some
extra processing (like a dump of the exception that's stopping this
starting - why isn't that in there!) and it IS because it cannot execute
java!

ok ... calming down a little ... you should never, that's NEVER, hard code
executable names or paths in your code.  it is almost unbelievable that
the line:

proc = Runtime.getRuntime().exec("java -classpath ../lib/ext/hsql.jar
org.hsql.Server");

would appear in code.  what happens if the java executable changes name?
what happens if the Hypersonic server class changes its name?  i'd much
rather see this in a configuration file, so:

i have updated the version on my machine to read this command from the
conf/jboss.conf file by updating the HypersonicDatabase constructor to
take a String and store it in a final member variable.  the conf/jboss.conf
file now reads (for the Hypersonic bit):

<MLET CODE = "org.jboss.jdbc.HypersonicDatabase" ARCHIVE="jboss.jar,hsql.jar"
CODEBASE="../lib/ext/">
   <ARG TYPE="java.lang.String" VALUE="/usr/local/java/bin/java -classpath
../lib/ext/hsql.jar org.hsql.Server">
</MLET>

someone want to check what i've done and update the code in the CVS as 
this will probably solve a lot of problems!

anyway, now that i have the system working i'm going to try it out.

Cheers,
Matt


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to