Connecting a MySQL database to Glassfish classpath is not set or classname is wrong

后端 未结 5 1363
情深已故
情深已故 2020-12-28 14:47

I\'m swapping out a derby database for a MySQL one. I had everything working before but after what I thought was the proper configuration I\'m getting the error:

Cau

5条回答
  •  情歌与酒
    2020-12-28 15:12

    I encountered this issue in 2019 and would like to note that if you are using docker image payara/server-full (I am using 5.194 so far) as I do the location to place the driver jar is:

    /opt/payara/appserver/glassfish/domains/production/lib/

    In the end I am doing something like this in the Dockerfile of payara server:

    RUN wget http://central.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/2.2.0/mariadb-java-client-2.2.0.jar \
        -O /opt/payara/appserver/glassfish/domains/production/lib/mariadb-java-client-2.2.0.jar
    

提交回复
热议问题