2 Replies Latest reply on May 29, 2006 9:45 AM by Chart Krobtragolchai

    Problem in deploying BMP based web application

    Dhirendra Kumar Singh Newbie

      Hi friends,
      I am a new bea in JBoss field. I have deployed web applications in Sun Application Server 8.1 using NetBeans 4.1. Now, I am trying to deploy my J2EE applications in JBoss using JBoss 4.0 (latest) with JBoss(1.5.1GA) - Eclipse(3.1.1). First, I want to test a simple Database Application with a single BMP Bean and a single JSP which calls the BMP and shows data.

      The EJB file:

      /**
       *
       */
      package com.dbdemo.ejb;
      
      import java.rmi.RemoteException;
      import java.sql.Connection;
      import java.sql.PreparedStatement;
      import java.sql.ResultSet;
      import java.sql.SQLException;
      import java.util.ArrayList;
      import java.util.Collection;
      
      import javax.ejb.EJBException;
      import javax.ejb.EntityBean;
      import javax.ejb.EntityContext;
      import javax.ejb.ObjectNotFoundException;
      import javax.ejb.RemoveException;
      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      import javax.sql.DataSource;
      
      /**
       * @ejb.bean name="DBDemoBean"
       * display-name="DBDemoEB"
       * description="Description for DBDemo"
       * jndi-name="ejb/DBDemo"
       * type="BMP"
       * view-type="remote"
       * primkey-field="userTypeID"
       * @ejb.pk class="java.lang.Integer"
       * generate="false"
       * @ejb.resource-ref
       * description="jdbc:mysql://localhost/newestoredb"
       * res-name="jdbc/myEStoreDB"
       * res-ref-name="jdbc/myEStoreDB"
       * res-type="javax.sql.DataSource"
       * res-auth="Container"
       * res-sharing-scope="Shareable"
       */
      public class DBDemoBean implements EntityBean {
       private EntityContext context;
       private Connection con;
       private Integer userTypeID;
       private String userTypeTitle;
      
       /* (non-Javadoc)
       * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
       */
       public void setEntityContext(EntityContext ctx)
       throws EJBException,
       RemoteException {
       // TODO Auto-generated method stub
       this.context = ctx;
       }
      
       /* (non-Javadoc)
       * @see javax.ejb.EntityBean#unsetEntityContext()
       */
       public void unsetEntityContext() throws EJBException, RemoteException {
       // TODO Auto-generated method stub
       this.context = null;
       }
      
       /* (non-Javadoc)
       * @see javax.ejb.EntityBean#ejbRemove()
       */
       public void ejbRemove()
       throws RemoveException,
       EJBException,
       RemoteException {
       // TODO Auto-generated method stub
       try {
       deleteRow(userTypeID);
       } catch (Exception e) {
       throw new EJBException("ejbRemove: " + e.getMessage());
       }
       }
      
       /* (non-Javadoc)
       * @see javax.ejb.EntityBean#ejbActivate()
       */
       public void ejbActivate() throws EJBException, RemoteException {
       // TODO Auto-generated method stub
      
       }
      
       /* (non-Javadoc)
       * @see javax.ejb.EntityBean#ejbPassivate()
       */
       public void ejbPassivate() throws EJBException, RemoteException {
       // TODO Auto-generated method stub
      
       }
      
       /* (non-Javadoc)
       * @see javax.ejb.EntityBean#ejbLoad()
       */
       public void ejbLoad() throws EJBException, RemoteException {
       // TODO Auto-generated method stub
       try {
       loadRow();
       Integer pk = (Integer) context.getPrimaryKey();
       this.userTypeID = pk;
       } catch (Exception e) {
       throw new EJBException("ejbLoad: " + e.getMessage());
       }
       }
      
       /* (non-Javadoc)
       * @see javax.ejb.EntityBean#ejbStore()
       */
       public void ejbStore() throws EJBException, RemoteException {
       // TODO Auto-generated method stub
       try {
       storeRow();
       } catch (Exception e) {
       throw new EJBException("ejbStore: " + e.getMessage());
       }
       }
      
       private String tableName = "usertype";
      
       private DataSource getMyEStoreDB() throws NamingException {
       Context c = new InitialContext();
       return (DataSource) c.lookup("java:comp/env/jdbc/myEStoreDB");
       }
      
       private void makeConnection() {
       try {
       con = getMyEStoreDB().getConnection("aspl", "aspl123");
       } catch (Exception e) {
       throw new EJBException("Unable to connect to database: "
       + e.getMessage());
       }
       }
      
       private void releaseConnection() {
       try {
       con.close();
       } catch (SQLException ex) {
       throw new EJBException("releaseConnection: " + ex.getMessage());
       }
       }
      
       private Integer insertRow(String userTypeTitle) throws SQLException {
       makeConnection();
      
       String insertStatement = "insert into "
       + tableName
       + " (userTypeTitle) values (?)";
      
       PreparedStatement prepStmt = con.prepareStatement(insertStatement);
      
       prepStmt.setObject(1, userTypeTitle);
      
       prepStmt.executeUpdate();
      
       ResultSet rs = prepStmt.getGeneratedKeys();
       Integer pk = null;
       if (rs.next()) {
       pk = new Integer(((Long) rs.getObject(1)).intValue());
       } else {
       throw new SQLException("Unable to get userTypeID");
       }
      
       prepStmt.close();
       releaseConnection();
       return pk;
       }
      
       private void deleteRow(Integer userTypeID) throws SQLException {
       makeConnection();
      
       String deleteStatement = "delete from "
       + tableName
       + " where userTypeID = ? ";
       PreparedStatement prepStmt = con.prepareStatement(deleteStatement);
      
       prepStmt.setObject(1, userTypeID);
       prepStmt.executeUpdate();
       prepStmt.close();
       releaseConnection();
       }
      
       private boolean selectByPrimaryKey(Integer userTypeID) throws SQLException {
       makeConnection();
      
       String selectStatement = "select userTypeID from "
       + tableName
       + " where userTypeID = ? ";
       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
      
       prepStmt.setObject(1, userTypeID);
      
       ResultSet rs = prepStmt.executeQuery();
       boolean result = rs.next();
      
       prepStmt.close();
       releaseConnection();
      
       return result;
       }
      
       private void loadRow() throws SQLException {
       makeConnection();
      
       Integer pk = (Integer) context.getPrimaryKey();
       String selectStatement = "select userTypeTitle from "
       + tableName
       + " where userTypeID = ? ";
       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
       prepStmt.setObject(1, pk);
       ResultSet rs = prepStmt.executeQuery();
      
       if (rs.next()) {
       this.userTypeTitle = (String) rs.getObject(1);
       prepStmt.close();
       } else {
       prepStmt.close();
       throw new javax.ejb.NoSuchEntityException("Row for userTypeID "
       + userTypeID
       + " not found in database.");
       }
      
       releaseConnection();
       }
      
       private void storeRow() throws SQLException {
       makeConnection();
      
       String updateStatement = "update "
       + tableName
       + " set userTypeTitle = ? where userTypeID = ?";
      
       PreparedStatement prepStmt = con.prepareStatement(updateStatement);
      
       prepStmt.setObject(1, userTypeTitle);
       prepStmt.setObject(2, userTypeID);
      
       int rowCount = prepStmt.executeUpdate();
      
       prepStmt.close();
      
       if (rowCount == 0) {
       throw new EJBException("Storing row for userTypeID "
       + userTypeID
       + " failed.");
       }
      
       releaseConnection();
       }
      
       private Collection getAllTypes() throws SQLException {
       makeConnection();
      
       String selectStatement = "select userTypeID from " + tableName;
       PreparedStatement prepStmt = con.prepareStatement(selectStatement);
      
       ResultSet rs = prepStmt.executeQuery();
       ArrayList a = new ArrayList();
      
       while (rs.next()) {
       Integer id = new Integer(((Long) rs.getObject(1)).intValue());
       a.add(id);
       }
      
       prepStmt.close();
      
       releaseConnection();
       return a;
       }
       /**
       * Home method
       * @ejb.home-method view-type = "remote"
       */
       public java.lang.Integer ejbFindByPrimaryKey(java.lang.Integer userTypeID)
       throws javax.ejb.FinderException {
       // TODO Auto-generated method stub
       boolean result;
      
       try {
       result = selectByPrimaryKey(userTypeID);
       } catch (Exception ex) {
       throw new EJBException("ejbFindByPrimaryKey: " + ex.getMessage());
       }
      
       if (result) {
       return userTypeID;
       } else {
       throw new ObjectNotFoundException("Row for userTypeID "
       + userTypeID
       + " not found.");
       }
       }
       /**
       * Create method
       * @ejb.create-method view-type = "remote"
       */
       public java.lang.Integer ejbCreate(java.lang.String userTypeTitle)
       throws javax.ejb.CreateException {
       // TODO Auto-generated method stub
       if (userTypeTitle == null || userTypeTitle.equals("")) {
       throw new javax.ejb.CreateException(
       "The field \"userTypeTitle\" must not be null or blank");
       }
      
       // TODO add additional validation code, throw CreateException if data is not valid
       Integer pk = null;
       try {
       pk = insertRow(userTypeTitle);
       } catch (Exception e) {
       throw new EJBException("ejbCreate: " + e.getMessage());
       }
      
       this.userTypeID = pk;
       this.userTypeTitle = userTypeTitle;
      
       return userTypeID;
       }
       /**
       * Post Create method
       */
       public void ejbPostCreate(java.lang.String userTypeTitle)
       throws javax.ejb.CreateException {
       // TODO Auto-generated method stub
       }
       /**
       * Home method
       * @ejb.home-method view-type = "remote"
       */
       public java.util.Collection ejbFindAll() {
       // TODO Auto-generated method stub
       try {
       return getAllTypes();
       } catch (Exception e) {
       throw new EJBException("ejbHomeFindAll: " + e.getMessage());
       }
       }
       /**
       * Business method
       * @ejb.interface-method view-type = "remote"
       */
       public java.lang.String getTitle() {
       // TODO Auto-generated method stub
       return this.userTypeTitle;
       }
       /**
       * Business method
       * @ejb.interface-method view-type = "remote"
       */
       public void setTitle(java.lang.String userTypeTitle) {
       // TODO Auto-generated method stub
       if (userTypeTitle==null || userTypeTitle.equals(""))
       throw new EJBException("The field \"userTypeTitle\" must not be null or blank");
       this.userTypeTitle = userTypeTitle;
       }
      
       /**
       * @return Returns the userTypeID.
       */
       public Integer getUserTypeID() {
       return userTypeID;
       }
      }
      


      The ejb-jar.xml file:
      <?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 >
      
       <description>[CDATA[No Description.]]</description>
       <display-name>Generated by XDoclet</display-name>
      
       <enterprise-beans>
      
       <!-- Session Beans -->
       <!--
       To add session beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called session-beans.xml that contains
       the <session></session> markup for those beans.
       -->
      
       <!-- Entity Beans -->
       <entity >
       <description>[CDATA[Description for DBDemo]]</description>
       <display-name>DBDemoEB</display-name>
      
       <ejb-name>DBDemoBeanBMP</ejb-name>
      
       <home>com.dbdemo.ejb.DBDemoBeanBMPHome</home>
       <remote>com.dbdemo.ejb.DBDemoBeanBMP</remote>
      
       <ejb-class>com.dbdemo.ejb.DBDemoBeanBMP</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>False</reentrant>
       <cmp-version>2.x</cmp-version>
       <abstract-schema-name>DBDemoBeanBMP</abstract-schema-name>
       <primkey-field>userTypeID</primkey-field>
      
       <resource-ref >
       <description>[CDATA[jdbc:mysql://localhost/newestoredb]]</description>
       <res-ref-name>jdbc/myEStoreDB</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       <res-sharing-scope>Shareable</res-sharing-scope>
       </resource-ref>
      
       <!-- Write a file named ejb-finders-DBDemoBeanBMP.xml if you want to define extra finders. -->
      
       </entity>
      
       <entity >
       <description>[CDATA[Description for DBDemo]]</description>
       <display-name>DBDemoEB</display-name>
      
       <ejb-name>DBDemoBean</ejb-name>
      
       <home>com.dbdemo.ejb.DBDemoBeanHome</home>
       <remote>com.dbdemo.ejb.DBDemoBean</remote>
      
       <ejb-class>com.dbdemo.ejb.DBDemoBeanBMP</ejb-class>
       <persistence-type>Bean</persistence-type>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>False</reentrant>
      
       <resource-ref >
       <description>[CDATA[jdbc:mysql://localhost/newestoredb]]</description>
       <res-ref-name>jdbc/myEStoreDB</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       <res-sharing-scope>Shareable</res-sharing-scope>
       </resource-ref>
      
       </entity>
      
       <!--
       To add entity beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called entity-beans.xml that contains
       the <entity></entity> markup for those beans.
       -->
      
       <!-- Message Driven Beans -->
       <!--
       To add message driven beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called message-driven-beans.xml that contains
       the <message-driven></message-driven> markup for those beans.
       -->
      
       </enterprise-beans>
      
       <!-- Relationships -->
      
       <!-- Assembly Descriptor -->
       <!--
       To specify your own assembly descriptor info here, add a file to your
       XDoclet merge directory called assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
       -->
      
       <assembly-descriptor >
       <!--
       To specify additional security-role elements, add a file in the merge
       directory called ejb-security-roles.xml that contains them.
       -->
      
       <!-- method permissions -->
       <!--
       To specify additional method-permission elements, add a file in the merge
       directory called ejb-method-permissions.ent that contains them.
       -->
      
       <!-- transactions -->
       <!--
       To specify additional container-transaction elements, add a file in the merge
       directory called ejb-container-transactions.ent that contains them.
       -->
      
       <!-- finder transactions -->
      
       <!-- message destinations -->
       <!--
       To specify additional message-destination elements, add a file in the merge
       directory called ejb-message-destinations.ent that contains them.
       -->
      
       <!-- exclude list -->
       <!--
       To specify an exclude-list element, add a file in the merge directory
       called ejb-exclude-list.xml that contains it.
       -->
       </assembly-descriptor>
      
      </ejb-jar>
      


      The jboss.xml for EJB:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
      
      <jboss>
      
       <enterprise-beans>
      
       <!--
       To add beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called jboss-beans.xml that contains
       the <session></session>, <entity></entity> and <message-driven></message-driven>
       markup for those beans.
       -->
      
       <entity>
       <ejb-name>DBDemoBeanBMP</ejb-name>
       <jndi-name>DBDemoBeanBMP</jndi-name>
      
       <method-attributes>
       </method-attributes>
      
       </entity>
       <entity>
       <ejb-name>DBDemoBean</ejb-name>
       <jndi-name>ejb/DBDemo</jndi-name>
      
       <method-attributes>
       </method-attributes>
      
       </entity>
      
       <!--
       write a merge file jboss-webservices.ent for webservice-description
       -->
      
       </enterprise-beans>
      
       <!--
       To specify your own assembly descriptor info here, add a file to your
       XDoclet merge directory called jboss-assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
       -->
       <assembly-descriptor>
       <!-- message destinations -->
       <!--
       To specify additional message-destination elements, add a file in the merge
       directory called jboss-message-destinations.ent that contains them.
       -->
       </assembly-descriptor>
      
       <resource-managers>
       </resource-managers>
      
       <!--
       | for container settings, you can merge in jboss-container.xml
       | this can contain <invoker-proxy-bindings/> and <container-configurations/>
       -->
      
      </jboss>
      


      The XDocklet file:
      <?xml version="1.0" encoding="UTF-8"?>
      <project name="XDoclet Generator" default="_xdoclet_generation_">
      <property file="xdoclet-build.properties"/>
      <property name="eclipse.home" value="C:/eclipse"/>
      <property name="xdoclet.basedir" value="${eclipse.home}/plugins/org.jboss.ide.eclipse.xdoclet.core_1.5.1.GA"/>
      <property name="jboss.net.version" value="4.0"/>
      <path id="project.classpath"><pathelement location="bin"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/ejb-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/jacc-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/jca-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/jms-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/jsp-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/jta-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/servlet-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.5.1.GA/lib/j2ee-1.4/sql-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.ws.core_1.5.1.GA/lib/wsi-1.0/jaxr-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.ws.core_1.5.1.GA/lib/wsi-1.0/jaxrpc-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.ws.core_1.5.1.GA/lib/wsi-1.0/saaj-api.jar"/>
      <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.ws.core_1.5.1.GA/lib/wsi-1.0/xml-api.jar"/>
      </path>
      <path id="xdoclet.classpath">
      <path refid="project.classpath"/>
      <fileset dir="${xdoclet.basedir}">
      <include name="*.jar"/>
      <exclude name="xdoclet-module-jboss-net-*.jar"/>
      </fileset>
      <fileset dir="${xdoclet.basedir}">
      <include name="xdoclet-module-jboss-net-${jboss.net.version}*.jar"/>
      </fileset>
      </path>
      <target name="_xdoclet_generation_" depends="N65540,N66381"/>
      <target name="N65540" description="EJB">
      <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="xdoclet.classpath"/><ejbdoclet ejbSpec="2.0" destDir="src" >
      <entitybmp>
      </entitybmp>
      <deploymentdescriptor destDir="src/META-INF" >
      </deploymentdescriptor>
      <jboss Version="4.0" destDir="src/META-INF" >
      </jboss>
      <fileset dir="src" includes="com/dbdemo/ejb/*Bean.java" >
      </fileset>
      <homeinterface>
      </homeinterface>
      <remoteinterface>
      </remoteinterface>
      <packageSubstitution packages="ejb" substituteWith="interfaces" >
      </packageSubstitution>
      </ejbdoclet></target>
      <target name="N66381" description="WEB">
      <taskdef name="webdoclet" classname="xdoclet.modules.web.WebDocletTask" classpathref="xdoclet.classpath"/><webdoclet destDir="src" >
      <deploymentdescriptor Servletspec="2.3" >
      </deploymentdescriptor>
      <jbosswebxml Version="4.0" >
      </jbosswebxml>
      <fileset dir="src" includes="**/*Servlet.java" >
      </fileset>
      </webdoclet></target>
      </project>
      
      


      The packaging-build.xml file:
      <?xml version="1.0" encoding="UTF-8"?>
      <project name="Packaging Generator" default="_packaging_generation_">
      <target name="_packaging_generation_" depends="N65540,N65573,N65616"/>
      <target name="N65540" description="DBDemoEJB.jar">
      <jar destfile="DBDemoEJB.jar">
      <zipfileset dir="src/META-INF" prefix="META-INF">
      <include name="ejb-jar.xml"/>
      </zipfileset>
      <zipfileset dir="src/META-INF" prefix="META-INF">
      <include name="jboss.xml"/>
      </zipfileset>
      <zipfileset dir="bin" includes="com/dbdemo/ejb/*.class,com/dbdemo/interfaces/*.class"/>
      </jar>
      </target>
      <target name="N65573" description="DBDemoWeb.war">
      <jar destfile="DBDemoWeb.war">
      <zipfileset dir="src" prefix="WEB-INF">
      <include name="jboss-web.xml"/>
      </zipfileset>
      <zipfileset dir="src" prefix="WEB-INF">
      <include name="web.xml"/>
      </zipfileset>
      <zipfileset dir="docroot"/>
      <zipfileset dir="src" prefix="WEB-INF/classes" includes="com/dbdemo/web/**/*.class"/>
      </jar>
      </target>
      <target name="N65616" description="DBDemoApp.ear">
      <jar destfile="DBDemoApp.ear">
      <zipfileset dir=".">
      <include name="DBDemoEJB.jar"/>
      </zipfileset>
      <zipfileset dir=".">
      <include name="DBDemoWeb.war"/>
      </zipfileset>
      <zipfileset dir="src/META-INF" prefix="META-INF">
      <include name="application.xml"/>
      </zipfileset>
      </jar>
      </target>
      </project>
      


      When I run X-Doclet, it creates another Bean with suffix BMP in the same place where my bean is located. I don't understand for what purpose it is created. Second thing, when I deploy this application, following error is generated:
      15:03:06,102 INFO [EARDeployer] Init J2EE application: file:/C:/jboss/server/default/deploy/DBDemoApp.ear
      15:03:06,753 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss/server/default/tmp/deploy/tmp35328DBDemoApp.ear-contents/DBDemoEJB.jar
      org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean DBDemoBeanBMP: primkey-field userTypeID is not a cmp-field
       at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:386)
       at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:166)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:99)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy38.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:504)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
      
      


      I have not used any CMP code then why is this error? Please help me out, why is it happening, if you need any other file to see, tell me. But give me some clue. Please...

      Thanx in advance