WildFly standalone doesn't run

2.7k views Asked by At

I have unpacked WildFly 10.1.0 and added the bin path to the environmental variable path list successfully. I double checked it with echo %PATH%. But whenever I am trying to execute standalone it gives the below exception.

C:\Users\User>standalone

Calling "C:\Program Files\Wildfly\wildfly-10.1.0.CR1\bin\standalone.conf.bat"

Setting JAVA property to "C:\Program Files\Java\jdk1.8.0_111\bin\java"

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

  JBoss Bootstrap Environment

  JBOSS_HOME: "C:\Program Files\Wildfly\wildfly-10.1.0.CR1"

  JAVA: "C:\Program Files\Java\jdk1.8.0_111\bin\java"

  JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman"

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

java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
        at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:116)
        at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:335)
        at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:288)
        at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:297)
        at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:546)
        at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
        at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:514)
        at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:476)
        at java.util.logging.LogManager$3.run(LogManager.java:399)
        at java.util.logging.LogManager$3.run(LogManager.java:396)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
        at java.util.logging.LogManager.access$800(LogManager.java:145)
        at java.util.logging.LogManager$2.run(LogManager.java:345)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
        at java.util.logging.LogManager.getLogManager(LogManager.java:378)
        at org.jboss.modules.Main.main(Main.java:480)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:114)
        ... 17 more
Caused by: java.io.FileNotFoundException: C:\Program Files\Wildfly\wildfly-10.1.0.CR1\standalone\log\server.log (The system cannot find the path specified)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:151)
        at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:108)
        at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:189)
        at org.jboss.logmanager.handlers.FileHandler.<init>(FileHandler.java:119)
        at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.<init>(PeriodicRotatingFileHandler.java:76)
        ... 22 more
java.lang.IllegalStateException: WFLYSRV0124: Could not create server data directory: C:\Program Files\Wildfly\wildfly-10.1.0.CR1\standalone\data
        at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:473)
        at org.jboss.as.server.Main.determineEnvironment(Main.java:297)
        at org.jboss.as.server.Main.main(Main.java:94)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jboss.modules.Module.run(Module.java:330)
        at org.jboss.modules.Main.main(Main.java:505)
Press any key to continue . . .
3

There are 3 answers

0
user7023213 On

When i ran it from powershell in windows as admin error disappeared!

0
developer On
Caused by: java.io.FileNotFoundException: C:\Program Files\Wildfly\wildfly-10.1.0.CR1\standalone\log\server.log (The system cannot find the path specified) 

see the Error log its saying it can't find the server.log file also try this method: if your wildfly is in C:/ directory then from command line write

cd C:\wildfly-10.1.0.CR1\bin\  

press enter then type this command:

standalone.bat 

press enter this should start your server if your java_home variable is set

0
jithin iyyani On

This looks to be more of an access right related issue. Kindly try to move the wildfly folder to some other location like C:\Server. And set the path accordingly and try again.

Also it would be good to set JAVA_HOME and JBOSS_HOME environment variables.