You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "Chul Kang (JIRA)" <ji...@apache.org> on 2018/04/03 06:58:00 UTC

[jira] [Created] (S2GRAPH-200) docker image does not support JDBC driver

Chul Kang created S2GRAPH-200:
---------------------------------

             Summary: docker image does not support JDBC driver
                 Key: S2GRAPH-200
                 URL: https://issues.apache.org/jira/browse/S2GRAPH-200
             Project: S2Graph
          Issue Type: Improvement
            Reporter: Chul Kang


I created a docker image with the following command, and then launched it as below with jdbc driver option.
{code:java}
// build docker image

> sbt "project s2rest_play" 'set version := "latest"' docker:publishLocal

// docker run
docker run -it s2rest_play:latest -Dhttp.port=9000 -Ddb.default.driver=com.mysql.jdbc.Driver -Ddb.default.url=jdbc:mysql://localhost:3306 ...

{code}
 

ClassNotFoundException occurred.
{code:java}
Oops, cannot start the server.
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
{code}
By default, mysql-connector is not included. So if we want to include the jar in the classpath in current image, we need to rebuild the image.
I think it would be nice to support the external jar to refer to the docker image from outside.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)