1 Reply Latest reply on Jan 3, 2003 10:51 AM by agupta_25

    DataSource configuration for Petstore

    sushil_sureka

      Hi,

      I am trying to get Petstore 1.1.2 running on JBOSS 3.0.4 but I have run into issues regarding datasource. I have the following entry in the jboss.xml

      <enterprise-beans>

      <ejb-name>TheAccount</ejb-name>
      <resource-ref>
      <res-ref-name>jdbc/EstoreDataSource</res-ref-name>
      <resource-name>java:/EstoreDB</resource-name>
      </resource-ref>



      <ejb-name>TheOrder</ejb-name>
      <resource-ref>
      <res-ref-name>jdbc/EstoreDataSource</res-ref-name>
      <resource-name>java:/EstoreDB</resource-name>
      </resource-ref>

      </enterprise-beans>

      <resource-managers>
      <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
      <res-name>EstoreDB</res-name>
      <res-jndi-name>java:/EstoreDB</res-jndi-name>
      </resource-manager>
      </resource-managers>


      When the jboss server tries to deploy this, it complains about
      21:33:42,746 WARN [EntityContainer] No resource manager found for java:/InventoryDB
      21:33:42,756 INFO [EjbModule] Started
      21:33:42,756 INFO [EjbModule] Starting
      21:33:42,776 INFO [EjbModule] Started
      21:33:42,776 INFO [EjbModule] Starting
      21:33:42,776 WARN [EntityContainer] No resource manager found for java:/EstoreDB

      But the deployment goes on. When I bring up the index page and then clicke on petstore link, it gives a naming exception in PopuldateServlet class saying EStoreDS not found. Where do I configure this data source. I have the following entry in my jboss-web.xml
      <jboss-web>
      <resource-ref>
      <res-ref-name>jdbc/EstoreDataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <jndi-name>java:/EstoreDB</jndi-name>
      .....

      I have the oracle-xa-service.xml file deployed in the default domain. If I rename the jndi name from OracleXADS to EStoreDS then I get the following excpetion

      java.lang.SecurityException: Invalid authentication attempt, principal=null java.lang.SecurityException: Invalid authentication attempt, principal=null at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject
      ...
      Even though I have the user id and password set in the oracle-xa-service.xml file.

      Any help would be highly appreciated.