Hello, I need help with my app. It works great, but when I build the project, the program doesn't want to connect to database (when Netbeans is off), it writes error:
java.net.ConnectException: Error connecting to server localhost on port 1527 with message Connecton refused.
I have derbyclient.jar imported to libraries, so I don't know what can posibly cause this problem...

hmmm Can you post the code pertaining to the problem, use:

try {
} catch(Exception ex) {

in your exceptions and also copy the full error message here. This will help to locate the exact code that is generating the exception so you can post it here. So it works fine when using it in NB? hmmmm...
NB: also check this link here it may be because netbeans did not actually add the libraries? http://www.daniweb.com/software-development/java/threads/421672/server-side-dependencies