# Scripting-Function Module Jar-Cache changes .jar filenames

**URL:** <https://forum.inductiveautomation.com/t/scripting-function-module-jar-cache-changes-jar-filenames/106034>\
**Category:** Module Development\
**Created:** [May 8, 2025, 10:44am UTC](https://forum.inductiveautomation.com/t/scripting-function-module-jar-cache-changes-jar-filenames/106034 "2025-05-08T10:44:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastian.fekete](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@sebastian.fekete](https://forum.inductiveautomation.com/u/sebastian.fekete)\
**Post date:** [May 8, 2025, 10:44am UTC](https://forum.inductiveautomation.com/t/scripting-function-module-jar-cache-changes-jar-filenames/106034/1 "2025-05-08T10:44:31Z")

</div>

Hi everyone,

i am currently developing a module based on the scripting-function project from the sdk-examples. I include the sapjco-3.1.11.jar in the modl build and create the following method to load jco classes:

```python
 @ScriptFunction(docBundlePrefix = "AbstractScriptModule")
    public Class<?> loadJcoClass(
            @ScriptArg("classPath") String classPath) throws ClassNotFoundException {

        return Class.forName("com.sap.conn.jco." + classPath);
    }

```

I can create the classes like this:

```python
AbapException = system.example.loadJcoClass("AbapException")

```

This works out well but when i try to use these classes i get this error:

> java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.ExceptionInInitializerError: Illegal JCo archive "\_\_3959807480\_\_sapjco-3.1.11.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar".

This happens because SAP does not allow to change the original jar filename but when i install the module to my Gateway the jars from the modl are stored in the jar-cache folder and receive a prefix to their name which leads to the error.

Any ideas to fix this?

@GeraldB
