Closed redblade closed 6 years ago
Hi @redblade, please try to also include package openjdk8-zulu-compact3-with-java-beans
in your unikernel by adding this line to your meta/package.yaml
:
name: javatest
title: JavaTest
author: miha
require:
- openjdk8-zulu-compact3-with-java-beans # <------------- require this package
By default the runtime: java
requires the most stripped version of Java, openjdk8-zulu-compact1
. I have no idea what's in there and what not, but I know that the -witha-java-beans package is the most complete (an also the largest in size).
Please let me know if it works, and thanks for providing small reproducible example!
For sure java.sql.* is not part of compact 1 profile.
Sent from my iPhone
On Jan 26, 2018, at 09:38, Miha Pleško notifications@github.com wrote:
Hi @redblade, also include package openjdk8-zulu-compact3-with-java-beans in your unikernel by adding this line to your meta/package.yaml:
name: javatest title: JavaTest author: miha require:
- openjdk8-zulu-compact3-with-java-beans # <------------- require this package By default the runtime: java requires the most stripped version of Java, openjdk8-zulu-compact1. I have no idea what's in there and what not, but I know that the -witha-java-beans package is the most complete (an also the largest in size).
Please let me know if it works, and thanks for providing small reproducible example!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Haha, thanks @wkozaczuk for joining the debate! @redblade: HE is the one that kindly provided all the recent Java packages for Capstan so if he doesn't know, then I'm not sure who would 😄
Btw @wkozaczuk I see there is now also openjdk8-zulu-full
and even openjdk9-java-base
available, thanks for your efforts! When I have some more time I should probably port them to capstan-packages (or you can open a PR and I'd gladly review it, should you have any extra time) ;)
Thanks @miha-plesko and @wkozaczuk, it works! For the records, I am testing an easy example from spring-boot, and a bigger one with microservices, they both work as a charm 👍
sorry to bug you,
after some more tests, I am now getting a
java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
for this example (the second one I mentioned before).
Is it similar to the sql problem?
@wkozaczuk you think providing package openjdk8-zulu-full
would help resolving this issue?
For sure. I would expect that compact3 with java beans should be enough for most cases. But java full should cover all cases. That is the order to try.
The best approach is to runs jdeps tool against your java app jars to determine what profile is enough to satisfy your needs.
This article explains what is part of each Java 8 profile - http://openjdk.java.net/jeps/161.
@miha-plesko https://github.com/miha-plesko It would be also nice to add Java 9 to the java runtimes. Please note that the one in osv-apps provides minimal java 9 runtime with java.base.
On Fri, Jan 26, 2018 at 10:33 AM, Miha Pleško notifications@github.com wrote:
@wkozaczuk https://github.com/wkozaczuk you think providing package openjdk8-zulu-full would help resolving this issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikelangelo-project/capstan/issues/90#issuecomment-360816750, or mute the thread https://github.com/notifications/unsubscribe-auth/AFDSIQVmlguk3DcVpLqwZM9gufbvCDb5ks5tOfBFgaJpZM4RuWso .
Thanks for the feedback. So, if I get it right, having available the full release and the different compact ones could help to choose the most appropriate for each project according to the dependencies got by jdeps, correct?
In my case, I guess the next step is to try the full one, as from here I can't find the javax.xml.bind package.
Is there any plan to make the full version available to capstan?
Hi @redblade , I've prepared openjdk8-zulu-full
package for you, here's the recipe for it. It's not yet available in our public Capstan repository, but you can download the package from here: http://x.k00.fr/javafull
So what you need to do is to upload package to your Capstan repository (you're using your own, right?) and update your meta/package.yaml to somethning like this:
name: javatest
title: JavaTest
author: miha
require:
- openjdk8-zulu-full # <------------- require this package
Please let me know if it works!
Hi @miha-plesko,
using a private repo (configured in the .capstan/config.yaml), I only had to copy the openjdk full in the repo folder, launch the microservice example with
capstan run myartefact --boot conf -p qemu -f 18090:8090
, and it worked perfectly
Thanks!
Hi, I am using the RuntimeJava and I am getting a ClassNotFoundException error in many cases. I am working on Ubuntu with OpenJDK8 used to compile the source code.
An easy example is the following
where the result is
It looks like some Java packages are not available in the openjdk8 zulu image that is loaded by OSv Do you have any advise about how to configure/fix this?