0 Replies Latest reply on Nov 15, 2010 4:43 AM by Richard Hauswald

    weld-extensions outside jboss

    Richard Hauswald Newbie
      Hello,
      is there a reason why I do need to run weld extensions only inside jboss? If not, why I do neet the Jboss Logger class in my classpath? Pleas only add the Produces for this logger if the class is available in classpath. Otherwise many Users will get the following stacktrace:
      10:28:25.688 [main] ERROR o.a.c.core.ContainerBase.[Catalina].[localhost].[/research.jsf1] - Exception sending context initialized event to listener instance of class org.jboss.weld.environment.servlet.Listener
      org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
      Exception 0 :
      org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.weld.extensions.log.Producers
              at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:188)
              at org.jboss.weld.manager.BeanManagerImpl.createAnnotatedType(BeanManagerImpl.java:1121)
              at org.jboss.weld.extensions.log.LoggerExtension.addProducer(LoggerExtension.java:50)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
              at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:102)
              at org.jboss.weld.extensions.log.org$jboss$weld$bean-flat-Built-in-Extension-org$jboss$weld$extensions$log$LoggerExtension_$$_WeldClientProxy.addProducer(org$jboss$weld$bean-flat-Built-in-Extension-org$jboss$weld$extensions$log$LoggerExtension_$$_WeldClientProxy.java)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
              at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
              at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
              at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
              at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:198)
              at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
              at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:200)
              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:270)
              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:222)
              at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:88)
              at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:52)
              at org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl.fire(BeforeBeanDiscoveryImpl.java:46)
              at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:340)
              at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:126)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
              at org.apache.catalina.core.StandardService.start(StandardService.java:519)
              at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
              at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
              at java.lang.Class.getDeclaredMethods0(Native Method)
              at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
              at java.lang.Class.getDeclaredMethods(Class.java:1791)
              at org.jboss.weld.util.reflection.Reflections.getNonPrivateFinalMethodOrType(Reflections.java:181)
              at org.jboss.weld.util.reflection.Reflections.isTypeOrAnyMethodFinal(Reflections.java:172)
              at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:237)
              at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:159)
              at org.jboss.weld.util.Proxies.getUnproxyableTypesException(Proxies.java:191)
              at org.jboss.weld.util.Proxies.isTypesProxyable(Proxies.java:180)
              at org.jboss.weld.introspector.jlr.AbstractWeldAnnotated.<init>(AbstractWeldAnnotated.java:176)
              at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:147)
              at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:141)
              at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:52)
              at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40)
              at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
              at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
              at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
              at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:182)
              ... 43 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
              ... 61 more

              at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:55) ~[weld-core-1.1.0.Beta2.jar:2010-11-01 12:50]
              at org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl.fire(BeforeBeanDiscoveryImpl.java:46) ~[weld-core-1.1.0.Beta2.jar:2010-11-01 12:50]
              at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:340) ~[weld-core-1.1.0.Beta2.jar:2010-11-01 12:50]
              at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:126) ~[weld-servlet-1.1.0.Beta2.jar:20101101-1250]
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) [catalina.jar:6.0.29]
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) [catalina.jar:6.0.29]
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:6.0.29]
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) [catalina.jar:6.0.29]
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:6.0.29]
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) [catalina.jar:6.0.29]
              at org.apache.catalina.core.StandardService.start(StandardService.java:519) [catalina.jar:6.0.29]
              at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [catalina.jar:6.0.29]
              at org.apache.catalina.startup.Catalina.start(Catalina.java:581) [catalina.jar:6.0.29]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_21]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_21]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_21]
              at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_21]
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.29]
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.29]