[jboss-user] [EJB3] - Re: Upgrading from 4.2.3 to 5.1 fails with "Unable to inject jndi dependency"

Alexander Hartner do-not-reply at jboss.com
Tue Jun 14 03:42:01 EDT 2011

Alexander Hartner [http://community.jboss.org/people/ejb3workshop] created the discussion

"Re: Upgrading from 4.2.3 to 5.1 fails with "Unable to inject jndi dependency""

To view the discussion, visit: http://community.jboss.org/message/610051#610051

The problem was that I also included a JMS Connection factory within my ear file. I was using the xml descriptor to declare the JMS connection factory used by some of my EJBs. By adding a dependency for each bean which uses the connection factory to the jboss.xml deployment descriptor I managed to work around this issue. 

There are some things which made this more confusing that it has to be.

1.) The error mentions jms/ConnectionFactory rather than my custom connection factory. This is rather misleading. It could have been much simpler to determine the cause of the problem if it told me that my custom connection factory was not found

2.) The startup sequence / order has been changed from 4.2.3 to 5.1. 

>         <!-- Job Request Listener MDB -->
>         <message-driven>
>             <ejb-name>JobRequestListener</ejb-name>
>             <destination-jndi-name>queue/abc/JobRequests</destination-jndi-name>
>             <!--Inherited From AbstractManagedBean -->
>             <resource-ref>
>                 <res-ref-name>jms/ConnectionFactory</res-ref-name>
>                 <res-type>javax.jms.ConnectionFactory</res-type>
>                 <jndi-name>ConnectionFactory</jndi-name>
>             </resource-ref>
> ...
>           <depends>jboss.jca:service=ConnectionFactoryBinding,name=jms/ABCJMSConnectionFactory</depends>
>         <message-driven>

Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110614/62c0fbab/attachment.html 

More information about the jboss-user mailing list