1

I am using JavaDB for the first time and I am having trouble getting my program to run. Whenever I run it I get this error:

"Error connecting to server localhost on port 1527 with message Connection refused: connect"

My database and code are all setup okay as when I ran it on someone elses computer it worked fine, but on mine it doesn't. I'm using Netbeans 7.3.1 as that is the version I have to use for school. I am not sure what is causing this and I could really use some help. If you have any questions or want me to post some code just let me know.

Thanks

entropy
  • 169
  • 3
  • 13
  • Do you have JavaDB running on localhost on port 1527? – jny Aug 05 '14 at 14:50
  • See also http://stackoverflow.com/questions/6950996/cant-connect-to-derby-in-eclipse?rq=1 and http://stackoverflow.com/questions/32919136/how-to-configure-javadb-in-eclipsepart2 – Bryan Pendleton Oct 03 '15 at 15:02

2 Answers2

1

Have you checked the status of that port 1527 on your PC?

On windows:

netstat -an | find ":PORT_NUMBER"

and on Linux:

netstat -an |grep PORT_NUMBER

If it turns out it is used by some other application you can do one of two things:

1) Free the port

2) Change the port your app is running on

It might also be possible, that JavaDB is running on a different port and another you will have to either change it in DB or your app anyway.

EDIT: Here are another ways of checking the port How to determine if a port is open on a Windows server?

Community
  • 1
  • 1
Mateusz Chrzaszcz
  • 1,240
  • 14
  • 32
0

Did you install it? Is the process running?

jny
  • 8,007
  • 3
  • 37
  • 56