2 Replies Latest reply: Dec 18, 2010 2:54 PM by Joshua Davis RSS

EntityManager injection error with embedded jboss

bb bb Master

Hy!

 

I have Seam 2.2GA project on Tomcat 6.  I setup Integration Seam testing with embedded JBoss by seam-gen.
When I run a test with the eclipse testng plugin, its executed successfully, there is no problem with entityManager injection, so everything fine.

 

But When I try to run this test with a custom ant task, I get ELException.The problem is that the entityManager injection does not work, when I execute tests with ant. (another injections are works).

I think I configured the classpath corretly because If I avoid entityManager injection everything works fine.

 

So I thanks any suggestion, what I forgot....

 


[testng] FAILED: testRegisterComponent
   [testng]  javax.el.ELException: org.jboss.seam.RequiredException: @In attribute  requires non-null value: testerBean.entityManager
   [testng]      at javax.el.BeanELResolver.getValue(BeanELResolver.java:278)
   [testng]      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
   [testng]      at org.jboss.el.parser.AstPropertySuffix.getTarget(AstPropertySuffix.java:38)
   [testng]      at org.jboss.el.parser.AstValue.getTarget(AstValue.java:47)
   [testng]      at org.jboss.el.parser.AstValue.setValue(AstValue.java:83)
   [testng]      at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
   [testng]      at org.jboss.seam.core.Expressions$1.setValue(Expressions.java:117)
   [testng]      at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.setValue(AbstractSeamTest.java:152)
   [testng]      at com.mrm.session.TesterBeanIntegrationTest$1.testComponents(TesterBeanIntegrationTest.java:33)
   [testng]      at org.jboss.seam.mock.AbstractSeamTest$ComponentTest.run(AbstractSeamTest.java:162)
   [testng]      at com.mrm.session.TesterBeanIntegrationTest.testRegisterComponent(TesterBeanIntegrationTest.java:25)
   [testng] Caused by: org.jboss.seam.RequiredException: @In attribute requires non-null value: testerBean.entityManager
   [testng]      at org.jboss.seam.Component.getValueToInject(Component.java:2335)
   [testng]      at org.jboss.seam.Component.injectAttributes(Component.java:1736)
   [testng]      at org.jboss.seam.Component.inject(Component.java:1554)
   [testng]      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
   [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
   [testng]      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
   [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
   [testng]      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
   [testng]      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
   [testng]      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
   [testng]      at com.mrm.session.TesterBean_$$_javassist_seam_1.getPerson(TesterBean_$$_javassist_seam_1.java)
   [testng]      at javax.el.BeanELResolver.getValue(BeanELResolver.java:273)