3 Replies Latest reply on Aug 25, 2006 2:48 AM by wew

    jboss4guide v5 example does not compile

    wenjie_tong

      I have downloaded jboss AS 4.04GA and jboss4guide example code. I tried to compile the example code, but allways get error as:

      E:\JBOSSD~1\JBOSS4~1\examples>ant
      Buildfile: build.xml

      validate:

      fail_if_not_valid:

      init:
      [echo] Using jboss.dist=D:/jboss-4.0.4.GA

      compile:
      [javac] Compiling 139 source files to E:\JBOSSD~1\JBOSS4~1\examples\output\classes
      [javac] E:\JBOSSD~1\JBOSS4~1\examples\src\main\org\jboss\chap8\ex3a\service\DistributedCacheService.java:20: package org.jboss.ha.framework.server.util does
      exist
      [javac] import org.jboss.ha.framework.server.util.DistributedTimedCachePolicy;
      [javac] ^
      [javac] E:\JBOSSD~1\JBOSS4~1\examples\src\main\org\jboss\chap8\ex3a\service\DistributedCacheService.java:37: cannot find symbol
      [javac] symbol : class DistributedTimedCachePolicy
      [javac] location: class org.jboss.chap8.ex3a.service.DistributedCacheService
      [javac] private DistributedTimedCachePolicy cache;
      [javac] ^
      [javac] E:\JBOSSD~1\JBOSS4~1\examples\src\main\org\jboss\chap8\ex3a\service\DistributedCacheService.java:47: cannot find symbol
      [javac] symbol : class DistributedTimedCachePolicy
      [javac] location: class org.jboss.chap8.ex3a.service.DistributedCacheService
      [javac] cache = new DistributedTimedCachePolicy(jndiName, partitionName, cacheTimeout);
      [javac] ^
      [javac] Note: Some input files use unchecked or unsafe operations.
      [javac] Note: Recompile with -Xlint:unchecked for details.
      [javac] 3 errors

      BUILD FAILED
      E:\JBOSSD~1\JBOSS4~1\examples\build.xml:85: Compile failed; see the compiler error output for details.

      The only thing I did is change is jboss.dist



      I have no idea where class DistributedTimedCachePolicy is located .

      Please give me some clue,

        • 1. Re: jboss4guide v5 example does not compile
          wew

          I get exact same problem.

          Using Sun JDS-R3, java 1.5

          Have tried all the jboss4guide.zip downloads, get same compile error each time.

          Using jboss4.0.3SP1, have installed all, and tried EJB3


          What am I doing wrong!!

          Someone must have an answer.
          What jar file am I missing??

          • 2. Re: jboss4guide v5 example does not compile
            wew

            SOLVED

            Some installs of jboss only create one directory in jboss/server/default
            some installs have jboss/server/default and jboss/server/all

            you can edit the examples/build.xml file and change the line that shows this:

            <pathelement location="${jboss.dist}/server/all/lib/jbossha.jar" />

            to this:
            <pathelement location="${jboss.dist}/server/default/lib/jbossha.jar" />


            Cheers

            • 3. Re: jboss4guide v5 example does not compile
              wew


              change
              pathelement location="${jboss.dist}/server/all/lib/jbossha.jar"

              to

              pathelement location="${jboss.dist}/server/default/lib/jbossha.jar"