0

I have installed NetBeans 11 and installed Derby. I have configured the Derby and started the JavaDB server in the Services tab. The IDE reports

  Wed Apr 17 17:26:43 EEST 2019 : Security manager installed using the 
  Basic server security policy.
  Wed Apr 17 17:26:44 EEST 2019 : Apache Derby Network Server - 10.15.1.3 
  - (1853019) started and ready to accept connections on port 1527

Creating the Sample database also goes fine. But then... I can't find a way to connect to the database via IDE. It should be as simple as making few clicks (and it has been). (Note: I can do that in code.) This is the error message

  Unable to connect. Cannot establish a connection to 
  jdbc:derby://localhost:1527/sample using 
  org.apache.derby.jdbc.ClientDriver (Unable to find a suitable driver).

The URL is fine, so this seems to be a driver issue. However, the problem is in the Netbeans IDE. Any suggestions?

Re-installing the NetBeans has not fixed the problem.

skomisa
  • 16,436
  • 7
  • 61
  • 102
  • I see that you are using Derby 10.15. It requires JDK 9 or higher. That might be part of the problem? – Bryan Pendleton Apr 17 '19 at 21:57
  • Yes, I know that. Java is: java version "12" 2019-03-19 Java(TM) SE Runtime Environment (build 12+33) Java HotSpot(TM) 64-Bit Server VM (build 12+33, mixed mode, sharing) – Pekka Henttonen Apr 18 '19 at 08:05

1 Answers1

0

Add the derbyshared.jar and derbytools.jar to your JDBC driver definitions for "Java DB (Embedded)" and "Java DB (Network)" and it works. You'll find them in your $DERBY_HOME/lib directory.

For more information see https://issues.apache.org/jira/browse/NETBEANS-3424?focusedCommentId=17118150&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17118150

pschulz
  • 1
  • 1