You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by James McNamara <3r...@verizon.net> on 2006/09/21 14:02:16 UTC

starting and connecting to server without eclipse

hi-

i have been going through the documentation and i still cant get connected.

the first time you can see it connected. that is because i had it already
connected using eclipse ide.

the second time i had shut the connection off on eclipse and then tried to
connect using ij at the command line in the frameworks\etc.  it refuses.

i want to deploy my app but am having a tough time getting a connection
unless i use the eclipse environment to start the server.

any suggestions or help why this may be acting this way?

thanks for any help,
jim

C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java org.apache.derby.tool
s.ij
ij version 10.1
ij>  connect 'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=u
ser1;password=user1';
ij> exit;

C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java org.apache.derby.tool
s.ij
ij version 10.1
ij> connect 'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=us
er1;password=user1';
ERROR (no SQLState): java.net.ConnectException : Error opening socket to server
localhost on port 1527 with message : Connection refused: connect
ij>

RE: starting and connecting to server without eclipse

Posted by Jim McNamara <3r...@verizon.net>.
Rajesh and Dan-

Thanks for your encouragement.  I have it started.  It isn't that
Hard to do, but I am new.  My program is executing from a jar
I created with fatjar plug-in for eclipse and it is
Now connected to derby.  Now I have to package it in an exe
And upload it to my site after a little testing.


Thanks very much.
That was a huge help,
jim

-----Original Message-----
From: Rajesh Kartha [mailto:kartha02@gmail.com] 
Sent: Thursday, September 21, 2006 4:28 PM
To: Derby Discussion
Subject: Re: starting and connecting to server without eclipse

"The system cannot find the path specified."

The above message seems to be related to some PATH issue while executing

the 'java' command.

What does your JAVA_HOME point to ?
Please make sure that the JAVA_HOME is pointed to the Java install dir 
(not to the <java-install-dir>/bin directory).

Another way  to check if things are working is using the java' command 
directly;

<java-install-dir>/bin/java org.apache.derby.drda.NetworkServerControl
start

If your CLASSPATH environment variable is set properly and there is 
valid java installation,  the above command
should work just fine.

-Rajesh



Jim McNamara wrote:

>Hi dan-
>
>Still cant get it. I agree can't connect if it is not started.
>Here is the message telling me it isn't starting.
>
>Thanks,
>jim
>
>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>set
>CLASSPATH=c:\DB-DER~1.
>1-B\lib\derby.jar;c:\DB-DER~1.1-B\lib\derbytools.jar;c:\DB-DER~1.1-B\li
b
>\derbyne
>t.jar;c:\db-derby-10.1.3.1-bin\lib\derbyclient.jar;c:\db-derby-10.1.3.1
-
>bin\lib\
>derbytools.jar
>
>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>startNetworkServe
r
>The system cannot find the path specified.
>
>-----Original Message-----
>From: Dan Scott [mailto:denials@gmail.com] 
>Sent: Thursday, September 21, 2006 11:01 AM
>To: Derby Discussion
>Subject: Re: starting and connecting to server without eclipse
>
>James:
>
>Are you starting the server from the command line using the
>startNetworkServer batch file before trying to connect the second
>time?
>
>The server has to be running before the network driver can connect to
>it.
>
>Dan
>
>On 21/09/06, James McNamara <3r...@verizon.net> wrote:
>  
>
>>hi-
>>
>>i have been going through the documentation and i still cant get
>>    
>>
>connected.
>  
>
>>the first time you can see it connected. that is because i had it
>>    
>>
>already
>  
>
>>connected using eclipse ide.
>>
>>the second time i had shut the connection off on eclipse and then
>>    
>>
>tried to
>  
>
>>connect using ij at the command line in the frameworks\etc.  it
>>    
>>
>refuses.
>  
>
>>i want to deploy my app but am having a tough time getting a
>>    
>>
>connection
>  
>
>>unless i use the eclipse environment to start the server.
>>
>>any suggestions or help why this may be acting this way?
>>
>>thanks for any help,
>>jim
>>
>>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
>>org.apache.derby.tool
>>s.ij
>>ij version 10.1
>>ij>  connect
>>'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=u
>>ser1;password=user1';
>>ij> exit;
>>
>>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
>>org.apache.derby.tool
>>s.ij
>>ij version 10.1
>>ij> connect
>>'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=us
>>er1;password=user1';
>>ERROR (no SQLState): java.net.ConnectException : Error opening socket
>>    
>>
>to
>  
>
>>server
>>localhost on port 1527 with message : Connection refused: connect
>>ij>
>>    
>>
>
>
>  
>


Re: starting and connecting to server without eclipse

Posted by Rajesh Kartha <ka...@gmail.com>.
"The system cannot find the path specified."

The above message seems to be related to some PATH issue while executing 
the 'java' command.

What does your JAVA_HOME point to ?
Please make sure that the JAVA_HOME is pointed to the Java install dir 
(not to the <java-install-dir>/bin directory).

Another way  to check if things are working is using the java' command 
directly;

<java-install-dir>/bin/java org.apache.derby.drda.NetworkServerControl start

If your CLASSPATH environment variable is set properly and there is 
valid java installation,  the above command
should work just fine.

-Rajesh



Jim McNamara wrote:

>Hi dan-
>
>Still cant get it. I agree can't connect if it is not started.
>Here is the message telling me it isn't starting.
>
>Thanks,
>jim
>
>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>set
>CLASSPATH=c:\DB-DER~1.
>1-B\lib\derby.jar;c:\DB-DER~1.1-B\lib\derbytools.jar;c:\DB-DER~1.1-B\lib
>\derbyne
>t.jar;c:\db-derby-10.1.3.1-bin\lib\derbyclient.jar;c:\db-derby-10.1.3.1-
>bin\lib\
>derbytools.jar
>
>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>startNetworkServer
>The system cannot find the path specified.
>
>-----Original Message-----
>From: Dan Scott [mailto:denials@gmail.com] 
>Sent: Thursday, September 21, 2006 11:01 AM
>To: Derby Discussion
>Subject: Re: starting and connecting to server without eclipse
>
>James:
>
>Are you starting the server from the command line using the
>startNetworkServer batch file before trying to connect the second
>time?
>
>The server has to be running before the network driver can connect to
>it.
>
>Dan
>
>On 21/09/06, James McNamara <3r...@verizon.net> wrote:
>  
>
>>hi-
>>
>>i have been going through the documentation and i still cant get
>>    
>>
>connected.
>  
>
>>the first time you can see it connected. that is because i had it
>>    
>>
>already
>  
>
>>connected using eclipse ide.
>>
>>the second time i had shut the connection off on eclipse and then
>>    
>>
>tried to
>  
>
>>connect using ij at the command line in the frameworks\etc.  it
>>    
>>
>refuses.
>  
>
>>i want to deploy my app but am having a tough time getting a
>>    
>>
>connection
>  
>
>>unless i use the eclipse environment to start the server.
>>
>>any suggestions or help why this may be acting this way?
>>
>>thanks for any help,
>>jim
>>
>>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
>>org.apache.derby.tool
>>s.ij
>>ij version 10.1
>>ij>  connect
>>'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=u
>>ser1;password=user1';
>>ij> exit;
>>
>>C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
>>org.apache.derby.tool
>>s.ij
>>ij version 10.1
>>ij> connect
>>'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=us
>>er1;password=user1';
>>ERROR (no SQLState): java.net.ConnectException : Error opening socket
>>    
>>
>to
>  
>
>>server
>>localhost on port 1527 with message : Connection refused: connect
>>ij>
>>    
>>
>
>
>  
>


RE: starting and connecting to server without eclipse

Posted by Jim McNamara <3r...@verizon.net>.
Hi dan-

Still cant get it. I agree can't connect if it is not started.
Here is the message telling me it isn't starting.

Thanks,
jim

C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>set
CLASSPATH=c:\DB-DER~1.
1-B\lib\derby.jar;c:\DB-DER~1.1-B\lib\derbytools.jar;c:\DB-DER~1.1-B\lib
\derbyne
t.jar;c:\db-derby-10.1.3.1-bin\lib\derbyclient.jar;c:\db-derby-10.1.3.1-
bin\lib\
derbytools.jar

C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>startNetworkServer
The system cannot find the path specified.

-----Original Message-----
From: Dan Scott [mailto:denials@gmail.com] 
Sent: Thursday, September 21, 2006 11:01 AM
To: Derby Discussion
Subject: Re: starting and connecting to server without eclipse

James:

Are you starting the server from the command line using the
startNetworkServer batch file before trying to connect the second
time?

The server has to be running before the network driver can connect to
it.

Dan

On 21/09/06, James McNamara <3r...@verizon.net> wrote:
>
>
> hi-
>
> i have been going through the documentation and i still cant get
connected.
>
> the first time you can see it connected. that is because i had it
already
> connected using eclipse ide.
>
> the second time i had shut the connection off on eclipse and then
tried to
> connect using ij at the command line in the frameworks\etc.  it
refuses.
>
> i want to deploy my app but am having a tough time getting a
connection
> unless i use the eclipse environment to start the server.
>
> any suggestions or help why this may be acting this way?
>
> thanks for any help,
> jim
>
> C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
> org.apache.derby.tool
> s.ij
> ij version 10.1
> ij>  connect
> 'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=u
> ser1;password=user1';
> ij> exit;
>
> C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
> org.apache.derby.tool
> s.ij
> ij version 10.1
> ij> connect
> 'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=us
> er1;password=user1';
> ERROR (no SQLState): java.net.ConnectException : Error opening socket
to
> server
> localhost on port 1527 with message : Connection refused: connect
> ij>


Re: starting and connecting to server without eclipse

Posted by Dan Scott <de...@gmail.com>.
James:

Are you starting the server from the command line using the
startNetworkServer batch file before trying to connect the second
time?

The server has to be running before the network driver can connect to it.

Dan

On 21/09/06, James McNamara <3r...@verizon.net> wrote:
>
>
> hi-
>
> i have been going through the documentation and i still cant get connected.
>
> the first time you can see it connected. that is because i had it already
> connected using eclipse ide.
>
> the second time i had shut the connection off on eclipse and then tried to
> connect using ij at the command line in the frameworks\etc.  it refuses.
>
> i want to deploy my app but am having a tough time getting a connection
> unless i use the eclipse environment to start the server.
>
> any suggestions or help why this may be acting this way?
>
> thanks for any help,
> jim
>
> C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
> org.apache.derby.tool
> s.ij
> ij version 10.1
> ij>  connect
> 'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=u
> ser1;password=user1';
> ij> exit;
>
> C:\db-derby-10.1.3.1-bin\frameworks\NetworkServer\bin>java
> org.apache.derby.tool
> s.ij
> ij version 10.1
> ij> connect
> 'jdbc:derby://localhost:1527/c:/ab/derbyDB/myDB;create=false;user=us
> er1;password=user1';
> ERROR (no SQLState): java.net.ConnectException : Error opening socket to
> server
> localhost on port 1527 with message : Connection refused: connect
> ij>