在Wildly 8.2中部署简单的Switchyard项目的错误

时间:2015-01-26 14:05:40

标签: java exception jboss wildfly

我已经构建了一个非常简单的项目来熟悉JBoss Switchyard 2.0.0.Beta1。它只有一个Service,带有一个Bean实现,打包在一个WAR文件中。我正试图在Wildly 8.2上部署我的WAR。但是,当我这样做时,我得到以下异常:

08:58:06,014 WARN  [org.jboss.weld.Event] (MSC service thread 1-13) WELD-000411: Observer method [BackedAnnotatedMethod] protected org.apache.camel.cdi.internal.CamelExtension.detectRouteBuilders(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
08:58:06,349 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-13) MSC000001: Failed to start service jboss.deployment.unit."swtest.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."swtest.war".WeldStartService: Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
javax.enterprise.event.ObserverException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at java.lang.Class.newInstance(Class.java:374)
    at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40)
    at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:78)
    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:98)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:271)
    at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:121)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:258)
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:237)
    at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:174)
    at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:133)
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:107)
    at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:54)
    at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:42)
    at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:59)
    at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:412)
    at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)
    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:92)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
    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:744)
Caused by: java.lang.NoSuchMethodError: org.jboss.weld.context.AbstractUnboundContext.<init>(Z)V
    at org.jboss.weld.environment.se.contexts.ThreadContext.<init>(ThreadContext.java:40)
    at org.jboss.weld.environment.se.WeldSEBeanRegistrant.registerWeldSEContexts(WeldSEBeanRegistrant.java:48)
    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.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90)
    ... 18 more

    at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:44)
    at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:59)
    at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:412)
    at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)
    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:92)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    ... 3 more

知道我缺少什么或导致此异常的原因是什么?这不是一个非常复杂的项目,我现在根本没有使用Camel。有没有解决这个错误的方法?

1 个答案:

答案 0 :(得分:0)

switchyard 2.0不支持野生动物8.2(并且不支持)。你需要野生动物8.1。

https://developer.jboss.org/thread/251473