I\'ve being working on a java project using Derbyclient (database locally hosted). I\'m done with everything except that when I\'m trying the desktop app while I\'m not manually
Derby can be run in two modes embedded or server-based. Server-based allows multiple programs to access the same database. Embedded allows your application to run without a server. Your url selects server-based. The connection refused error indicates that the server is not running. Since the server was started within Netbeans it is shutdown when Netbeans is not running.
The options are:
To switch to embedded see Apache's documentation for deployment options: Eliminate the "//localhost:1527" from the url. also see the tutorial "Run SQL using the embedded driver" at https://builds.apache.org/job/Derby-docs/lastSuccessfulBuild/artifact/trunk/out/getstart/index.html
To start the server in a seperate command window see the syntax for derbyrun.jar: https://builds.apache.org/job/Derby-docs/lastSuccessfulBuild/artifact/trunk/out/getstart/rgsderbyrunjarsyntax.html