cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hi there, I have a challenge while integrating SAP JCo (3.1.10) into a Maven. Naming not allowed

Shel
Newcomer
666

My issue is integrating SAP JCo (version 3.1.10) into a Maven-based Java project, specifically for creating a custom NiFi processor.

Despite attempts to use Maven's maven-dependency-plugin with configurations like stripVersion or destFileName to rename the jar back to sapjco3.jar during the build process, the issue persists. This causes the following runtime error:

java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-3.1.10.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar".
QUESTIONS:
1. Maven Integration: Is there an officially recommended approach to integrate SAP JCo into Maven projects while following SAP's archive naming restrictions?
2. Runtime Compliance: Are there specific runtime configurations, environment variables, or Java options that could help resolve this issue?
3. Artifact Packaging: How should the sapjco3.jar be handled in scenarios where it needs to be included as part of a deployable archive (e.g., NiFi’s NAR format)?
4. Future Enhancements: Given the challenges of using JCo with Maven, are there any plans for SAP to release Maven-compatible artifacts or documentation addressing these issues?
 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Ulrich_Schmidt1
Product and Topic Expert
Product and Topic Expert

Well, to make a long story short: JCo does not support Maven projects. And it cannot easily be achieved, because JCo is not a pure Java application, but a mixed application with Java and C/C++ parts, which requires the platform-dependent C/C++ library (sapjco3.dll / libsapjco3.so) to be present in the "correct" location and added to the java.library.path.