netbeansでjava derbyに接続する際にNo Suitable Driverのエラーがでる。
derbyclient.jarにclasspathを通す必要がある。
maven projectの場合、pom.xmlに以下を記載することでderbyclient.jarがdownload
され、classpathも通る
指定するgroupId, artifactId, versionはhttps://search.maven.org/
で検索
artifactIdをderbyにすると、derbyshared.jarのみdownloadされてerrorが
解消しなかったので、derbyclientに変更したところ、derbyclient.jarも
downloadされ、error解消。
pom.xml
<dependencies>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.15.2.0</version>
</dependency>
</dependencies>
derbyclient.jarがdownloadされている様子
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/derby/derbyclient/10.15.2.0/derbyclient-10.15.2.0.pom
Progress (1): 2.5 kB
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/derby/derbyclient/10.15.2.0/derbyclient-10.15.2.0.pom (2.5 kB at 1.8 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/derby/derbyclient/10.15.2.0/derbyclient-10.15.2.0.jar
Progress (1): 4.1/601 kB
Progress (1): 8.2/601 kB