Wicket
  1. Wicket
  2. WICKET-5226

CDI integration fails in Glassfish 4.0 with WELD-000070

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.8.0
    • Fix Version/s: 6.9.0, 7.0.0
    • Component/s: wicket-cdi
    • Environment:
      Glassfish 4.0

      Description

      When CDI is configured in the Application and a page has a non-static inner class the page throws exception, regardless of whether there are any injected fields.

      Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000070 Simple bean [EnhancedAnnotatedTypeImpl] private class com.inversebit.HomePage$AForm cannot be a non-static inner class
      at org.jboss.weld.injection.producer.BasicInjectionTarget.checkType(BasicInjectionTarget.java:81)
      at org.jboss.weld.injection.producer.BasicInjectionTarget.<init>(BasicInjectionTarget.java:69)
      at org.jboss.weld.injection.producer.BeanInjectionTarget.<init>(BeanInjectionTarget.java:52)
      at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:95)
      at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:78)
      ... 65 more

      1. cditest_2.zip
        68 kB
        Phill Ashworth
      2. cditest.zip
        45 kB
        Phill Ashworth
      3. WELD-000070_1.txt
        14 kB
        Phill Ashworth

        Issue Links

          Activity

          Phill Ashworth created issue -
          Hide
          Phill Ashworth added a comment -

          Quickstart with embedded Glassfish.
          % mvn package embedded-glassfish:run
          http://localhost:8282/cditest/

          Show
          Phill Ashworth added a comment - Quickstart with embedded Glassfish. % mvn package embedded-glassfish:run http://localhost:8282/cditest/
          Phill Ashworth made changes -
          Field Original Value New Value
          Attachment cditest.zip [ 12587368 ]
          Martin Grigorov made changes -
          Assignee Martin Grigorov [ mgrigorov ]
          Hide
          Martin Grigorov added a comment -

          From now on any inner non-static component class won't be processed by ComponentInjector.
          Weld 1.1 doesn't complain about such classes but Weld 2.0 does. It seems Weld 1.1 missed the check.

          Show
          Martin Grigorov added a comment - From now on any inner non-static component class won't be processed by ComponentInjector. Weld 1.1 doesn't complain about such classes but Weld 2.0 does. It seems Weld 1.1 missed the check.
          Martin Grigorov made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 6.9.0 [ 12324357 ]
          Fix Version/s 7.0.0 [ 12322958 ]
          Resolution Fixed [ 1 ]
          Hide
          Phill Ashworth added a comment -

          Rebuilt Wicket from wicket-6.x and I'm still getting the same exception:

          2013-06-20 07:13:40,729 [http-listener-2(3)] DEBUG org.apache.wicket.MarkupContainer - Add logo to [DebugBar [Component id = debug]]
          2013-06-20 07:13:40,761 [http-listener-2(3)] WARN RequestCycleExtra - ********************************
          2013-06-20 07:13:40,901 [http-listener-2(3)] WARN RequestCycleExtra - Handling the following exception
          org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.mydomain.webapp.HomePage(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. An exception has been thrown during construction!
          at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:76) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:268) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218) [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) ~[web-core.jar:na]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) ~[web-core.jar:na]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) ~[web-core.jar:na]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) ~[web-core.jar:na]
          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) ~[web-core.jar:na]
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) ~[web-core.jar:na]
          at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) ~[web-glue.jar:na]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) ~[web-core.jar:na]
          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357) ~[web-core.jar:na]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260) ~[web-core.jar:na]
          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188) ~[kernel.jar:na]
          at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) ~[nucleus-grizzly-all.jar:na]
          at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) ~[nucleus-grizzly-all.jar:na]
          at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
          Caused by: java.lang.reflect.InvocationTargetException: null
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_25]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_25]
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_25]
          at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_25]
          at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:171) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          ... 43 common frames omitted
          Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-000070 Simple bean [EnhancedAnnotatedTypeImpl] class org.apache.wicket.devutils.debugbar.DebugBar$3 cannot be a non-static inner class
          at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:82) ~[weld-osgi-bundle.jar:20130513-1450]
          at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:68) ~[weld-osgi-bundle.jar:20130513-1450]
          at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1039) ~[weld-osgi-bundle.jar:20130513-1450]
          at org.apache.wicket.cdi.NonContextual.<init>(NonContextual.java:118) ~[wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.cdi.NonContextual.of(NonContextual.java:84) ~[wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.cdi.NonContextualManager.inject(NonContextualManager.java:54) ~[wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.cdi.AbstractInjector.inject(AbstractInjector.java:43) ~[wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.cdi.ComponentInjector.onInstantiation(ComponentInjector.java:57) ~[wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80) ~[wicket-util-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.Component.<init>(Component.java:683) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:121) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.markup.html.WebMarkupContainer.<init>(WebMarkupContainer.java:52) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.markup.repeater.AbstractRepeater.<init>(AbstractRepeater.java:67) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.markup.html.list.ListView.<init>(ListView.java:140) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.markup.html.list.ListView.<init>(ListView.java:162) ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.devutils.debugbar.DebugBar$3.<init>(DebugBar.java:131) ~[wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.devutils.debugbar.DebugBar.contentSection(DebugBar.java:130) ~[wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.devutils.debugbar.DebugBar.<init>(DebugBar.java:117) ~[wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at org.apache.wicket.devutils.debugbar.DebugBar.<init>(DebugBar.java:86) ~[wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          at com.mydomain.webapp.common.StandardBasePage.<init>(StandardBasePage.java:52) ~[StandardBasePage.class:na]
          at com.mydomain.webapp.HomePage.<init>(HomePage.java:22) ~[HomePage.class:na]
          ... 48 common frames omitted

          Show
          Phill Ashworth added a comment - Rebuilt Wicket from wicket-6.x and I'm still getting the same exception: 2013-06-20 07:13:40,729 [http-listener-2(3)] DEBUG org.apache.wicket.MarkupContainer - Add logo to [DebugBar [Component id = debug] ] 2013-06-20 07:13:40,761 [http-listener-2(3)] WARN RequestCycleExtra - ******************************** 2013-06-20 07:13:40,901 [http-listener-2(3)] WARN RequestCycleExtra - Handling the following exception org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.mydomain.webapp.HomePage(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. An exception has been thrown during construction! at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:76) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:268) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~ [wicket-request-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218) [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) ~ [web-core.jar:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) ~ [web-core.jar:na] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) ~ [web-core.jar:na] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) ~ [web-core.jar:na] at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) ~ [web-core.jar:na] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) ~ [web-core.jar:na] at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) ~ [web-glue.jar:na] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) ~ [web-core.jar:na] at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357) ~ [web-core.jar:na] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260) ~ [web-core.jar:na] at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188) ~ [kernel.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) ~ [nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) ~ [nucleus-grizzly-all.jar:na] at java.lang.Thread.run(Thread.java:724) ~ [na:1.7.0_25] Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~ [na:1.7.0_25] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~ [na:1.7.0_25] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~ [na:1.7.0_25] at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~ [na:1.7.0_25] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:171) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] ... 43 common frames omitted Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-000070 Simple bean [EnhancedAnnotatedTypeImpl] class org.apache.wicket.devutils.debugbar.DebugBar$3 cannot be a non-static inner class at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:82) ~ [weld-osgi-bundle.jar:20130513-1450] at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:68) ~ [weld-osgi-bundle.jar:20130513-1450] at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1039) ~ [weld-osgi-bundle.jar:20130513-1450] at org.apache.wicket.cdi.NonContextual.<init>(NonContextual.java:118) ~ [wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.cdi.NonContextual.of(NonContextual.java:84) ~ [wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.cdi.NonContextualManager.inject(NonContextualManager.java:54) ~ [wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.cdi.AbstractInjector.inject(AbstractInjector.java:43) ~ [wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.cdi.ComponentInjector.onInstantiation(ComponentInjector.java:57) ~ [wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80) ~ [wicket-util-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.Component.<init>(Component.java:683) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:121) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.markup.html.WebMarkupContainer.<init>(WebMarkupContainer.java:52) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.markup.repeater.AbstractRepeater.<init>(AbstractRepeater.java:67) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.markup.html.list.ListView.<init>(ListView.java:140) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.markup.html.list.ListView.<init>(ListView.java:162) ~ [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.devutils.debugbar.DebugBar$3.<init>(DebugBar.java:131) ~ [wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.devutils.debugbar.DebugBar.contentSection(DebugBar.java:130) ~ [wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.devutils.debugbar.DebugBar.<init>(DebugBar.java:117) ~ [wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at org.apache.wicket.devutils.debugbar.DebugBar.<init>(DebugBar.java:86) ~ [wicket-devutils-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT] at com.mydomain.webapp.common.StandardBasePage.<init>(StandardBasePage.java:52) ~ [StandardBasePage.class:na] at com.mydomain.webapp.HomePage.<init>(HomePage.java:22) ~ [HomePage.class:na] ... 48 common frames omitted
          Hide
          Martin Grigorov added a comment -

          I have fixed this the other day by adding a check to not process for injecting an anonymous class.
          Are you sure that you have the latest 6.x code ?

          Show
          Martin Grigorov added a comment - I have fixed this the other day by adding a check to not process for injecting an anonymous class. Are you sure that you have the latest 6.x code ?
          Hide
          Phill Ashworth added a comment -

          I'm pretty sure it's the latest code unless I'm doing something daft...
          This line in the above stack trace suggests I'm using your recently modified ComponentInjector.java as line 57 was not present before:
          at org.apache.wicket.cdi.ComponentInjector.onInstantiation(ComponentInjector.java:57) ~[wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]

          Show
          Phill Ashworth added a comment - I'm pretty sure it's the latest code unless I'm doing something daft... This line in the above stack trace suggests I'm using your recently modified ComponentInjector.java as line 57 was not present before: at org.apache.wicket.cdi.ComponentInjector.onInstantiation(ComponentInjector.java:57) ~ [wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
          Hide
          Martin Grigorov added a comment -

          Indeed. It appears that I have forgotten to merge the fix from master to 6.x.
          Just did it. Please pull and try again.

          Show
          Martin Grigorov added a comment - Indeed. It appears that I have forgotten to merge the fix from master to 6.x. Just did it. Please pull and try again.
          Hide
          Phill Ashworth added a comment - - edited

          That has solved the DebugBar issue which is now getting skipped correctly.
          2013-06-20 08:18:20,875 [http-listener-2(2)] DEBUG org.apache.wicket.cdi.ComponentInjector - Skipping non-static inner class 'class org.apache.wicket.devutils.debugbar.DebugBar$3'

          I'm still getting the exception on other components though, see WELD-000070_1.txt

          Show
          Phill Ashworth added a comment - - edited That has solved the DebugBar issue which is now getting skipped correctly. 2013-06-20 08:18:20,875 [http-listener-2(2)] DEBUG org.apache.wicket.cdi.ComponentInjector - Skipping non-static inner class 'class org.apache.wicket.devutils.debugbar.DebugBar$3' I'm still getting the exception on other components though, see WELD-000070_1.txt
          Phill Ashworth made changes -
          Attachment WELD-000070_1.txt [ 12588768 ]
          Hide
          Martin Grigorov added a comment -

          com.mydomain.webapp.common.PostalAddressLookupPanel$1 looks the same - an anonymous class.
          Please either update the quickstart so it is failing again or put a breakpoint at ComponentInjector and see why this class is processed.

          Show
          Martin Grigorov added a comment - com.mydomain.webapp.common.PostalAddressLookupPanel$1 looks the same - an anonymous class. Please either update the quickstart so it is failing again or put a breakpoint at ComponentInjector and see why this class is processed.
          Hide
          Phill Ashworth added a comment -

          Updated quickstart

          Show
          Phill Ashworth added a comment - Updated quickstart
          Phill Ashworth made changes -
          Attachment cditest_2.zip [ 12588777 ]
          Hide
          Phill Ashworth added a comment -

          Seems to be AjaxLink now causing the error, just adding an AjaxLink to a Page will trigger it:
          Last cause: WELD-000070 Simple bean [EnhancedAnnotatedTypeImpl] class org.apache.wicket.ajax.markup.html.AjaxLink$1 cannot be a non-static inner class

          Show
          Phill Ashworth added a comment - Seems to be AjaxLink now causing the error, just adding an AjaxLink to a Page will trigger it: Last cause: WELD-000070 Simple bean [EnhancedAnnotatedTypeImpl] class org.apache.wicket.ajax.markup.html.AjaxLink$1 cannot be a non-static inner class
          Hide
          Martin Grigorov added a comment -

          Thanks!
          Moved the check to AbstractInjector so it is reused by ComponentInjector and BehaviorInjector.
          I'm not sure whether the same check should be used for @PostConstruct too.
          Please try again.

          Show
          Martin Grigorov added a comment - Thanks! Moved the check to AbstractInjector so it is reused by ComponentInjector and BehaviorInjector. I'm not sure whether the same check should be used for @PostConstruct too. Please try again.
          Hide
          Phill Ashworth added a comment -

          Looking good so far
          Many thanks - I'll let you know if I run into further CDI issues.

          Show
          Phill Ashworth added a comment - Looking good so far Many thanks - I'll let you know if I run into further CDI issues.
          Hide
          Martin Grigorov added a comment -

          Thanks for your help !

          Show
          Martin Grigorov added a comment - Thanks for your help !
          Martin Grigorov made changes -
          Link This issue is duplicated by WICKET-5253 [ WICKET-5253 ]
          Emond Papegaaij made changes -
          Link This issue breaks WICKET-5264 [ WICKET-5264 ]

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Phill Ashworth
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development