1 2 Previous Next 20 Replies Latest reply on Sep 11, 2003 3:19 PM by rshahinian

    Problem building template example

    mimi Newbie

      Hi,

      I am trying to build the template example and I get the following errors.

      init:
      [echo] build.compiler = ${build.compiler}
      [echo] user.home = D:\Documents and Settings\Administrator
      [echo] java.home = c:\JDK1.4\jre
      [echo] ant.home = c:\jakarta-ant-1.4.1
      [echo] jboss.home = D:/jboss-3.0.0/jboss-3.0.0
      [echo] xdoclet.home = C:/sandbox/java/xdoclet
      [echo] java.class.path = c:\jakarta-ant-1.4.1\lib\jaxp.jar;c:\jakarta-ant-1
      .4.1\lib\jakarta-ant-1.4.1-optional.jar;c:\jakarta-ant-1.4.1\lib\crimson.jar;c:\
      jakarta-ant-1.4.1\lib\ant.jar;c:\JDK1.4\lib\tools.jar
      [echo]

      xdoclet-generate:
      [echo] In xdoclet-generate
      [ejbdoclet] Generating Javadoc
      [ejbdoclet] Javadoc execution
      [ejbdoclet] Loading source file C:\sandbox\java\JBoss.3.0TemplateAndExamples\tem
      plate\src\main\ejb\test\session\SequenceGeneratorBean.java...
      [ejbdoclet] Loading source file C:\sandbox\java\JBoss.3.0TemplateAndExamples\tem
      plate\src\main\ejb\test\session\TestSessionBean.java...
      [ejbdoclet] Loading source file C:\sandbox\java\JBoss.3.0TemplateAndExamples\tem
      plate\src\main\ejb\test\message\TestMessageDrivenBean.java...
      [ejbdoclet] Loading source file C:\sandbox\java\JBoss.3.0TemplateAndExamples\tem
      plate\src\main\ejb\test\entity\TestBMPEntityBean.java...
      [ejbdoclet] Loading source file C:\sandbox\java\JBoss.3.0TemplateAndExamples\tem
      plate\src\main\ejb\test\entity\TestEntityBean.java...
      [ejbdoclet] Constructing Javadoc information...
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\session\TestSessionBean.java:22: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntity
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntity;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\session\TestSessionBean.java:23: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityData;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\session\TestSessionBean.java:24: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityHome;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:10: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntity
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntity;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:11: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntityData;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:12: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntityHome;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:13: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntityPK;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:16: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGenerator
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGenerator;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:17: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGeneratorHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGeneratorHome;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:85: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public void setValueObject( TestBMPEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:103: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityData getValueObject() {
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:306: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbCreate( TestBMPEntityData pTestEntity )

      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:306: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbCreate( TestBMPEntityData pTestEntity )

      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:330: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityData
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public void ejbPostCreate( TestBMPEntityData pTestEntity )
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:433: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbFindByPrimaryKey( TestBMPEntityPK pKey
      )
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestBMPEntityBean.java:433: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntityPK
      [ejbdoclet] location: class test.entity.TestBMPEntityBean
      [ejbdoclet] public TestBMPEntityPK ejbFindByPrimaryKey( TestBMPEntityPK pKey
      )
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestEntityBean.java:10: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntity
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntity;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestEntityBean.java:11: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityData;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestEntityBean.java:12: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityHome;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestEntityBean.java:13: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityPK
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestEntityPK;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestEntityBean.java:16: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGenerator
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGenerator;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestEntityBean.java:17: cannot resolve symbol
      [ejbdoclet] symbol : class SequenceGeneratorHome
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.SequenceGeneratorHome;
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\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] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\entity\TestEntityBean.java:158: cannot resolve symbol
      [ejbdoclet] symbol : class TestEntityData
      [ejbdoclet] location: class test.entity.TestEntityBean
      [ejbdoclet] public TestEntityData getValueObject() {
      [ejbdoclet] ^
      [ejbdoclet] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\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] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\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] C:\sandbox\java\JBoss.3.0TemplateAndExamples\template\src\main\ejb\t
      est\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] Running
      [ejbdoclet] (TemplateEngine.invokeMethod 776 ) Invoking method failed: i
      mportedList, line=6 of template file: jar:file:C:\sandbox\java\xdoclet\lib\xdocl
      et.jar!/xdoclet/ejb/home.j
      [ejbdoclet] java.lang.reflect.InvocationTargetException
      [ejbdoclet] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ejbdoclet] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:42)
      [ejbdoclet] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:28)
      [ejbdoclet] at java.lang.reflect.Method.invoke(Method.java:313)
      [ejbdoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.j
      ava:768)
      [ejbdoclet] at xdoclet.template.TemplateEngine.invokeContentMethod(TemplateE
      ngine.java:890)
      [ejbdoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java
      :457)
      [ejbdoclet] at xdoclet.template.TemplateParser.generate(TemplateParser.java:
      109)
      [ejbdoclet] at xdoclet.template.TemplateParser.start(TemplateParser.java:72)

      [ejbdoclet] at xdoclet.TemplateSubTask.isGenerationNeeded(TemplateSubTask.ja
      va:800)
      [ejbdoclet] at xdoclet.TemplateSubTask.isGenerationNeeded(TemplateSubTask.ja
      va:703)
      [ejbdoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java
      :491)
      [ejbdoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:388
      )
      [ejbdoclet] at xdoclet.TemplateSubTask.execute(TemplateSubTask.java:326)
      [ejbdoclet] at xdoclet.DocletTask$DocletMain.start(DocletTask.java:549)
      [ejbdoclet] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ejbdoclet] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:42)
      [ejbdoclet] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:28)
      [ejbdoclet] at java.lang.reflect.Method.invoke(Method.java:313)
      [ejbdoclet] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java
      :196)
      [ejbdoclet] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:
      95)
      [ejbdoclet] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:289)
      [ejbdoclet] at com.sun.tools.javadoc.Start.begin(Start.java:114)
      [ejbdoclet] at com.sun.tools.javadoc.Main.execute(Main.java:44)
      [ejbdoclet] at com.sun.tools.javadoc.Main.main(Main.java:34)
      [ejbdoclet] Caused by: java.lang.ClassCastException: com.sun.tools.javac.v8.code
      .Type$ErrorType
      [ejbdoclet] at com.sun.tools.javadoc.ClassDocImpl.(ClassDocImpl.java:1
      11)
      [ejbdoclet] javadoc: In doclet class xdoclet.DocletTask$DocletMain, method star
      t has thrown an exception java.lang.reflect.InvocationTargetException
      [ejbdoclet] at com.sun.tools.javadoc.ClassDocImpl.(ClassDocImpl.java:1
      34)
      [ejbdoclet] at com.sun.tools.javadoc.DocEnv.getClassDoc(DocEnv.java:388)
      [ejbdoclet] at com.sun.tools.javadoc.ClassDocImpl.importedClasses(ClassDocIm
      pl.java:746)
      [ejbdoclet] at xdoclet.tags.ClassTagsHandler.importedList(ClassTagsHandler.j
      ava:765)
      [ejbdoclet] ... 25 more
      [ejbdoclet] Running XDoclet failed.
      [ejbdoclet] <<xdoclet.template.TemplateException: Invoking method failed: import
      edList, line=6 of template file: jar:file:C:\sandbox\java\xdoclet\lib\xdoclet.ja
      r!/xdoclet/ejb/home.j, exception: null>>
      [ejbdoclet] 1 error
      [ejbdoclet] 27 warnings

      BUILD FAILED

      c:\sandbox\java\JBoss.3.0TemplateAndExamples\template\build.xml:156: Javadoc ret
      urned 1

      Total time: 12 seconds

        • 1. Re: Problem building template example
          mimi Newbie

          I am using Ant 1.4.1, xdoclet 1.1.2, JDK1.4.0-beta2 on a windows 2000 box.

          I have tidied up some of the directories. see below

          $ $ANT_HOME/bin/ant
          Buildfile: build.xml

          check-environment:
          [echo] In check-environment

          check-jboss:
          [echo] D:/jboss-3.0.0/bin/run.jar
          [echo] basedir C:\sandbox\java\JBoss.3.0TemplateAndExamples\template

          wrong-jboss:

          check-xdoclet:

          wrong-xdoclet:

          init:
          [echo] build.compiler = ${build.compiler}
          [echo] user.home = D:\Documents and Settings\Administrator
          [echo] java.home = c:\JDK1.4\jre
          [echo] ant.home = c:\jakarta-ant-1.4.1
          [echo] jboss.home = D:/jboss-3.0.0
          [echo] xdoclet.home = C:/xdoclet-1.1.2
          [echo] java.class.path = c:\jakarta-ant-1.4.1\lib\jaxp.jar;c:\jakarta-ant-1
          .4.1\lib\jakarta-ant-1.4.1-optional.jar;c:\jakarta-ant-1.4.1\lib\crimson.jar;c:\
          jakarta-ant-1.4.1\lib\ant.jar;c:\JDK1.4\lib\tools.jar
          [echo]


          My ant.properties file is

          # ATTENTION: this is an example file how to overwrite settings in this project
          # Please rename it to ".ant.properties" and adjust the settings to your needs

          # Set the path to the runtime JBoss directory containing the JBoss application s
          erver
          # ATTENTION: the one containing directories like "bin", "client", "server" etc.

          jboss.home=D:/jboss-3.0.0

          # Set the configuration name that must have a corresponding directory under
          # <jboss.home>/server

          jboss.configuration=default

          # Set the path to the root directory of the XDoclet distribution (see
          # http://www.sf.net/projects/xdoclet)

          xdoclet.home=C:/xdoclet-1.1.2

          # Set this to "true" when you want to force the rebuild of the XDoclet generated
          # files (see XDoclet's attribute "force")

          xdoclet.force=false

          # Set the EJB version you want to use (1.1 or 2.0, see XDoclet's att
          ribute "ejbspec")

          ejb.version=2.0

          # Set the JBoss version you want to use (2.4, 3.0 etc., see XDoclet's at
          tribute "version")

          jboss.version=3.0

          # Set the DB type mapping (Hypersonic SQL, PostgreSQL etc., see XDoclet's attribute "typemapping")

          type.mapping=MySQL

          # Set the DataSource name your are going to use (java:/DefaultDS etc., see XDocl
          et's attribute "datasource")

          datasource.name=java:/DefaultDS

          # Uncomment this and adjust the path to point directly to JAR file containing th
          e servlet classes
          # Attention: By uncommenting this line you start the creation of a WAR file
          # servlet-lib.path=C:/jboss-all/build/output/jboss-3.1.0alpha/lib/javax.servlet.
          jar


          Can some please help !!!!

          Thanks in advance

          • 2. Re: Problem building template example
            Andreas Schaefer Apprentice

            Hi

            I have no idea what is your problem but try to empty your classpath before starting the build process.

            Hope it helps - Andy

            • 3. Re: Problem building template example
              mimi Newbie

              I have tried that and it doesn't.

              Should I remove all versions of JBOSS, ANT , XDOCLET and restore the latest ones again?

              Jag

              • 4. Re: Problem building template example
                mimi Newbie

                Schaefera,

                When I run ant in verbose mode it seems to be ignoring a lot of property settings e.g.

                [property] Override ignored for datasource.name^M
                [property] Override ignored for jboss.configuration^M
                [property] Override ignored for jboss.home^M
                [property] Override ignored for xdoclet.home^M
                [property] Override ignored for ejb.version^M
                [property] Override ignored for type.mapping^M
                [property] Override ignored for jboss.version^M
                [property] Override ignored for Name^M
                [property] Override ignored for version^M
                [property] Override ignored for jboss.lib^M
                [property] Override ignored for jboss.deploy^M
                [property] Override ignored for src.dir^M
                [property] Override ignored for src.main.dir^M
                [property] Override ignored for src.client.dir^M
                [property] Override ignored for src.ejb.dir^M
                [property] Override ignored for src.servlet.dir^M
                [property] Override ignored for src.resources.dir^M
                [property] Override ignored for src.web.dir^M
                [property] Override ignored for src.etc.dir^M
                [property] Override ignored for lib.dir^M
                [property] Override ignored for build.dir^M
                [property] Override ignored for build.tmp.dir^M
                [property] Override ignored for build.deploy.dir^M
                [property] Override ignored for build.generate.dir^M
                [property] Override ignored for build.classes.dir^M
                [property] Override ignored for build.war.dir^M
                [property] Override ignored for build.client.dir^M
                [property] Override ignored for build.bin.dir^M
                [property] Override ignored for build.javadocs.dir^M

                is this normal?

                Jag

                • 5. Re: Problem building template example
                  mimi Newbie

                  I was using a beta version of jdk1.4
                  I now have jdk1.4.1 and all works well.

                  Jag

                  • 6. Re: Problem building template example
                    Meir Kalter Newbie

                    I have the same problem.
                    And this with the current jdk
                    j2se 1.4.1
                    and the currently 1.4 j2ee.
                    and , i set the JAVE_HOME, JAVE_J2EE and ANT_HOME.

                    • 7. Re: Problem building template example
                      Hans Bausewein Newbie

                      I've found some errors in the example code, but I'm not sure
                      it will fix your problems.

                      These are the changes, I've made to TestEntityBean.java and now it deploys
                      without warnings or exceptions.

                      1. @ejb:bean name="test/TestEntity"
                      replaced by
                      @ejb:bean name="TestEntity"

                      This to avoid the deployment message that
                      "The ejb-name for a CMP 2.x Entity must be a valid Java Identifier."

                      I modified the ejb-name and ejb-ref tags for SequenceGenerator also.

                      * In 'TestEntityBean.java': @ejb:ejb-ref ejb-name="SequenceGenerator"

                      * In 'TestSessionBean.java' @ejb:ejb-ref ejb-name="TestEntity"
                      ref-name="mytest/TestEntity"

                      * On 'SequenceGeneratorBean.java': @ejb:bean name="SequenceGenerator"


                      2. Removed '@jboss:finder-query'

                      3. Added the queries to '@jboss:finder' as:
                      - findByName:
                      query="SELECT OBJECT(t) FROM TestEntity t WHERE t.firstName = ?1
                      AND t.lastName = ?2"

                      - findAnotherByName:
                      query="SELECT OBJECT(t) FROM TestEntity t WHERE t.id ?1 AND
                      t.firstName = ?2 AND t.lastName = ?3"

                      changes:
                      * it needs the full query including SELECT ... WHERE
                      * != replaced by
                      * {n} replaced by ?n (using n=1..3 instead of n=0..2 )
                      * name of the db-field replaced by name of the property
                      (which is the only thing ejb-jar.xml knows about!)



                      I used xdoclet 1.1.2, which is the latest stable version.
                      JDK = 1.4.1 _01

                      hope this helps.

                      Hans

                      • 8. Re: Problem building template example
                        Hans Bausewein Newbie

                        meirka5, I think you should try to use JBoss instead of j2EE 1.4.You also don't need to set JAVE_J2EE when using JBoss.




                        • 9. Re: Problem building template example
                          Hans Bausewein Newbie

                          Minor problem with my 'fix'. It deployed very well, but it did not run :-(

                          I should have updated (= remove 'test/' from) the jndi-name in TestEntityBean.java:
                          @ejb:bean name="TestEntity"
                          * display-name="TestEntity working on projects to support clients"
                          * type="CMP"
                          * jndi-name="ejb/TestEntity"


                          The other bean/jndi names should better be kept as in the original template. Except for the CMP entity bean it is not necessary to use valid java names.

                          So in 'SequenceGeneratorBean.java' use:
                          @ejb:bean name="test/SequenceGenerator"

                          I'll (again) try to attach the xdoclet header of TestEntityBean.java as a file. If that does not work, I'll post the header separately.

                          • 10. Re: Problem building template example
                            Mike Currie Newbie

                            I must say, I've tried the mod's in the thread and several others and Still don't have the template code working. I got it to compile and deploy but, doesn't run because the look up's fail.

                            Has anyone gotten the template code to build, deploy and run error free?


                            Are all Jboss builds sample code this poorly written? With the amount of time I've spent trying to fix this I would have been much better off without it.

                            • 11. Re: Problem building template example
                              sunsphoto Newbie

                              Dear all,

                              I also face similar problems!

                              Does any one has a clean versionh of the template and I found it is not found in jboss.org.

                              Too many problem and removed?

                              Thank!

                              • 12. Re: Problem building template example
                                jcurt Newbie

                                The attached diff file shows the changes needed to get the template to work. I use the term "work" loosely, since you can only invoke the web or java client once. The application seems to be designed this way. After initial creation of the EJB, subsequent attempts cause TestEntityBean to throw an exception which gets rethrown by TestSessionBean:
                                java.rmi.ServerException:
                                EJBException:; nested exception is:
                                javax.ejb.EJBException:
                                Invalid Value found: user.already.exists

                                You can restart the server, then it will work again... once. Again, the template code appears to be designed this way, but I didnt dig deep enough to find out for sure.

                                After getting it to work, I diff'd the entire template directory and put all the diffs in the attached file.

                                Here are the s/w versions I am running:
                                JBoss 3.2.1 w/Tomcat
                                XDoclet 1.1.2
                                Ant 1.5.3

                                Good luck!

                                • 13. Re: Problem building template example
                                  sunsphoto Newbie

                                  Dear,

                                  I follow the instruction and found the following errors!

                                  xdoclet-generate:
                                  [ejbdoclet] Generating Javadoc
                                  [ejbdoclet] Javadoc execution
                                  [ejbdoclet] Loading source file I:\sample\template\src\main\ejb\test\entity\Test
                                  BMPEntityBean.java...
                                  [ejbdoclet] Loading source file I:\sample\template\src\main\ejb\test\entity\Test
                                  EntityBean.java...
                                  [ejbdoclet] Loading source file I:\sample\template\src\main\ejb\test\message\Tes
                                  tMessageDrivenBean.java...
                                  [ejbdoclet] Loading source file I:\sample\template\src\main\ejb\test\session\Seq
                                  uenceGeneratorBean.java...
                                  [ejbdoclet] Loading source file I:\sample\template\src\main\ejb\test\session\Tes
                                  tSessionBean.java...
                                  [ejbdoclet] Constructing Javadoc information...
                                  [ejbdoclet] I:\sample\template\src\main\ejb\test\entity\TestBMPEntityBean.java:1
                                  1: cannot resolve symbol
                                  [ejbdoclet] symbol : class TestBMPEntity
                                  [ejbdoclet] location: package interfaces
                                  [ejbdoclet] import test.interfaces.TestBMPEntity;
                                  [ejbdoclet] ^

                                  • 14. Re: Problem building template example
                                    Roger Ackroyd Newbie

                                    That worked as you describe (3.2.2RC1) but merely returns the next id as 2 (both web and java client). Does'nt appear to run the rest of the tests.

                                    This GettingStarted document is so frustratingly bad, I think I shall abandon it, rename it to GettingNowhere and suggest that anyone trying to make it work properly on 3.2.x do the same.
                                    If its purpose is to encourage the purchase of full documentation, then it misses the the mark with me.
                                    If the Jboss group considers documentation sales as a core source of revenue and the first documents potential customers come across (aHem) is GettingStarted, then I fear that many potential converts to Jboss and open-sourceing may StopAndGoNoFurther.
                                    Shall I go buy the full Jboss documentation?. I might have bought it over a week ago, if it had not been for GettingStarted. Now, if I purchase it is with diminished confidence that I shall not find more of the same and never ever get started at all. Please Jboss management, get it sorted or remove it from the site altogether. And that's for your own good.

                                    1 2 Previous Next