This week's book giveaways are in the Scala and Android forums. We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line! See this thread and this one for details.
I have an application that connects to a Derby database using the Derby Network Server that has been started as a standalone process outside of the Netbeans IDE.
When I run my application within the IDE (I don't start the Network Server from the Services tab as it is already running) the following is observed:-
The application connects successfully to the server.
Subsequent database accesses fail with error Internal Exception: java.sql.SQLNonTransientConnectionException: The connection was refused because the database MyAppDB was not found.
Error Code: 40000
The persistence.xml in Netbeans shows the following for the JDBC connection:- jdbc:derby://localhost:1527//Users/David/Desktop/DerbyDatabases/MyAppDB [david on TEST]
However the xml source in Netbeans shows the following:- jdbc:derby://localhost:1527/MyAppDB
I can fix this problem by changing the persistence.xml source (in Netbeans) to show the following for JDBC connection:-