2 Replies Latest reply on Nov 24, 2003 1:55 PM by b_boyle18

    Hypersonic Datasource

    b_boyle18 Newbie

      Hey!
      I am using Hypersonic as my database and I have started it and manually added data to it so I know it is up and running. But when I try to deploy my EJB I get the following error:

      20:01:53,384 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=MyCustomerBean,service=EJB
      org.jboss.deployment.DeploymentException: Error: can't find data source: Java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundException: Java: not bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:99)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:397)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:339)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:782)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
      at $Proxy4.start(Unknown Source).......................................................................................etc.

      I have used Lomboz to setup my Entity Beans and to generate my deployment descriptors. I have followed an online tutorial so I think they have been generate correctly. Here is a snippet of my ejb-jar.xml:

      <cmp-field >
      <![CDATA[Returns the age]]>
      <field-name>age</field-name>
      </cmp-field>
      <primkey-field>id</primkey-field>

      <resource-ref >
      <res-ref-name>jdbc/DefaultDS</res-ref-name>
      <res-type>javax.sql.Datasource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>



      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(a) FROM sa as a]]></ejb-ql>


      Here is a snippet of JBoss.xml:


      <ejb-name>MyCustomer</ejb-name>
      <jndi-name>MyCustomerBean</jndi-name>
      <local-jndi-name>MyCustomerLocal</local-jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/DefaultDS</res-ref-name>
      <jndi-name>java:/DefaultDS</jndi-name>
      </resource-ref>



      And my JBosscmp-jdbc looks like this:

      <jbosscmp-jdbc>

      Java:/DefaultDS
      <datasource-mapping>Hypersonic SQL</datasource-mapping>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>

      etc.


      I'm using JBoss 3.0.7.

      Hope someone can help!!:)
      Thanks, B