无法在 Websphere docker 中连接数据源:java.lang.ClassNotFoundException:DSRA8000E
Can not connect datasource in Websphere docker: java.lang.ClassNotFoundException: DSRA8000E
我 运行 docker 上的 IBM Websphere 容器,然后在管理控制台 window 中配置数据源以连接到 oracle,但出现错误:
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.
我将 class 路径驱动程序设置为 lib,但没有成功:/home/quannt11/ojdbc6.jar
原始映像不包含任何 jdbc 驱动程序,因此您需要将其包含在您正在构建的映像中。所以在你的 dockerfile 中,你应该有类似的东西:
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
然后将 jdbc 路径配置到你放置驱动程序的位置,对我来说 /home/quannt11/ojdbc6.jar
似乎来自你的本地文件系统,而不是来自容器本身。
我 运行 docker 上的 IBM Websphere 容器,然后在管理控制台 window 中配置数据源以连接到 oracle,但出现错误:
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.
我将 class 路径驱动程序设置为 lib,但没有成功:/home/quannt11/ojdbc6.jar
原始映像不包含任何 jdbc 驱动程序,因此您需要将其包含在您正在构建的映像中。所以在你的 dockerfile 中,你应该有类似的东西:
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
然后将 jdbc 路径配置到你放置驱动程序的位置,对我来说 /home/quannt11/ojdbc6.jar
似乎来自你的本地文件系统,而不是来自容器本身。