views:

101

answers:

1

I have an EJB3 project to be deployed on JBoss 5.1.0 GA. I have Stateless EJBs being injected into other Stateless beans and Servlets.

I'm using the @EJB annotation without any parameters to inject the EJB beans, (i have a test project just to simulate the injection, which works).

When i try deploying i get the error below.

"Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Resolution should not happen via injection container"

I have searched but can't seem to find/pinpoint the cause of the error.

Update: 1

Both the EJB jar and WAR are deployed in the same EAR. I'm using the JEE5 archtype, http://code.google.com/p/javaee5-maven-archetype/ to create both the main project and test. The default code generated by the archtype works, and there is no need to specify the JNDI name in the @EJB injection.

Update: 2 The full deployment stacktrace, http://pastebin.com/CknXie13