Hi,

See https://issues.apache.org/jira/browse/WICKET-5264

Martin Grigorov
Wicket Training and Consulting


On Tue, Apr 15, 2014 at 6:29 AM, Duke <[email protected]> wrote:

> Hi all.
> Tried to build simple example with EntityManager injection:
>
> public class LoginPage extends BasePage {
>
>     @Inject EntityManager em;
>     ...
> }
>
> public class Application extends WebApplication {
>     @Override
>     protected void init() {
>         super.init();
>         new CdiConfiguration().configure(this);
>     }
> }
>
> It fails on new CdiConfiguration().configure(this); with message:
> Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000070
> Simple
> bean [EnhancedAnnotatedTypeImpl]  class
> org.apache.wicket.markup.html.panel.FeedbackPanel$1 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)
>
> If I comment line with configuring of CdiConfiguration, all injections are
> nulls ((
> What I am doing wrong?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-CDI-application-junit-test-tp4665366p4665402.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to