java Jboss 无法实例化类“org.jboss.logmanager.handlers.PeriodicRotatingFileHandle

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30526707/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 17:16:31  来源:igfitidea点击:

Jboss Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandle

javajakarta-eejbossjboss6.x

提问by muledevlepoer24

When I tried jbosseap6.3 install as service. I got below error. Anyone have any idea on the below error. Any one shed light means it is very helpful for me.

当我尝试将 jbosseap6.3 安装为服务时。我得到以下错误。任何人都对以下错误有任何想法。任何一盏灯都意味着它对我非常有帮助。

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:119)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:338)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:291)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:300)
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:542)
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
    at org.jboss.as.logging.logmanager.ConfigurationPersistence.configure(ConfigurationPersistence.java:149)
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)
    at java.util.logging.LogManager.run(LogManager.java:399)
    at java.util.logging.LogManager.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.access0(LogManager.java:145)
    at java.util.logging.LogManager.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:443)
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:408)
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:117)
    ... 18 more
Caused by: java.io.FileNotFoundException: C:\jboss-eap-6.3\standalone\log\server.log (The process cannot access the file because it is being used by another process)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:154)
    at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:105)
    at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:192)
    at org.jboss.logmanager.handlers.FileHandler.<init>(FileHandler.java:122)
    at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.<init>(PeriodicRotatingFileHandler.java:73)
    ... 23 more
Shutdown JBossEAP6.3.0 service [2015-05-29 09:58:27]

回答by Oleksandr Marchenko

Try to start jBoss server as administrator by pressing right mouse key, it will permit jboss to create all folders and files .

尝试通过按鼠标右键以管理员身份启动 jBoss 服务器,它将允许 jboss 创建所有文件夹和文件。

回答by Yogesh A

Right click the installation directory of Jboss EA (mine is C:\program files\EAP6.1, then Properties, Security tab. Given everyone permissions on this folder (all users you can see just give full control). This should then be able to create logs etc files within the required folder. This is just a workaround though only works for local installs.

右键单击Jboss EA的安装目录(我的是C:\program files\EAP6.1,然后属性,安全选项卡。给这个文件夹的所有人权限(你能看到的所有用户都给予完全控制)。这样应该就可以了在所需文件夹中创建日志等文件。这只是一种解决方法,但仅适用于本地安装。

回答by kaoutar

it's a problem due to permissions, the solution that worked for me is that i removed the home directory of jboss wildfly from C:\programmes to C:\

由于权限问题,这是一个问题,对我有用的解决方案是我将 jboss wildfly 的主目录从 C:\programmes 删除到 C:\

回答by Nitin Rane

I had resolved this issue by creating log directory in the C:\jboss-eap-6.3\standalone\

我通过在 C:\jboss-eap-6.3\standalone\ 中创建日志目录解决了这个问题

回答by Ivan Aranibar

I had the same issue, it worked after running it on root, maybe you are running it without the proper rights.

我有同样的问题,它在 root 上运行后工作,也许你在没有适当权限的情况下运行它。

回答by Steve C

You are most likely getting this error because you either have the log file open in a text editor or you're already running that instance of JBoss.

您很可能会收到此错误,因为您在文本编辑器中打开了日志文件,或者您已经在运行该 JBoss 实例。