hillel (5) [Avatar] Offline
#1
Hi,

When I compile chapter 3 I get :
compile:
[javac] Compiling 27 source files to /home/hillel/xdoclet/wallsXdocletBook/chapter3/build
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter3/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java: In class `com.xdocletbook.blog.ejb.TopicCMP':
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter3/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java: In method `com.xdocletbook.blog.ejb.TopicCMP.addEntries(com.xdocletbook.blog.value.EntryValue)':
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter3/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java:58: error: No method named `makeDirty' in scope.
[javac] makeDirty();
[javac] ^
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter3/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java: In method `com.xdocletbook.blog.ejb.TopicCMP.removeEntries(com.xdocletbook.blog.value.EntryValue)':
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter3/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java:79: error: No method named `makeDirty' in scope.
[javac] makeDirty();
[javac] ^
[javac] 2 errors

BUILD FAILED
file:/home/hillel/xdoclet/wallsXdocletBook/chapter3/build.xml:60: Compile failed; see the compiler error output for details.


Chapter 4:

compile:
[javac] Compiling 36 source files to /home/hillel/xdoclet/wallsXdocletBook/chapter4/build
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter4/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java: In class `com.xdocletbook.blog.ejb.TopicCMP':
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter4/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java: In method `com.xdocletbook.blog.ejb.TopicCMP.addEntries(com.xdocletbook.blog.value.EntryValue)':
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter4/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java:58: error: No method named `makeDirty' in scope.
[javac] makeDirty();
[javac] ^
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter4/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java: In method `com.xdocletbook.blog.ejb.TopicCMP.removeEntries(com.xdocletbook.blog.value.EntryValue)':
[javac] /home/hillel/xdoclet/wallsXdocletBook/chapter4/gensrc/com/xdocletbook/blog/ejb/TopicCMP.java:79: error: No method named `makeDirty' in scope.
[javac] makeDirty();
[javac] ^
[javac] 2 errors

BUILD FAILED
file:/home/hillel/xdoclet/wallsXdocletBook/chapter4/build.xml:66: Compile failed; see the compiler error output for details.

Whats is makeDirty()?

I'm using:
ant.jar servlet.jar
commons-collections-2.0.jar xdoclet-1.2.2-SNAPSHOT.jar
commons-logging.jar xdoclet-ejb-module-1.2.2-SNAPSHOT.jar
jsf-api.jar xdoclet-web-module-1.2.2-SNAPSHOT.jar
log4j.jar xdoclet-xdoclet-module-1.2.2-SNAPSHOT.jar
xjavadoc-1.0.3.jar

And I've tried
ANT_HOME="/usr/local/apache-ant-1.6.2" and
ANT_HOME="/home/hillel/ant/apache-ant-1.5.3-1"

Any help appreciated.
jerryc (9) [Avatar] Offline
#2
Re: Chapter 3 and 4 does not compile
Hi,

Same thing happened to me. So I replaced xdoclet-ejb-module-1.2.2-SNAPSHOT.jar
with xdoclet-ejb-module-1.2.1.jar and the problem went away. Hope this helps.

Jerry
habuma (279) [Avatar] Offline
#3
Re: Chapter 3 and 4 does not compile
Sounds like jerryc has it figured out. There must be a bug in 1.2.2-SNAPSHOT (that's why it's only a snapshot).
hillel (5) [Avatar] Offline
#4
Re: Chapter 3 and 4 does not compile
Hi, thanks for your help.
I've changed my jars as you said and my jars are now:
ant.jar (from apache-ant-1.6.2)
(all the jars are from the lastest xdoclet snapshot becides the xdoclet-ejb-module-1.2.1.jar, based on your advise)
jsf-api.jar
servlet.jar xdoclet-web-module-1.2.2-SNAPSHOT.jar
commons-collections-2.0.jar
log4j.jar
xdoclet-1.2.2-SNAPSHOT.jar xdoclet-xdoclet-module-1.2.2-SNAPSHOT.jar
commons-logging.jar
xjavadoc-1.0.3.jar
xdoclet-ejb-module-1.2.1.jar

The old error has gone but now I get:

build-ejb-jar:
[mkdir] Created dir: /home/hillel/xdoclet/wallsXdocletBook/chapter4/ejbjars

BUILD FAILED
file:/home/hillel/xdoclet/wallsXdocletBook/chapter4/build-package.xml:23: Could not create task or type of type: ejbjar.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
- You have misspelt 'ejbjar'.
Fix: check your spelling.
- The task needs an external JAR file to execute
and this is not found at the right place in the classpath.
Fix: check the documentation for dependencies.
Fix: declare the task.
- The task is an Ant optional task and optional.jar is absent
Fix: look for optional.jar in ANT_HOME/lib, download if needed
- The task was not built into optional.jar as dependent
libraries were not found at build time.
Fix: look in the JAR to verify, then rebuild with the needed
libraries, or download a release version from apache.org
- The build file was written for a later version of Ant
Fix: upgrade to at least the latest release version of Ant
- The task is not an Ant core or optional task
and needs to be declared using <taskdef>.

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.


Please will you post what jars you are using so I can use them.

Thanks for all your help.