0 Replies Latest reply on Jul 28, 2003 4:58 AM by rsrawat

    unable to deploy cmp bean for postgres database

    rsrawat Newbie

      hi
      I am trying to deploy cmp entity bean that will map to postgres database but it is giving incomplete deployment error message on deployment.
      can someone help me in finding the actual problem.

      ejb-jar.xml file is:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
      <ejb-jar>
      <enterprise-beans>

      <ejb-name>SessionBeanTest</ejb-name>
      com.dcc.singlesignon.SessionTest.SessionHome
      com.dcc.singlesignon.SessionTest.SessionRemote
      <ejb-class>com.dcc.singlesignon.SessionTest.SessionBeanTest </ejb-class>
      <session-type>Stateful </session-type>
      <transaction-type>Container </transaction-type>
      <ejb-local-ref>
      <ejb-ref-name>ejb/EntityBeanTest</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>
      com.dcc.singlesignon.SessionTest.EntityHome
      </local-home>

      com.dcc.singlesignon.SessionTest.EntityRemote

      <ejb-link>EntityBeanTest</ejb-link>
      </ejb-local-ref>


      <ejb-name>EntityBeanTest</ejb-name>
      <local-home>com.dcc.singlesignon.SessionTest.EntityHome </local-home>
      com.dcc.singlesignon.SessionTest.EntityRemote
      <ejb-class>com.dcc.singlesignon.SessionTest.EntityBeanTest </ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer </prim-key-class>
      false
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>EntityBeanTest</abstract-schema-name>
      <cmp-field>
      <field-name>empId</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>empName</field-name>
      </cmp-field>
      <primkey-field>empId</primkey-field>

      <query-method>
      <method-name>findAll</method-name>
      <method-params />
      </query-method>
      <ejb-ql>
      SELECT OBJECT(theUser) FROM EntityBeanTest as theUser
      </ejb-ql>

      <resource-ref>
      Data source
      <res-ref-name>jdbc/Root</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      <security-identity>

      <use-caller-identity/>
      </security-identity>

      </enterprise-beans>

      <assembly-descriptor>
      <container-transaction>

      <ejb-name>EntityBeanTest</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>

      jboss.xml file is

      false
      <container-configurations/>
      <resource-managers/>
      <resource-managers>
      <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
      <res-name>jdbc/Root</res-name>
      <res-jndi-name>java:/PostgreSQLDS</res-jndi-name>
      </resource-manager>
      </resource-managers>
      <!--
      <enterprise-beans>




      <ejb-name>EntityBeanTest</ejb-name>
      <local-jndi-name>EntityJNDI</local-jndi-name>

      </enterprise-beans>
      -->


      jbosscmp-jdbc.xml file is:

      <jbosscmp-jdbc>

      java:/PostgreSQLDS
      <datasource-mapping>PostgreSQL 7.2</datasource-mapping>

      false
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <time-out>100</time-out>
      <select-for-update>false</select-for-update>
      <pk-constraint>true</pk-constraint>
      <relation-mapping-style>foreign-key</relation-mapping-style>
      <read-ahead>
      on-load
      <page-size>500</page-size>
      <eager-load-group>group name</eager-load-group>
      </read-ahead>

      <enterprise-beans>

      <ejb-name>EntityBeanTest</ejb-name>
      <table-name>Test </table-name>
      <cmp-field>
      <field-name>empId</field-name>
      <column-name>id</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>empName</field-name>
      <column-name>name</column-name>
      </cmp-field>

      </enterprise-beans>
      </jbosscmp-jdbc>

      postgres-ds.xml file is:


      jndi-name: PostgreSQLDS
      connection-url: jdbc:postgesql://192.168.1.30:5432/root
      driver-class: org.postgresql.Driver
      username: root
      password: root


      please check it what is the problem in this deployment.
      Thanks