MuleSoft · SAP Connector
Illegal JCo archive: It is not allowed to rename or repackage the original archive sapjco3.jar
Short answer
This SAP Connector error means the JCo 3.0.11 or later JAR was renamed, which JCo does not allow; the IDoc library has the same rule. Add the maven-shade-plugin to pom.xml with sapjco3 and sapidoc3 includes.
VerifiedLast verified
01Error text
java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-3.0.11.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar"02Likely causes
- JCo 3.0.11 or later files were renamed or repackaged. An IDoc variant reads "Illegal IDoc library archive ... It is not allowed to rename or repackage the original archive".
03How to fix it
- Add
maven-shade-plugintopom.xml(the docs' example uses 3.5.1) with includes for sapjco3 and sapidoc3. - Keep plugin versions compatible: shade 3.5.x and later needs munit-maven-plugin 2.3.x or later; shade 3.4.x and earlier needs munit 2.2.x or earlier.
- Rebuild the app. Shading may add about 2 MB.
04Fix it with AI
Copy this prompt into Claude Code, ChatGPT or any AI assistant. It already holds the error, the likely causes and the fix steps, so the assistant starts from what is known instead of guessing.
I'm getting this error in MuleSoft Anypoint (SAP Connector):
java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-3.0.11.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar"
What it usually means: This SAP Connector error means the JCo 3.0.11 or later JAR was renamed, which JCo does not allow; the IDoc library has the same rule. Add the maven-shade-plugin to pom.xml with sapjco3 and sapidoc3 includes.
Likely causes:
- JCo 3.0.11 or later files were renamed or repackaged. An IDoc variant reads "Illegal IDoc library archive ... It is not allowed to rename or repackage the original archive".
Fix steps that usually work:
1. Add maven-shade-plugin to pom.xml (the docs' example uses 3.5.1) with includes for sapjco3 and sapidoc3.
2. Keep plugin versions compatible: shade 3.5.x and later needs munit-maven-plugin 2.3.x or later; shade 3.4.x and earlier needs munit 2.2.x or earlier.
3. Rebuild the app. Shading may add about 2 MB.
Help me fix it. If you can read my project files, find where this error comes from. If not, ask me for what you need (the failing step, its input, the connection or config). Check the likely causes one by one, tell me which one it is and why, then give me the exact change to make. Do not change anything in production. Reference: https://ipaaserrors.com/mulesoft/sap-illegal-jco-archive-renamedNothing is sent anywhere from this page. Read what the assistant suggests before you apply it.
05Official documentation
→Related errors
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft pay estimates