[jboss-user] [EJB 3.0] - Re: Deploying Apache DayTrader on AS 5.1

jaikiran do-not-reply at jboss.com
Thu May 7 10:45:12 EDT 2009


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#4229449

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229449



More information about the jboss-user mailing list