# Illegal JCo archive: It is not allowed to rename or repackage the original archive sapjco3.jar in MuleSoft: cause and fix

Source page: https://ipaaserrors.com/mulesoft/sap-illegal-jco-archive-renamed
Platform: MuleSoft · SAP Connector
Checked against vendor docs: 2026-11-30

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.

## Error 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"
```

## 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".

## How to fix it

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.

## Sources

- [Troubleshooting SAP Connector](https://docs.mulesoft.com/sap-connector/latest/sap-connector-troubleshooting)

From iPaaS Errors (https://ipaaserrors.com), part of iPaaS Group. When citing, link to https://ipaaserrors.com/mulesoft/sap-illegal-jco-archive-renamed and the vendor documentation above.
