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

Patrick Schulz commented on NETBEANS-3424:
------------------------------------------

Workaround (tested with derby 10.15.2.0 and netbeans 11.3)

Add the missing JAR files from derby's lib folder (that are defined in 
setEmbeddedCP resp. setNetworkClientCP scripts) to the "Java DB (Embedded)" 
resp. "Java DB (Network)" JDBC driver definitions:
 * Embedded
 ** derbyshared.jar (must, according to 
[http://db.apache.org/derby/releases/release-10.15.1.3.cgi])
 ** derbytools.jar (must, as it contains the missing driver class)
 ** derbyoptionaltools.jar (really seems to be just optional, but when 
setEmbeddedCP sets it, why shouldn't I do it as well)
 * Network
 ** derbyshared.jar
 ** derbytools.jar 

derbytools.jar contains the missing driver file and this derbyshared.jar seem 
to contain classes used by derbytools.jar.

!image-2020-05-28-00-08-43-882.png|width=602,height=231!

!image-2020-05-28-00-13-29-860.png|width=602,height=237!

 

The general solution seems to be to add these jars if they exist inside derby's 
lib folder, when it becomes set in the Java DB Properties dialog.

!image-2020-05-28-00-22-52-928.png|width=437,height=254!

Alternatively make use of the set***CP scripts to determine the JARs to use, 
just in case they add more.

> Unable to use Derby DB version 10.15.1.3 in Netbeans 11.2
> ---------------------------------------------------------
>
>                 Key: NETBEANS-3424
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3424
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 11.2
>         Environment: Product Version: Apache NetBeans IDE 11.2
> Java: 13.0.1; OpenJDK 64-Bit Server VM 13.0.1+9
> Runtime: OpenJDK Runtime Environment 13.0.1+9
> System: Windows 10 version 10.0 running on amd64; Cp1252; en_GB (nb)
>            Reporter: Stephen Brooksbank
>            Priority: Major
>         Attachments: Connect to Sample Database - Derby15.png, JavaDB 
> Properties - Derby15.png, image-2020-05-28-00-08-43-882.png, 
> image-2020-05-28-00-13-29-860.png, image-2020-05-28-00-22-52-928.png
>
>
> If you assign Derby version 10.15.1.3 as the Java DB installation, as soon as 
> you try and connect to the sample database, or as soon as you try and create 
> a new database, you get an error dialog box "_Unable to connect. Cannot 
> establish connection to jdbc:derby://localhost:1527/sample using 
> org.apache.derby.jdbc.ClientDriver (unable to find a suitable driver)._"
> If instead you use Derby version 10.14.2.0, it all works OK.
> Note: please refer to the release notes for the new version of Derby DB here 
> : [http://db.apache.org/derby/releases/release-10.15.1.3.cgi]
> This indicates that some "JPMS modularization" has taken place - I wonder if 
> this will be the root cause of the issue - and in which case it will impact 
> all versions of NetBeans
>  
> To reproduce the issue:
> 1. In the Services window, expand Databases, click right on Java DB and set 
> the properties to point to the installation folder for Derby 10.15.1.3
> 2. Click right on the sample database and select Connect...
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to