bridgedb / BridgeDb

The BridgeDb Library source code
https://bridgedb.org/
Apache License 2.0
28 stars 21 forks source link

Update to client driver derby #nwobridgedb #207

Closed DeniseSl22 closed 2 years ago

DeniseSl22 commented 2 years ago

Error when running groovy script, grabbing bridgedb jars from maven central:

@Grab(group='org.bridgedb', module='org.bridgedb', version='3.0.15')
@Grab(group='org.bridgedb', module='org.bridgedb.bio', version='3.0.15')
@Grab(group='org.bridgedb', module='org.bridgedb.rdb', version='3.0.15')
@Grab(group='org.bridgedb', module='org.bridgedb.rdb.construct', version='3.0.15')

Error message for ./metaboliteMappings.sh

Caught: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    at createDerbyWikidata.run(createDerbyWikidata.groovy:37)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

I assume that one of the bridged jars above is depending on a derby driver, which does not include the 'org.apache.derby.jdbc.EmbeddedDriver' class. When I use a local (very old) derby.jar, as well as BridgeDb 3.0.13, my code works.

egonw commented 2 years ago

I updated the code to use ClientDriver as suggested in an StackOverflow post. Let's see if that fixes things.