0

I can't even start wildfly without any deployment in wildfly 14

sh standalone.sh --server-config=../standalone/configuration/standalone.xml

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/00887661017/Desktop/wildfly-14.0.1.Final

  JAVA: java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true 

=========================================================================

Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/ModuleLayer
    at org.jboss.modules.JDKModuleFinder.<init>(JDKModuleFinder.java:45)
    at org.jboss.modules.JDKModuleFinder.<clinit>(JDKModuleFinder.java:42)
    at org.jboss.modules.Utils.<clinit>(Utils.java:44)
    at org.jboss.modules.LocalModuleLoader.<init>(LocalModuleLoader.java:57)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-internal/Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-internal/NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-internal/DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(java.base@9-internal/Constructor.java:453)
    at org.jboss.modules.DefaultBootModuleLoaderHolder$1.run(DefaultBootModuleLoaderHolder.java:37)
    at org.jboss.modules.DefaultBootModuleLoaderHolder$1.run(DefaultBootModuleLoaderHolder.java:33)
    at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method)
    at org.jboss.modules.DefaultBootModuleLoaderHolder.<clinit>(DefaultBootModuleLoaderHolder.java:33)
    at org.jboss.modules.Main.main(Main.java:391)
Caused by: java.lang.ClassNotFoundException: java.lang.ModuleLayer
    at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366)
    at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:184)
    at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
    ... 13 more

Same process did work in CentOS.

Edit, adding further info:

java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

Starting the server with no config file as paramether resulted in the same behaviour first presented.

  • Kinda looks like it can't find the java executable possibly? The JAVA: java looks a little strange but I use EAP so I can't easily compare it. You also posted this in SO didn't you as the question seems familiar. Maybe try backing up and then editing standalone.conf and setting the JAVA_HOME env variable to exactly where java resides - but really strange between CentOS and Ubuntu... but also likely an ENV variable issue as well IMHO – JGlass Nov 2 '18 at 6:35
  • Also, just try doing ./standalone.sh as it defaults to reading from the standalone.xml file - you don't need to specify it. – JGlass Nov 2 '18 at 6:37
  • Which java version are you using as "Caused by: java.lang.ClassNotFoundException: java.lang.ModuleLayer" looks suspicious to me ? – ehsavoie Nov 2 '18 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.