In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you the problems encountered in the springboot project connecting to sap and deploying to docker. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Preface
Mainly record the problems encountered in assisting the deployment of access to sap, and only record the answers to the problems, without explaining the principle.
Question 1, question 1: Illegal JCo archive "sapjco-1.0.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar"
Solution 1: rename sapjco-1.0.jar to sapjco3.jar in a manual project
But we didn't adopt this plan.
Solution 2: specify the scope of maven as system, as follows
Com.sap sapjco ${sap.version} system ${project.basedir} / lib/sapjco3.jar
Then specify resources, which looks like this
Org.springframework.boot spring-boot-maven-plugin ${spring-boot.version} repackage Maven-compiler-plugin 1.81.8 UTF-8 ${project.basedir} / lib ${project.basedir} / lib BOOT-INF/lib/ * * / .jar ${project.basedir} / lib BOOT-INF * * / * .so * * / * .dll src/main/resources * * / * .yml * * / .xml
The function of this is to push sapjco3.jar into BOOT-INF/lib/.
Question 2: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
Because the project is deployed to docker, this article only writes about docker-based solutions.
Solutions are as follows:
Specify the LD_LIBRARY_PATH environment variable in dockerFile, which looks like this
FROM adoptopenjdk/openjdk8VOLUME / tmp#ENV JAVA_OPTS= "- Dcom.sun.management.jmxremote.port=39083-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=false" ENV JAVA_OPTS= "ENV LD_LIBRARY_PATH / usr/local/lib:$LD_LIBRARY_PATHCOPY localtime / etc/localtimeRUN echo" Asia/Shanghai "> / etc/timezoneCOPY hello-biz/target/hello-biz-*.jar app.jarCOPY hello-biz/lib/libsapjco3.so / usr/local/lib/libsapjco3.soENTRYPOINT [" sh ","-c " "java $JAVA_OPTS-Djava.security.egd=file:/dev/./urandom-jar / app.jar"] these are the problems encountered by the springboot project in connecting to sap and deploying to docker. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.