Hi,
I am writing BMP entity bean using default Hypersonic and InstantDB JDBC
driver from jboss

I've specified <res-jndi-name>java:/InstantDB</res-jndi-name> in the
jboss.xml and In the ejb-jar file, I also specified
<res-ref-name>jdbc/InstantDB</res-ref-name>

I am able to get the connection via:
Context jndiCntx = new InitialContext();
DataSource ds = (DataSource)jndiCntx.lookup("java:/InstantDB");

I also manually created a table in the HypersoncSQL server, and I can see
the table has been created
What did I miss?

Thanks

My jboss.xml

<?xml version="1.0" encoding="Cp1252"?>
<jboss>
   <secure>false</secure>
   <container-configurations></container-configurations>

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

   <enterprise-beans>
   <entity>
   <ejb-name>ArtifactTemplateMap</ejb-name>
   <jndi-name>dashboard/ArtifactTemplateMap</jndi-name>
   <configuration-name></configuration-name>
   <resource-ref>
    <res-ref-name>jdbc/InstantDB</res-ref-name>
    <resource-name>InstantDB</resource-name>
   </resource-ref>
   </entity>
  </enterprise-beans>
 </jboss>


My ejb-jar.xml
<?xml version="1.0" encoding="Cp1252"?>

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

<ejb-jar>
  <enterprise-beans>
      <entity>
      <description>Artifact Template Map</description>
      <ejb-name>ArtifactTemplateMap</ejb-name>
      <home>com.waterlogic.portal.ArtifactTemplateMapHome</home>
      <remote>com.waterlogic.portal.ArtifactTemplateMap</remote>
      <ejb-class>com.waterlogic.portal.ArtifactTemplateMapBean</ejb-class>
      <persistence-type>Bean</persistence-type>

<prim-key-class>com.waterlogic.portal.ArtifactTemplateMapPK</prim-key-class>
      <reentrant>False</reentrant>
      <resource-ref>
       <res-ref-name>jdbc/InstantDB</res-ref-name>
       <resource-name>InstantDB</resource-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
      </resource-ref>


     </entity>
     <assembly-descriptor>
     <container-transaction>
      <method>
        <ejb-name>ArtifactTemplateMap</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
  </enterprise-beans>
</ejb-jar>

I've created the ArtifactTemplateMap table, but I still got the table not
found exception:
[ArtifactTemplateMap] ArtifactTemplateMapBean:ejbCreate called
[ArtifactTemplateMap] RMI TCP Connection(4)-172.150.135.3 insert into
ArtifactTemplateMap ( artifactType , templateID , createdBy , updateBy ,
createDate , updateDate ) values ( UseCase , 1 , Pifen , Pifen , 2001-04-07
, 2001-04-07 )
[ArtifactTemplateMap] RMI TCP Connection(4)-172.150.135.3
java.sql.SQLException: Table not found: ArtifactTemplateMap
[ArtifactTemplateMap] java.rmi.RemoteException:
ArtifactTemplateMapBean:failed to create new; nested exception is:
 java.sql.SQLException: Table not found: ArtifactTemplateMap
[ArtifactTemplateMap] java.sql.SQLException: Table not found:
ArtifactTemplateMap
[ArtifactTemplateMap]  at
org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:276)
[ArtifactTemplateMap]  at
org.enhydra.instantdb.jdbc.idbPreparedStatement.execute(idbPreparedStatement
.java:92)
[ArtifactTemplateMap]  at
org.enhydra.instantdb.jdbc.idbPreparedStatement.executeUpdate(idbPreparedSta
tement.java:71)
[ArtifactTemplateMap]  at
org.opentools.minerva.jdbc.PreparedStatementInPool.executeUpdate(PreparedSta
tementInPool.java:82)
[ArtifactTemplateMap]  at
com.waterlogic.portal.ArtifactTemplateMapBean.ejbCreate(ArtifactTemplateMapB
ean.java:54)
[ArtifactTemplateMap]  at java.lang.reflect.Method.invoke(Native Method)


Pifen Ellwood



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to