0 Replies Latest reply on Jul 27, 2004 3:37 PM by glm

    Error Deploying Transaction Example

    glm Newbie

      Hi,

      I am using XDoclets to build the Transaction Example program and I am getting the following error when deploying on JBoss 3.2.5:

      11:14:28,421 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.5/server/default/deploy/ejb-test.jar
      org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean bank/Transaction: The ejb-name for a CMP2.x Entity must be a valid Java Identifier
      at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:252)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:141)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:462)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)


      My ejb-jar.xml contains the following snippit for the Entity "bank/Transaction" :

       <entity>
       <description><![CDATA[The Entity bean represents a bank transaction]]></description>
       <display-name>Bank Transaction Entity</display-name>
      
       <ejb-name>bank/Transaction</ejb-name>
      
       <home>transaction.interfaces.TransactionHome</home>
       <remote>transaction.interfaces.Transaction</remote>
      
       <ejb-class>transaction.entity.TransactionCMP</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>transaction.interfaces.TransactionPK</prim-key-class>
       <reentrant>False</reentrant>
       <cmp-version>2.x</cmp-version>
       <abstract-schema-name>Transaction</abstract-schema-name>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>id</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>acountId</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>type</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>amount</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>date</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>description</field-name>
       </cmp-field>
      
       <query>
       <query-method>
       <method-name>findAll</method-name>
       <method-params>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Transaction AS o]]></ejb-ql>
       </query>
       <query>
       <query-method>
       <method-name>findByAccount</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Transaction AS o WHERE o.acountId = ?1]]></ejb-ql>
       </query>
       <!-- Write a file named ejb-finders-TransactionBean.xml if you want to define extra finders. -->
       </entity>
      


      Can anyone tell me what the problem is with the ejb-name for this Entity Bean?

      Thanks,

      Gary