我已解压缩WildFly 10.1.0并成功将bin
路径添加到环境变量路径列表中。我用echo %PATH%
仔细检查了它。但每当我尝试执行独立操作时,它会给出以下异常。
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 . . .
答案 0 :(得分:1)
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)
请参阅错误日志,说它无法找到server.log文件 也试试这个方法: 如果您的wildfly在C:/目录中,那么从命令行写入
cd C:\wildfly-10.1.0.CR1\bin\
按enter键然后输入以下命令:
standalone.bat
按Enter键如果设置了java_home变量,则应启动服务器
答案 1 :(得分:0)
这看起来更像是与访问权限相关的问题。 请尝试将wildfly文件夹移动到其他位置,如C:\ Server。 并相应地设置路径并重试。
最好设置JAVA_HOME和JBOSS_HOME环境变量。
答案 2 :(得分:0)
当我在Windows中从Powershell运行它时,管理员错误消失了!