---
description: Might happen because Kotlin file is not package into jar.
---

# Error 404 in Docker but works on local run

## How to solve the problem

Check if you can find all classes and resources package in the jar file:&#x20;

```
jar -tf <jar>
```

{% hint style="info" %}
For `java` to find Kotlin runtime classes, **the contents** of `kotlin-reflect.jar` and `kotlin-runtime.jar` need to be present in the JAR. Basically, IDEA is unzipping those two files and dumping their content into what will become the JAR. Then IDEA adds the compiler output of our own code.

That **KotlinJavaRuntime (Project Library)** is automatically generated when we create a new Kotlin project. It is a container that holds all the JAR files that belong to the Kotlin runtime. Check **File** > **Project Structure** and then select **Libraries**. We will find two JARs with binaries and one that holds source code (which will be used when you navigate to the source of a Kotlin runtime class).

If that **KotlinJavaRuntime (Project Library)** entry is not there, we need to fix that before setting up JAR creation. **Tools** > **Kotlin** > **Configure Kotlin in Project** should do the trick. After that, the Kotlin runtime library object should be available.

Source: [https://discuss.kotlinlang.org/t/jar-file-only-works-with-java-classes-but-not-with-kotlin/1487/23](https://discuss.kotlinlang.org/t/jar-file-only-works-with-java-classes-but-not-with-kotlin/1487/23)
{% endhint %}

