# Temporal IO Java Runtime Exception within Docker Container

**URL:** <https://community.temporal.io/t/temporal-io-java-runtime-exception-within-docker-container/4731>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [May 18, 2022, 10:00am UTC](https://community.temporal.io/t/temporal-io-java-runtime-exception-within-docker-container/4731 "2022-05-18T10:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maikdrop](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@maikdrop](https://community.temporal.io/u/maikdrop)\
**Post date:** [May 18, 2022, 10:00am UTC](https://community.temporal.io/t/temporal-io-java-runtime-exception-within-docker-container/4731/1 "2022-05-18T10:00:00Z")

</div>

Hi guys,

hope you can help me. I have the following basic setup:

- Temporal IO: 1.11.0
- Spring Boot: 2.6.7
- Docker Base Image: eclipse-temurin:17-jre-alpine
- Build tool: Gradle

Currently, when the application is build without docker everything started as expected. But when creating an image and starting it within a Docker Container there a is runtime exception.

After the line:  
“[main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit ‘default’”, we get the following output in the console:

 ![Screenshot 2022-05-18 at 11.32.08](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/8/8e2a881641bd849de839d49f52c52f31141f6a73.jpeg)

This Exception happens when Spring Boot is creating the Beans for the WorkflowServiceStubs, the WorkflowClient and the WorkerFactory:

 ![Screenshot 2022-05-18 at 11.37.12](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/2/232492c675eb7cbf908dc80415443264ccc85cfe.png)

If I’m executing only the jar file it works as expected, the WorkflowServiceStubs could be created and a workflow could be started after the Spring Boot Server finished the setup:

“[main] INFO i.t.s.WorkflowServiceStubsImpl - Created WorkflowServiceStubs for channel: ManagedChannelOrphanWrapper{delegate=ManagedChannelImpl{logId=1, target=127.0.0.1:7233}}”

The behaviour is reproducible on different machines with different OS and CPU Architectures.

In order to solve the problem we have tried it with the openjdk:17-alpine base image and other suggestion from i.g. Stackoverflow. But we have still the same issue. Now our troubleshooting is stuck. So, do you have any ideas how we can solve it?

Best wishes  
Maik

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [May 18, 2022, 2:51pm UTC](https://community.temporal.io/t/temporal-io-java-runtime-exception-within-docker-container/4731/2 "2022-05-18T14:51:07Z")

</div>

Hi @maikdrop

this is a known issue we reported [here](https://github.com/temporalio/sdk-java/pull/927) and opened issue with grpc-java [here](https://github.com/grpc/grpc-java/issues/8751).  
You can follow the different options mentioned in this latter issue, or switch from alpine to glibc linux distribution.

A user [suggested a workaround](https://github.com/grpc/grpc-java/issues/8751#issuecomment-1112549548) which hopefully should work for you as well, give it a try if you cannot switch to glibc. Hope this helps.

---

<div class="post-metadata">

**Author:** ![maikdrop](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@maikdrop](https://community.temporal.io/u/maikdrop)\
**Post date:** [May 18, 2022, 2:57pm UTC](https://community.temporal.io/t/temporal-io-java-runtime-exception-within-docker-container/4731/3 "2022-05-18T14:57:09Z")

</div>

Awesome, thank you very much. We will investigate that. I’ll give you an update, if the issue could been solved or not.

Cheers, Maik
