5 Replies Latest reply on Aug 5, 2002 9:56 PM by fgendron

    Jboss3.0Template, cannot resolve symbol  class TestBMPEntity

    websel

      Hi,
      I've worked with ant before, but never with xdoclet. I would like to use the Jboss template as a new starting point for deploymend etc.

      Here is what i did:
      Downloaded Jboss3.0.1RC1, unpacked in /usr/java/jboss
      set enviroment JBOSS_HOME to /usr/java/jboss
      copied my old ear from 2.4 to /usr/java/jboss/server/default/deploy
      It works :-) great.

      Now the template example,
      Unpacked it:
      cd cmp2
      ant
      It compiles and it deploys without a problem :-)

      Now the template and the transaction just give an error during compiling on the same spot. Just when all the sources are loaded by xdoclet it can't find the first class (see dump at the end.)
      I unziped the xdoclet-1.1.2.zip under /usr/java/xdoclet
      /usr/java/xdoclet/lib/xdoclet.jar is there,

      Set the path in the .ant.properties
      jboss.home=/usr/java/jboss
      xdoclet.home=/usr/java/xdoclet
      servlet-lib.path=/usr/java/jboss/server/default/lib/javax.servlet.jar

      Leave the rest unchanged and type ant

      init:
      [echo] build.compiler = ${build.compiler}
      [echo] user.home = /home/wessel
      [echo] java.home = /usr/java/j2sdk1.4.0/jre
      [echo] ant.home = /usr
      [echo] jboss.home = /usr/java/jboss
      [echo] xdoclet.home = /usr/java/xdoclet
      [echo] java.class.path = /usr/share/java/xml-commons-apis.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/s
      hare/java/ant.jar:/usr/share/java/ant-optional.jar:/usr/java/j2sdk1.4.0/lib/tools.jar

      xdoclet-generate:
      [ejbdoclet] Generating Javadoc
      [ejbdoclet] Javadoc execution
      [ejbdoclet] Loading source file /tmp/test/template/src/main/ejb/test/entity/TestBMPEntityBean.java...
      [ejbdoclet] Loading source file /tmp/test/template/src/main/ejb/test/entity/TestEntityBean.java...
      [ejbdoclet] Loading source file /tmp/test/template/src/main/ejb/test/message/TestMessageDrivenBean.java...
      [ejbdoclet] Loading source file /tmp/test/template/src/main/ejb/test/session/SequenceGeneratorBean.java...
      [ejbdoclet] Loading source file /tmp/test/template/src/main/ejb/test/session/TestSessionBean.java...
      [ejbdoclet] Constructing Javadoc information...
      [ejbdoclet] /tmp/test/template/src/main/ejb/test/entity/TestBMPEntityBean.java:10: cannot resolve symbol
      [ejbdoclet] symbol : class TestBMPEntity
      [ejbdoclet] location: package interfaces
      [ejbdoclet] import test.interfaces.TestBMPEntity;
      [ejbdoclet] ^

      Why ? The same thing occurs when i try the transaction example.

      The following RPM version I use (from jakarta.apache.org):
      ant-1.5-4jpp
      xerces-j2-2.0.2-3jpp
      xml-commons-apis-1.0-0.b2.1jpp
      xdoclet-1.1.2.zip (no rpm used for this one)
      j2sdk1.4.0
      jboss-3.0.1RC1_tomcat-4.0.4
      JAVA_HOME=/usr/java/j2sdk1.4.0
      JBOSS_HOME=/usr/java/jboss
      JDK_HOME=/usr/java/j2sdk1.4.0


      Many thanks in advanced!

      Wessel de Roode

        • 1. Re: Jboss3.0Template, cannot resolve symbol  class TestBMPEn
          websel

          Got it working :-)
          I make a new posting where i'll post the fix.
          The main problem was that the .rpm package I used place the .jar files in a differend place than where the ant.home directory points to.

          First I did a full install of ant:
          [kb] [file]
          692 ant-1.5-5jpp.noarch.rpm
          500 ant-optional-1.5-5jpp.noarch.rpm
          264 antlr-2.7.1-8jpp.noarch.rpm
          440 bcel-5.0-4jpp.noarch.rpm
          84 bsf-2.2-5jpp.noarch.rpm
          16 build.xml
          8 jaf-1.0.1-10jpp.nosrc.rpm
          8 javamail-1.2-9jpp.nosrc.rpm
          172 jdepend-2.2-1jpp.noarch.rpm
          164 junit-3.7-6jpp.noarch.rpm
          328 log4j-1.2.5-1jpp.noarch.rpm
          104 netcomponents-1.3.8-2jpp.noarch.rpm
          580 oldxerces-j-1.3.1-5jpp.noarch.rpm
          76 oro-2.0.6-1jpp.noarch.rpm
          28 regexp-1.2-11jpp.noarch.rpm
          364 rhino-1.5-0.R3.1jpp.noarch.rpm
          260 stylebook-1.0-6jpp.noarch.rpm
          48 stylebook1.0b3-1.0-6jpp.noarch.rpm
          404 xalan-j1-1.2.2-5jpp.noarch.rpm
          860 xalan-j2-2.3.1-2jpp.noarch.rpm
          484 xerces-j1-1.4.4-11jpp.noarch.rpm
          712 xerces-j2-2.0.2-4jpp.noarch.rpm
          16 xml-commons-1.0-0.b2.1jpp.noarch.rpm
          88 xml-commons-apis-1.0-0.b2.1jpp.noarch.rpm
          Install them with rpm -i *
          You'll get two dependencie problems. one on jaf and one on javamail. Use the --nodeps flag to overide the error as we use newer versions of these two packages.
          This is probaly to much libraries, but i needed bcel and I wanted the job in rpm's done.
          Fetch the files from:
          http://jpackage.sourceforge.net/rpm2html/JPackage.html
          Use google to find the jaf & javamail rpm's

          Next thing to do is adjust the path's in de build.xml
          cut and past the patch at the end of this email and save it to the file build.patch and patch the build.xml script from the template directory with:

          patch -l <build.patch
          type ant, and the template should compile with warnings, but deploys.


          ----- start patch is below this line ---------------
          --- build.xml Mon Jul 29 02:37:09 2002
          +++ build.xml Mon Jul 29 01:57:05 2002
          @@ -99,12 +99,14 @@



          -
          +
          <!-- AS Maybe necessary for Ant 1.5 and XDoclet 1.3
          -
          -
          -
          -
          +
          +
          +-->
          +
          +
          +<!--
          -->


          @@ -262,7 +264,7 @@

          <war
          warfile="${build.deploy.dir}/web-client.war"
          - webxml="${src.etc.dir}/WEB-INF/web-client.xml"
          + webxml="${src.etc.dir}/web-inf/web-client.xml"
          >


          ----- end patch is below this line ---------------

          • 2. Re: Jboss3.0Template, cannot resolve symbol  class TestBMPEn
            alwyn

            Hi,

            I'm having the same problem, but have not tried your fix yet.
            What bothers me is that there are import statements that
            reference classes that should be in the template example
            src tree but do not exist?

            The following is but two of the errors...

            [ejbdoclet] Constructing Javadoc information...
            [ejbdoclet] /home/alwyn/software/playground/jboss/firstone/src/main/ejb/test/entity/TestBMPEntityBean.java:10: cannot resolve symbol
            [ejbdoclet] symbol : class TestBMPEntity
            [ejbdoclet] location: package interfaces
            [ejbdoclet] import test.interfaces.TestBMPEntity;
            [ejbdoclet] ^
            [ejbdoclet] /home/alwyn/software/playground/jboss/firstone/src/main/ejb/test/entity/TestBMPEntityBean.java:11: cannot resolve symbol
            [ejbdoclet] symbol : class TestBMPEntityData
            [ejbdoclet] location: package interfaces
            [ejbdoclet] import test.interfaces.TestBMPEntityData;

            Can anyone shed any light on this?

            • 3. Re: Jboss3.0Template, cannot resolve symbol  class TestBMPEn
              websel

              Those errors are ejbdoclet errors. In most postings i've seen you can ignore them as the are not part of the true compiling process. It would be a problem if javac would give those errors.
              As far as i can see you can ignore those. (i'm not to happy about that too) I think a fix would be to include your clathpath in the ejbdoclet run. This could take a way these errers. I haven't tried it yet as it is working.

              Wessel de Roode

              • 4. Re: Jboss3.0Template, cannot resolve symbol  class TestBMPEn
                websel

                Yes it works.
                Just add your classpath to the ejbdoclet and the webdoclet path and there will be no more warnings.

                Wessel

                • 5. Re: Jboss3.0Template, cannot resolve symbol  class TestBMPEn
                  fgendron

                  Hi,

                  I am also getting this unresolved symbol error. I dont see how adding the java classpath (which is empty) to the ejbdoclet path will fix this issue. What directories are present in your java classpath?