taibc
taibc

Reputation: 923

Can not connect datasource in Websphere docker: java.lang.ClassNotFoundException: DSRA8000E

I run IBM Websphere container on docker and then config datasource to connect to oracle in admin console window, but I got the error:

The test connection operation failed for data source ibanking on server server1 at node DefaultNode01 with the following exception: java.lang.ClassNotFoundException: DSRA8000E: Java archive (JAR) or compressed files do not exist in the path or the required access is not allowed. Path: /home/quannt11/ojdbc6.jar. View JVM logs for further details.

I set the class path driver to lib, but not successfully: /home/quannt11/ojdbc6.jar

Upvotes: 0

Views: 2085

Answers (1)

Gas
Gas

Reputation: 18030

Original image doesn't contain any jdbc drivers, so you will need to include that in the image you are building. So in your dockerfile, you should have something similar to:

FROM ibmcom/websphere-traditional:latest
COPY --chown=was:was ojdbc6.jar /work/drivers
COPY --chown=was:was myApp.war /work/app
RUN /work/configure.sh 

And then configure the jdbc path to the location that you placed the driver, as for me it seems that the /home/quannt11/ojdbc6.jar is from your local file system, not from the container itself.

Upvotes: 1

Related Questions