New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standalone jar not starting on Java 9+ #909

Open
jakob-beetz opened this Issue Jan 27, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@jakob-beetz
Copy link
Member

jakob-beetz commented Jan 27, 2019

the required java.xml.bind is disabled in JRE 9 by default
https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j

to successfully start the standalone .jar I had to manually reenable it via the command line calling

`java --add-modules java.xml.bind -jar "bimserverjar-1.5.120.jar"

an elegant solution without a startup script seems to come only from JRE 11 onwards.

added a small paragraph with the workaround on the installation wiki

EDIT: Ok, there seems to be much more going on in the dependency breaking department when tryting to run on Java >8:

java.lang.NoClassDefFoundError: javax/jws/WebService
        at org.bimserver.shared.meta.SService.(SService.java:60)
        at org.bimserver.interfaces.SServiceInterfaceService.(SServiceInterfaceService.java:31)
        at org.bimserver.shared.InterfaceList.createSServicesMap(InterfaceList.java:61)
        at org.bimserver.BimServer.(BimServer.java:248)
        at org.bimserver.JarBimServer.start(JarBimServer.java:147)
        at org.bimserver.JarBimServer.main(JarBimServer.java:79)
Caused by: java.lang.ClassNotFoundException: javax.jws.WebService
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 6 common frames omitted
Logging to c:\bimserver\home\logs\bimserver.log
18:39:34 INFO  [main]: Unknown version                                                                  (BimServer.java:339)
18:39:34 ERROR [main]:                                                                                  (BimServer.java:631)
java.lang.NullPointerException: null
        at org.bimserver.BimServer.start(BimServer.java:343)
        at org.bimserver.JarBimServer.start(JarBimServer.java:160)
        at org.bimserver.JarBimServer.main(JarBimServer.java:79)
18:39:34 ERROR [main]:                                                                                  (BimServer.java:792)
java.lang.NullPointerException: null
        at org.bimserver.BimServer.start(BimServer.java:635)
        at org.bimserver.JarBimServer.start(JarBimServer.java:160)
        at org.bimserver.JarBimServer.main(JarBimServer.java:79)
18:39:34 ERROR [main]:                                                                                  (JarBimServer.java:163)
java.lang.NullPointerException: null
        at org.bimserver.BimServer.start(BimServer.java:793)
        at org.bimserver.JarBimServer.start(JarBimServer.java:160)
        at org.bimserver.JarBimServer.main(JarBimServer.java:79)
`
@rubendel

This comment has been minimized.

Copy link
Member

rubendel commented Jan 28, 2019

Yes I have had a look at this earlier, no easy fix so it seems, for now:

  • Only Java 8 is supported
  • Java 9 and 10 will be skipped (both are not supported by Oracle anymore)
  • Java 11 (has LTS, Long Term Support, up until 2022 I think) will be supported, either by:
    • Having 2 builds, one for Java 8, one for Java 11
    • Doing a final release of 1.5 on Java 8, and then continue development for BIMserver 1.6 only for Java 11
    • Try to find a way to do a release for that works on both Java 8 and Java 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment