4 Replies Latest reply on Jan 21, 2010 11:34 PM by Pete Muir

    Strange exception after ProcessAnnotatedType event

    alberto Gori Novice

      In my extension I just set the annotatedType of a ProcessAnnotatedType:


      public void processIt(@Observes ProcessAnnotatedType<?> pat) {
        AnnotatedType originalAt = pat.getAnnotatedType();
        pat.setAnnotatedType(new MyAnnotatedType(originalAt));     
      }
      



      where MyAnnotatedType at the moment just delegates original methods (I used Eclipse to delegate, so I am sure there is any error inside it).


      Well, I get this exception (Jetty launched from Maven):


      2010-01-04 21:30:12.579:INFO::jetty-6.1.22
      21:30:12,785 INFO  [WeldBootstrap] Weld 1.0.0-CR1
      2010-01-04 21:30:12.818:INFO::No Transaction manager found - if your webapp requires one, please configure one.
      21:30:13,255 INFO  [WeldBootstrap] Transactional services not available. Injection of @Current UserTransaction not available. Transactional observers will be invoked synchronously.
      21:30:13,400 INFO  [Listener] JSR-299 injection will not be available in Servlets, Filters etc. This facility is only available in Tomcat
      2010-01-04 21:30:13.524:WARN::Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@cd6aa0{/restfaces-prova-0.0.1-SNAPSHOT,/home/agori/progetti/restfaces2/src/main/webapp}
      java.lang.ArrayIndexOutOfBoundsException: 3
           at org.jboss.weld.introspector.jlr.WeldConstructorImpl.<init>(WeldConstructorImpl.java:124)
           at org.jboss.weld.introspector.jlr.WeldConstructorImpl.of(WeldConstructorImpl.java:81)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:292)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:137)
           at org.jboss.weld.resources.ClassTransformer$2.call(ClassTransformer.java:72)
           at org.jboss.weld.resources.ClassTransformer$2.call(ClassTransformer.java:68)
           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
           at java.util.concurrent.FutureTask.run(FutureTask.java:138)
           at org.jboss.weld.util.collections.ConcurrentCache.putIfAbsent(ConcurrentCache.java:125)
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:67)
           at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:70)
           at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:89)
           at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:147)
           at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:281)
           at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:156)
           at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
           at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
           at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
           at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
           at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
           at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
           at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
           at org.mortbay.jetty.Server.doStart(Server.java:224)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
           at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
           at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
           at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
           at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
           at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
           at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
           at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
           at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
           at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
           at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
           at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
           at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
           at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
           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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
           at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
           at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
           at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
           at org.codehaus.classworlds.Launcher.main(Launcher.java:31)