0 Replies Latest reply on Sep 10, 2001 12:35 PM by Nishant

    need help with Deployment Exception

    Nishant Newbie

      I am trying to deploy a bean called StateComponentBean with the following class definition

      public class StateComponentBean implements EntityBean {
      public Hashtable blobData;
      public String _uniqueKey;

      ......

      }

      I am using the following jar files:
      ejb-jar.xml:

      <!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>

      <ejb-name>StateComponent</ejb-name>
      com.eidea.stub.ejb.component.StateComponentHome
      com.eidea.stub.ejb.component.StateComponent
      <ejb-class>com.eidea.ejb.component.StateComponentBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-field>
      <field-name>blobData</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>_uniqueKey</field-name>
      </cmp-field>
      <primkey-field>_uniqueKey</primkey-field>

      </enterprise-beans>
      <assembly-descriptor>
      <container-transaction>

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

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

      jaws.xml:
      <?xml version="1.0" encoding="UTF-8"?>

      java:/SQLServerPool
      <type-mapping>MS SQLSERVER</type-mapping>
      <default-entity>
      <remove-table>false</remove-table>
      </default-entity>
      <type-mappings>
      <type-mapping>
      MS SQLSERVER
      <!-- COPY "MS SQLSERVER" MAPPINGS FROM standardjaws.xml HERE -->
      </type-mapping>
      </type-mappings>
      <enterprise-beans>

      <ejb-name>StateComponent</ejb-name>
      <table-name>STATECOMPONENT</table-name>
      <remove-table>false</remove-table>
      <cmp-field>
      <field-name>_uniqueKey</field-name>
      <column-name>key</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(100)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>blobData</field-name>
      <column-name>content</column-name>
      <jdbc-type>JAVA_OBJECT</jdbc-type>
      <sql-type>IMAGE(16)</sql-type>
      </cmp-field>



      </enterprise-beans>


      Not able to figure out why I am getting the following DeploymentException on the server:

      [Container factory] Deploying StateComponent
      [Container factory] org.jboss.ejb.DeploymentException: cmp-field blobData is not
      a field in ejb class com.eidea.ejb.component.StateComponentBean
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.CMPFieldMetaData.
      verifyNestedField(CMPFieldMetaData.java:206)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.CMPFieldMetaData.
      checkField(CMPFieldMetaData.java:179)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.CMPFieldMetaData.
      (CMPFieldMetaData.java:99)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsEntityMetaDat
      a.(JawsEntityMetaData.java:129)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsApplicationMe
      taData.(JawsApplicationMetaData.java:89)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader
      .load(JawsXmlFileLoader.java:53)
      [Container factory] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.<i
      nit>(JDBCCommandFactory.java:79)
      [Container factory] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.ini
      t(JAWSPersistenceManager.java:78)
      [Container factory] at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPP
      ersistenceManager.java:105)
      [Container factory] at org.jboss.ejb.EntityContainer.init(EntityContainer.ja
      va:198)
      [Container factory] at org.jboss.ejb.Application.init(Application.java:183)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:337)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:275)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.deployment.J2eeDeployer.startApplication(J2
      eeDeployer.java:415)
      [Container factory] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer
      .java:178)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:3
      58)
      [Container factory] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221)

      [Container factory] at java.lang.Thread.run(Unknown Source)
      [J2EE Deployer Default] Starting StateComponent.jar failed!