2015-02-11 124 views
2

我是wildfly8的新手,也是aspectJ的新手。 如果我在用於LTW(加載時織入)目的的aspectjWeaver.jar的VM參數中添加javaagent參數,Wildfly 8.2啓動會失敗。wildfly 8.2在vm參數中的javaagent啓動失敗

-javaagent:"D:\Installables\JBOSS-8-Tools\aop\sample aspectJ project\aspectjweaver-1.8.5.jar" 

比我得到以下日誌管理器錯誤:

WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager 
Feb 11, 2015 4:55:43 PM org.jboss.msc.service.ServiceContainerImpl <clinit> 
INFO: JBoss MSC version 1.2.2.Final 
Feb 11, 2015 4:55:43 PM org.jboss.as.server.ApplicationServerService start 
INFO: JBAS015899: WildFly 8.2.0.Final "Tweek" starting 
Feb 11, 2015 4:55:50 PM org.jboss.as.controller.AbstractOperationContext executeStep 
ERROR: JBAS014612: Operation ("parallel-extension-add") failed - address: ([]) 
java.lang.RuntimeException: JBAS014670: Failed initializing module org.jboss.as.logging 
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:111) 
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:660) 
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:501) 
at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:298) 
at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:293) 
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:324) 
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:297) 
at org.jboss.as.server.ServerService.boot(ServerService.java:356) 
at org.jboss.as.server.ServerService.boot(ServerService.java:331) 
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:259) 
at java.lang.Thread.run(Thread.java:745) 
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager" 
at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
at java.util.concurrent.FutureTask.get(FutureTask.java:188) 
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:103) 
... 10 more 
Caused by: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager" 
at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:122) 
at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:98) 
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:139) 
at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:125) 
at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:745) 
at org.jboss.threads.JBossThread.run(JBossThread.java:122) 

Feb 11, 2015 4:55:50 PM org.jboss.as.server.ServerService boot 
FATAL: JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details. 

現在,如果我加空兩個VM參數與如果我添加的jboss-日誌管理,1.3.1.Final.jar在bootstarp沿路徑比上述異常不會出現,但會出現下面的日誌格式化異常,並且不會啓動wildfly。 2 VM參數:

-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager 
-Djava.util.logging.manager=org.jboss.logmanager.LogManager 

錯誤堆棧跟蹤:

java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:175) 
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:156) 
    at org.jboss.logmanager.config.LogContextConfigurationImpl.doApplyPostCreate(LogContextConfigurationImpl.java:276) 
    at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:261) 
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:393) 
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:92) 
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300) 
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262) 
    at java.util.logging.LogManager$2.run(LogManager.java:320) 
    at java.util.logging.LogManager$2.run(LogManager.java:318) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:318) 
    at java.util.logging.LogManager.getLogManager(LogManager.java:300) 
    at java.util.logging.Logger.<init>(Logger.java:265) 
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1468) 
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1466) 
    at java.util.logging.LogManager$1.run(LogManager.java:204) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.util.logging.LogManager.<clinit>(LogManager.java:181) 
    at java.util.logging.Logger.demandLogger(Logger.java:339) 
    at java.util.logging.Logger.getLogger(Logger.java:393) 
    at org.aspectj.weaver.tools.Jdk14Trace.<init>(Jdk14Trace.java:26) 
    at org.aspectj.weaver.tools.Jdk14TraceFactory.getTrace(Jdk14TraceFactory.java:17) 
    at org.aspectj.weaver.loadtime.Aj.<clinit>(Aj.java:52) 
    at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.<clinit>(ClassPreProcessorAgentAdapter.java:32) 
    at org.aspectj.weaver.loadtime.Agent.<clinit>(Agent.java:33) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382) 
    at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397) 
Caused by: java.lang.IllegalArgumentException: Encountered an unknown format character 
    at org.jboss.logmanager.formatters.FormatStringParser.getSteps(FormatStringParser.java:172) 
    at org.jboss.logmanager.formatters.PatternFormatter.setPattern(PatternFormatter.java:63) 
    ... 36 more 
java.util.concurrent.ExecutionException: Operation failed 
    at org.jboss.threads.AsyncFutureTask.operationFailed(AsyncFutureTask.java:74) 
    at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:268) 
    at org.jboss.as.server.Main.main(Main.java:99) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at org.jboss.modules.Module.run(Module.java:312) 
    at org.jboss.modules.Main.main(Main.java:460) 
Caused by: org.jboss.msc.service.StartException in service jboss.as.server-controller: Failed to start service 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.NoClassDefFoundError: org/jboss/logmanager/handlers/SyslogHandler$SyslogType 
    at org.jboss.as.domain.management.audit.SyslogAuditLogHandlerResourceDefinition.<clinit>(SyslogAuditLogHandlerResourceDefinition.java:77) 
    at org.jboss.as.domain.management.audit.AccessAuditResourceDefinition.registerChildren(AccessAuditResourceDefinition.java:72) 
    at org.jboss.as.controller.registry.ConcreteResourceRegistration.registerSubModel(ConcreteResourceRegistration.java:160) 
    at org.jboss.as.domain.management.CoreManagementResourceDefinition.registerChildren(CoreManagementResourceDefinition.java:115) 
    at org.jboss.as.controller.registry.ConcreteResourceRegistration.registerSubModel(ConcreteResourceRegistration.java:160) 
    at org.jboss.as.server.controller.resources.ServerRootResourceDefinition.registerChildren(ServerRootResourceDefinition.java:394) 
    at org.jboss.as.server.ServerService$DelegatingResourceDefinition.registerChildren(ServerService.java:448) 
    at org.jboss.as.controller.registry.ManagementResourceRegistration$Factory.create(ManagementResourceRegistration.java:594) 
    at org.jboss.as.controller.AbstractControllerService.start(AbstractControllerService.java:241) 
    at org.jboss.as.server.ServerService.start(ServerService.java:247) 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) 
    ... 3 more 
Caused by: java.lang.ClassNotFoundException: org.jboss.logmanager.handlers.SyslogHandler$SyslogType 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:386) 
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) 
    ... 15 more 

任何人都可以提出什麼更需要與aspectjWeaver.jar在javaagent虛擬機上運行wildfly8.2的加載時間編織。

回答

1

在bootstrap中使用jboss-logmanager-2.0.0.Beta1.jar。它爲我工作。因爲引發異常的類在jboss-logmanager-1.3.1.Final.jar中不可用。