Re: Apache Derby Command Line?

2014-02-27 Thread Dyre Tjeldvoll

On 02/22/2014 07:22 PM, Turtles wrote:

I have java working properly (so ignore the quotes and anything else that
looks wrong).  That isint the issue, its getting derby to load properly.
FireDaemon loads the process a little differently than the command line but
it works because other java applications ive run as services run fine
(tomcat for example).


I'm not familiar with FireDaemon, so the following may not be relevant.

I was faced with a similar issue when trying to create Windows services 
for a server that had to be started with a long and complicated command 
line. I was able to start the server in cmd.exe just fine, but when 
issuing the net start service command it would fail with strange errors.


After some googling I discovered that there are registry entries that 
contain the string used to start the service. By inspecting that reg. 
entry after creating my service, I could see that the command line was 
being mangled in various ways if it contained spaces or other special 
characters. Some things I managed to work around by adding various 
quotes and escapes, but not always.


One thing to check is whether your daemon/service facility uses a 
command interpreter (e.g. cmd.exe) when starting the executable. If so, 
you may have to quote things that should not be expanded twice, once for 
the command line creating the service, and once for the starting of the 
service.


White space in command line arguments are particularly troublesome as 
you must prevent spaces from being interpreted as argument separators 
both when creating and launching the service.


HTH,

Dyre


Re: Apache Derby Command Line?

2014-02-25 Thread Dag H. Wanvik


On 22. feb. 2014 02:48, Turtles wrote:

I have java defined already the full command line would look like:

C:\Java Server JRE\jdk1.7.0_51\bin\java.exe -jar derby.jar %DERBY_OPTS%
-classpath %DERBY_RUNPATH% org.apache.derby.drda.NetworkServerControl
start


If you use the -jar option, you need to refer to derbyrun.jar rather 
than derby.jar.

In this case you don't need the classpath either,

just do:

java -jar path/derbyrun.jar server start

IF you omit the -jar option you will need the full classpath including 
all the relevant jars (derby.jar derbynet.jar and any of the 
localization jars needed).


Dag



And in environment variables for the firedaemon service:

JAVA_HOME: C:\Java Server JRE\jdk1.7.0_51
CLASSPATH:
C:\db-derby-10.10.1.1-bin\bin\../lib/derby.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbynet.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbyclient.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbytools.jar

So is it possible to even run it via command line?



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Apache-Derby-Command-Line-tp137335p137339.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.




Re: Apache Derby Command Line?

2014-02-24 Thread Rick Hillegas

On 2/21/14 5:48 PM, Turtles wrote:

I have java defined already the full command line would look like:

C:\Java Server JRE\jdk1.7.0_51\bin\java.exe -jar derby.jar %DERBY_OPTS%
-classpath %DERBY_RUNPATH% org.apache.derby.drda.NetworkServerControl
start
I see that you are using 7u51. Are you seeing the problem described 
here: https://issues.apache.org/jira/browse/DERBY-6438


Hope this helps,
-Rick

And in environment variables for the firedaemon service:

JAVA_HOME: C:\Java Server JRE\jdk1.7.0_51
CLASSPATH:
C:\db-derby-10.10.1.1-bin\bin\../lib/derby.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbynet.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbyclient.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbytools.jar

So is it possible to even run it via command line?



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Apache-Derby-Command-Line-tp137335p137339.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.





Re: Apache Derby Command Line?

2014-02-22 Thread Turtles
I have java working properly (so ignore the quotes and anything else that
looks wrong).  That isint the issue, its getting derby to load properly. 
FireDaemon loads the process a little differently than the command line but
it works because other java applications ive run as services run fine
(tomcat for example).



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Apache-Derby-Command-Line-tp137335p137342.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Apache Derby Command Line?

2014-02-22 Thread Bryan Pendleton

FireDaemon loads the process a little differently than the command line but
it works because other java applications ive run as services run fine


1) What, precisely, does FireDaemon do differently, and
2) What, precisely, goes wrong when you try to run Derby?

I.e., do you get an error message? Do you get an exception? Do
you get messages in the derby.log file? Do you get a Network
Server that starts but isn't behaving the way you expect? In what way?

If running that exact command line is working just fine when you
run it from the Windows Command Prompt, but running that exact
command line from the FireDaemon tool behaves differently, you
need to be as precise as possible about what behavior changes
you're seeing and what problems they're causing you.

thanks,

bryan




Apache Derby Command Line?

2014-02-21 Thread 3Turtles
I'm trying to get Apache Aerby to run as a windows service with 
FireDaemon and i need to use command line parameters rather than the 
batch scripts to start/stop Apacher Derby.


I've tried copying some of the startup parameters from the batch file 
but it's not working.


My command line is:

-jar derby.jar %DERBY_OPTS% -classpath %DERBY_RUNPATH% 
org.apache.derby.drda.NetworkServerControl start


I have the following environment variables set too:

JAVA_HOME: C:\Java Server JRE\jdk1.7.0_51
CLASSPATH: 
C:\db-derby-10.10.1.1-bin\bin\../lib/derby.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbynet.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbyclient.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbytools.jar


Any idea if i can even run Apache Derby with command line parameters?


Re: Apache Derby Command Line?

2014-02-21 Thread Bryan Pendleton

My command line is:

-jar derby.jar %DERBY_OPTS% -classpath %DERBY_RUNPATH% 
org.apache.derby.drda.NetworkServerControl start


Is it a typo? It looks like you are missing the word java
at the start of your command line.

thanks,

bryan



Re: Apache Derby Command Line?

2014-02-21 Thread Turtles
I have java defined already the full command line would look like:

C:\Java Server JRE\jdk1.7.0_51\bin\java.exe -jar derby.jar %DERBY_OPTS%
-classpath %DERBY_RUNPATH% org.apache.derby.drda.NetworkServerControl
start

And in environment variables for the firedaemon service:

JAVA_HOME: C:\Java Server JRE\jdk1.7.0_51
CLASSPATH:
C:\db-derby-10.10.1.1-bin\bin\../lib/derby.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbynet.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbyclient.jar;C:\db-derby-10.10.1.1-bin\bin\../lib/derbytools.jar
 

So is it possible to even run it via command line?



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Apache-Derby-Command-Line-tp137335p137339.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Apache Derby Command Line?

2014-02-21 Thread Peter Ondruška
C:\Java Server JRE\jdk1.7.0_51\bin\java.exe should be:
C:\Java Server JRE\jdk1.7.0_51\bin\java.exe

Peter

 On 22 Feb 2014, at 02:48, Turtles 3turt...@videotron.ca wrote:
 
 C:\Java Server JRE\jdk1.7.0_51\bin\java.exe