Edge App deployment failed on my Raspberry Docker but worked on Docker Windows and Docker WSL

I exported my Edge application via Bndtools (EdgeApp.bndrun → Export) and got an openems-edge.jar. Using the same JAR, Dockerfile, and docker-compose.yml:

  1. On Windows (Docker Desktop):
  • Runs without issue.
  1. On Docker under WSL:
  • Also runs fine.
  1. On Docker in a Raspberry Pi (Raspbian 11 64-bit):
  • Container immediately crashes with:
java.lang.NoClassDefFoundError: org/apache/felix/framework/util/SecureAction
    at org.apache.felix.framework.Felix.<clinit>(Felix.java:114)
    …
Caused by: java.lang.ClassNotFoundException: org.apache.felix.framework.util.SecureAction
    at java.base/java.net.URLClassLoader.findClass(Unknown Source)
    …

Even pulling the latest openems/openems-edge image from Docker Hub and using the same Compose file yields the same error on ARM64.

Has anyone seen SecureAction load on x86 but not on Raspbian? Why would the identical setup work under Desktop/WSL but fail on Raspberry Pi?


Dockerfile:

# Use a multi-arch JRE 21 image (Temurin is available for ARM64)
FROM eclipse-temurin:21-jre-alpine

# Set working directory inside the container
WORKDIR /usr/lib/openems

# Copy the built OpenEMS Edge JAR file into the container
COPY openems-edge.jar .

# Expose port 8080 for the Apache Felix Web Console
EXPOSE 8080 8081

# Run the JAR with the configuration directory set to /etc/openems/
CMD ["java", "-Dfelix.cm.dir=/etc/openems.d", "-jar", "openems-edge.jar"]

docker-compose.yml:

services:
  openems-edge:
    image: my-openems-edge
    container_name: openems_edge
    restart: unless-stopped
#    devices:
#      - "/dev/ttyUSB0:/dev/ttyUSB0"
    volumes:
      - openems-edge-conf:/etc/openems.d:rw
      - openems-edge-data:/var/opt/openems/data:rw
    ports:
      - "8080:8080"
      - "8081:8081"

volumes:
  openems-edge-conf:
  openems-edge-data:

Hello again,

The issue was with the JRE image I used in Docker.
I tested several known images, and the one that finally worked on my Raspberry Pi 3 (running Raspbian 11 and 12) was: bellsoft/liberica-openjre-alpine:21

Thank you!

1 Like