2 Replies Latest reply on Jul 8, 2003 2:54 PM by rp0428

    How can I use JBoss.3.0TemplateAndExamples?

    xuyongshuo

      I am a new user of JBOSS, My platform is Win2000. I download the jboss-3.2.1 and JBoss.3.0TemplateAndExamples.

      On command-line I input run -c default.
      and in template directory I input ant -propertyfile .ant.properties.example main,
      but there is some error like this:

      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:10: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntity
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntity;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:11: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntityData;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:12: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntityHome;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:13: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntityPK;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:16: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGenerator
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGenerator;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:17: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGeneratorHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGeneratorHome;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:85: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public void setValueObject( TestBMPEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:103: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityData getValueObject() {
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:306: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbCreate( TestBMPEntityData pTestEntity )

      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:306: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbCreate( TestBMPEntityData pTestEntity )

      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:330: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public void ejbPostCreate( TestBMPEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:433: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbFindByPrimaryKey( TestBMPEntityPK pKey
      )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestBMPEntityBe
      an.java:433: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbFindByPrimaryKey( TestBMPEntityPK pKey
      )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:10: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntity
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntity;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:11: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityData;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:12: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityHome;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:13: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityPK
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityPK;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:16: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGenerator
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGenerator;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:17: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGeneratorHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGeneratorHome;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:95: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: class test.entity.TestEntityBean
      [ejbdoclet] public void setValueObject( TestEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:158: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: class test.entity.TestEntityBean
      [ejbdoclet] public TestEntityData getValueObject() {
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:462: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: class test.entity.TestEntityBean
      [ejbdoclet] public TestEntityPK ejbCreate( TestEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:462: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityPK
      [ejbdoclet] location: class test.entity.TestEntityBean
      [ejbdoclet] public TestEntityPK ejbCreate( TestEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\entity\TestEntityBean.
      java:485: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: class test.entity.TestEntityBean
      [ejbdoclet] public void ejbPostCreate( TestEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\session\TestSessionBea
      n.java:22: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntity
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntity;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\session\TestSessionBea
      n.java:23: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityData;
      [ejbdoclet] ^
      [ejbdoclet] F:\jboss\jbossSamp\template\src\main\ejb\test\session\TestSessionBea
      n.java:24: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityHome;
      [ejbdoclet] ^
      [ejbdoclet] Running
      [ejbdoclet] Generating Home interface for 'test.entity.TestBMPEntityBean'.
      [ejbdoclet] Generating Home interface for 'test.entity.TestEntityBean'.
      [ejbdoclet] Generating Home interface for 'test.session.SequenceGeneratorBean'
      .


      and in the server, the error like this:

      14:07:40,140 ERROR [MainDeployer] could not create deployment: file:/F:/jboss/jb
      oss/server/default/deploy/ejb-test.jar
      org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean t
      est/TestEntity: The ejb-name for a CMP2.x Entity must be a valid Java Identifier

      at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMet
      aData.java:252)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:141)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:433)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:190)
      14:07:40,140 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
      .scanner.URLDeploymentScanner$DeployedURL@f85db714{ url=file:/F:/jboss/jboss/ser
      ver/default/deploy/ejb-test.jar, deployedLastModified=0 }
      org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean t
      est/TestEntity: The ejb-name for a CMP2.x Entity must be a valid Java Identifier

      at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMet
      aData.java:252)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:141)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:433)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.



      I think there are not some class in the src\main\ejb\test\interfaces. How can I get these class.

        • 1. Re: How can I use JBoss.3.0TemplateAndExamples?
          rp0428

          Here is the same reply I posted to the same question by three others:

          The zip file is missing several files. Among the missing files are:

          /test/interfaces/TestEntity.java
          /test/interfaces/TestEntityData.java
          /test/interfaces/TestEntityHome.java

          and the one you mention:

          /test/interfaces/TestBMPEntity.java

          These files do not exist in the 'JBoss.3.0TemplateAndExamples.zip' file available at 'http://sourceforge.net/project/showfiles.php?group_id=22866'.

          Until someone makes these (and other files missing from the .zip) files available you won't be able to build this example.

          • 2. Re: How can I use JBoss.3.0TemplateAndExamples?
            rp0428

            Boy did I have it wrong about the missing classes!

            The glass of wine with the 'crow' I had to eat made it a little more palatable.

            'mainster' was correct. The missing classes should be generated by the 'xdoclet-generate' task in the template's build.xml file.

            If you can't execute this task cleanly the rest of the project won't work either. (Note - you do not need JBoss running to execute this task).

            I was finally able to resolve my problem by running the tasks in the build.xml file one at a time. I discovered that I had the wrong path and classpath set up which prevented the 'xdoclet-generate' task from running properly.

            Once the generate task ran the rest of the project worked ok in my environment.

            You can alternate between the 'xdoclet-generate' and the 'clean' tasks until you resolve the environment issues.