There appears to be an misconfiguration in that application. Specifically, there's an
resource-ref entry in jboss.xml for the datasource:
<resource-ref>
| <res-ref-name>jdbc/TradeDataSource</res-ref-name>
| <!-- If using DB2, comment out this line -->
| <jndi-name>jdbc/TradeDataSource</jndi-name>
| <!-- If using MySql or Oracle, use this line -->
| <!-- <jndi-name>java:jdbc/TradeDataSource</jndi-name>
-->
| </resource-ref>
|
But there is no corresponding entry for this resource-ref, neither in ejb-jar.xml nor as a
@Resource in the TradeSLSBBean. This leads to the NPE. Removing the resource-ref from the
jboss.xml (or providing the corresponding entry in ejb-jar.xml or as a @Resource in the
bean) should fix this problem.
I'll file a EJB3 JIRA to provide better handling/message for this case.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229449#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...