Has anyone tried to set up HOTSWAP AGENT with the newest SDK 4.3? It seems like the Docker configuration is somehow broken.
Step 14/15 : RUN tar -xvf $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz -C /usr/java/ && rm $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz && alternatives --install /usr/bin/java java /usr/java/dcevm-11.0.1+7/bin/java 40000 && alternatives --install /usr/bin/javac javac /usr/java/dcevm-11.0.1+7/bin/javac 40000 && alternatives --install /usr/bin/jar jar /usr/java/dcevm-11.0.1+7/bin/jar 40000 && alternatives --set java /usr/java/dcevm-11.0.1+7/bin/java && alternatives --set javac /usr/java/dcevm-11.0.1+7/bin/javac && alternatives --set jar /usr/java/dcevm-11.0.1+7/bin/jar && ln -sfn /usr/java/dcevm-11.0.1+7 /usr/java/latest && ln -sfn /usr/java/dcevm-11.0.1+7 /usr/java/default
---> Running in ea6b71afb791
tar: /usr/java: Cannot open: No such file or directory tar: Error is not recoverable: exiting now
I tried to replace "/usr/java" with "/usr/bin/java" but then other errors occur (jar not found, etc.)
While using previous versions of the maven docker AIO archetype, it works (I use this guide).
It looks like in the lastest Docker alfresco-content-services container, system and Java configuration has changed and the following lines does not work anymore.
RUN tar -xvf $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz -C /usr/java/ && \ rm $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz && \ alternatives --install /usr/bin/java java /usr/java/dcevm-11.0.1+7/bin/java 40000 && \ alternatives --install /usr/bin/javac javac /usr/java/dcevm-11.0.1+7/bin/javac 40000 && \ alternatives --install /usr/bin/jar jar /usr/java/dcevm-11.0.1+7/bin/jar 40000 && \ alternatives --set java /usr/java/dcevm-11.0.1+7/bin/java && \ alternatives --set javac /usr/java/dcevm-11.0.1+7/bin/javac && \ alternatives --set jar /usr/java/dcevm-11.0.1+7/bin/jar && \ ln -sfn /usr/java/dcevm-11.0.1+7 /usr/java/latest && \ ln -sfn /usr/java/dcevm-11.0.1+7 /usr/java/default
Solved! Go to Solution.
If anyone had the same problem, I solved it using the following code in the Dockerfile:
# HOTSWAP AGENT # Install and configure Trava OpenJDK (OpenJDK pre-built with DCEVM and hotswap agent for Java 11) COPY trava-jdk-11-dcevm.tar.gz $TOMCAT_DIR RUN tar -xvf $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz -C /usr/lib/jvm/ && \ rm $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz && \ alternatives --install /usr/bin/java java /usr/lib/jvm/dcevm-11.0.1+7/bin/java 40000 && \ alternatives --install /usr/bin/javac javac /usr/lib/jvm/dcevm-11.0.1+7/bin/javac 40000 && \ alternatives --set java /usr/lib/jvm/dcevm-11.0.1+7/bin/java && \ alternatives --set javac /usr/lib/jvm/dcevm-11.0.1+7/bin/javac && \ ln -sfn /usr/lib/jvm/dcevm-11.0.1+7 /usr/lib/jvm/latest && \ ln -sfn /usr/lib/jvm/dcevm-11.0.1+7 /usr/lib/jvm/default && \ ln -sfn /usr/lib/jvm/dcevm-11.0.1+7 /usr/lib/jvm/jre
If anyone had the same problem, I solved it using the following code in the Dockerfile:
# HOTSWAP AGENT # Install and configure Trava OpenJDK (OpenJDK pre-built with DCEVM and hotswap agent for Java 11) COPY trava-jdk-11-dcevm.tar.gz $TOMCAT_DIR RUN tar -xvf $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz -C /usr/lib/jvm/ && \ rm $TOMCAT_DIR/trava-jdk-11-dcevm.tar.gz && \ alternatives --install /usr/bin/java java /usr/lib/jvm/dcevm-11.0.1+7/bin/java 40000 && \ alternatives --install /usr/bin/javac javac /usr/lib/jvm/dcevm-11.0.1+7/bin/javac 40000 && \ alternatives --set java /usr/lib/jvm/dcevm-11.0.1+7/bin/java && \ alternatives --set javac /usr/lib/jvm/dcevm-11.0.1+7/bin/javac && \ ln -sfn /usr/lib/jvm/dcevm-11.0.1+7 /usr/lib/jvm/latest && \ ln -sfn /usr/lib/jvm/dcevm-11.0.1+7 /usr/lib/jvm/default && \ ln -sfn /usr/lib/jvm/dcevm-11.0.1+7 /usr/lib/jvm/jre
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.