第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

將 .jar 許可證文件添加到 Docker 映像的類路徑?

將 .jar 許可證文件添加到 Docker 映像的類路徑?

慕碼人2483693 2023-09-13 15:41:10
我有一個(gè) springboot 應(yīng)用程序,它連接到 DB2 數(shù)據(jù)庫(kù),然后檢索一些數(shù)據(jù)并為其提供 REST 端點(diǎn)。為了促進(jìn)這一點(diǎn),許可證被添加到應(yīng)用程序的類路徑中,以允許它與 DB2 數(shù)據(jù)庫(kù)進(jìn)行通信。這有效。但是,當(dāng)我在本地構(gòu)建和鏡像并運(yùn)行該鏡像時(shí),我收到一條錯(cuò)誤,指出許可證不存在。{    "timestamp": 1569854043909,    "status": 500,    "error": "Internal Server Error",    "exception": "org.springframework.jdbc.CannotGetJdbcConnectionException",    "message": "Could not get JDBC Connection; nested exception is com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][t4][10509][13454][4.26.14] Connection to the data server failed. The IBM Data Server for JDBC and SQLJ license was invalid \nor was not activated for the DB2 for z/OS subsystem. If you are connecting directly to \nthe data server and using DB2 Connect Unlimited Edition for System z, perform the \nactivation step by running the activation program in the license activation kit.  \nIf you are using any other edition of DB2 Connect, obtain the license file, \ndb2jcc_license_cisuz.jar, from the license activation kit, and follow the installation \ndirections to include the license file in the class path. ERRORCODE=-4230, SQLSTATE=42968",    "path": "/test"}我假設(shè)這是因?yàn)樵S可證現(xiàn)在不包含在 Docker 容器類路徑中。我對(duì)此進(jìn)行了相當(dāng)多的研究,但看不到任何關(guān)于我將如何做到這一點(diǎn)的指示。因此,任何幫助將不勝感激。我的許可證保存在項(xiàng)目根目錄的 lib 文件夾中,是一個(gè) jar 文件。我的泊塢窗文件:FROM openjdk:8-jdk-alpineVOLUME /tmpARG JAR_FILECOPY target/mydb2jdbcproject-1.jar mydb2jdbcproject-1.jarCOPY lib/db2jcc_license_cisuz.jar db2jcc_license_cisuz.jar#CLASSPATH: lib/db2jcc_license_cisuz.jar/EXPOSE 8080ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","mydb2jdbcproject-1.jar"]
查看完整描述

1 回答

?
守候你守候我

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超10個(gè)贊

我最終不得不在運(yùn)行之前更改用于手動(dòng)設(shè)置多個(gè)類路徑的 CMD,并且由于某種原因它無(wú)法與 -jar 一起使用,因此我必須通過(guò)啟動(dòng)器類運(yùn)行。


生成的 dockerfile 如下所示:


FROM openjdk:8-jdk-alpine

RUN mkdir -p /opt/mvp2/db2jdbc /opt/mvp2/app


COPY target/db2new-0.1.jar /opt/mvp2/app/

COPY jdbc/db2jcc4.jar  /opt/mvp2/db2jdbc/

COPY jdbc/db2jcc_license_cisuz.jar  /opt/mvp2/db2jdbc/


CMD ["java","-classpath","/opt/mvp2/db2jdbc/db2jcc4.jar:/opt/mvp2/db2jdbc/db2jcc_license_cisuz.jar:/opt/mvp2/app/db2new-0.1.jar:.","org.springframework.boot.loader.JarLauncher"]



查看完整回答
反對(duì) 回復(fù) 2023-09-13
  • 1 回答
  • 0 關(guān)注
  • 92 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)