<HTML>
Dear List Admin,

<P>I&nbsp;have today (17th December 2001) downloaded the latest source
for JDom and compiled it on a Solaris (SunOS&nbsp;5.6) server using Java
1.1.8.

<P>As I&nbsp;am not using Java2,&nbsp; I used <B>build11.sh </B>in order
to use the collections.jar file.

<P>I had several problems compiling and have included the changes I&nbsp;made
to the code in&nbsp; order to compile jdom.

<P><U>Commands run:</U>

<P><B>./build11.sh clean</B>
<BR>&nbsp;&nbsp;&nbsp; - ran fine.
<BR><B>./build11.sh compile</B>
<BR>&nbsp;&nbsp;&nbsp; - produced following error output:

<P><FONT SIZE=-1>JDOM Build System</FONT>
<BR><FONT SIZE=-1>-------------------</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>Building with classpath /home/javad/jdkSunOS-1.1.8/lib/tools.jar:./lib/xerces.jar:./lib/ant.jar:./lib/jaxp.jar:/home/javad/jdkSunOS-1.1.8/lib/dev.jar:/home/javad/jdkSunOS-1.1.8/lib/classes.zip:/home/javad/jdkSunOS-1.1.8/lib/rt.jar:./lib/collections.jar</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>Starting Ant...</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>Buildfile: build.xml</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>init:</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp; [echo] ----------- JDOM 1.0beta7
[2001] ------------</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>prepare:</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [mkdir] Created dir: /home/nkornwei/jdom/build</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>prepare-src:</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [mkdir] Created dir: /home/nkornwei/jdom/build/src</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [mkdir] Created dir: /home/nkornwei/jdom/build/classes</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp; [copy] Copying 44 files to /home/nkornwei/jdom/build/src</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>collections:</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>compile:</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] Compiling 44 source files
to /home/nkornwei/jdom/build/classes</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] /home/nkornwei/jdom/build/src/org/jdom/FilterList.java:64:
Class java.util.ConcurrentModificationException not found in import.</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] import java.util.ConcurrentModificationException;</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
^</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] /home/nkornwei/jdom/build/src/org/jdom/ProcessingInstruction.java:60:
Class java.util.ArrayList not found in import.</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] import java.util.ArrayList;</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
^</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] /home/nkornwei/jdom/build/src/org/jdom/FilterList.java:1445:
Class java.util.ConcurrentModificationException not found in type declaration.</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
throw new ConcurrentModificationException();</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
^</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] 3 errors</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>BUILD FAILED</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>/home/nkornwei/jdom/build.xml:152: Compile failed, messages
should have been provided.</FONT>

<P><U>Work around to resolve:</U>&nbsp;added the following lines to <B>build.xml:</B><B></B>

<P>&nbsp;&nbsp;&nbsp;&nbsp; &lt;replace dir="${build.src}" includes="**"
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
token="java.util.ConcurrentModificationException" value="${coll.import}.ConcurrentModificationException"/>
<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;replace dir="${build.src}" includes="**"
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
token="java.util.ArrayList" value="${coll.import}.ArrayList"/><B></B>

<P><U>Ran ./build11.sh compile again:</U>

<P>&nbsp;&nbsp;&nbsp; - produced following error output:
<BR>...
<BR><FONT SIZE=-1>collections:</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>compile:</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] Compiling 44 source files
to /home/nkornwei/jdom/build/classes</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] /home/nkornwei/jdom/build/src/org/jdom/AttributeFilter.java:89:
Blank final variable 'parent' may not have been initialized. It must be
assigned a value in an initializer, or in every constructor.</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; AttributeFilter(Element
parent) {</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; ^</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] /home/nkornwei/jdom/build/src/org/jdom/AttributeFilter.java:89:
Blank final variable 'ns' may not have been initialized. It must be assigned
a value in an initializer, or in every constructor.</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; AttributeFilter(Element
parent) {</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; ^</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] /home/nkornwei/jdom/build/src/org/jdom/AttributeFilter.java:89:
Blank final variable 'name' may not have been initialized. It must be assigned
a value in an initializer, or in every constructor.</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; AttributeFilter(Element
parent) {</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; ^</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] /home/nkornwei/jdom/build/src/org/jdom/ElementContentFilter.java:82:
Blank final variable 'parent' may not have been initialized. It must be
assigned a value in an initializer, or in every constructor.</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; ElementContentFilter(Element
parent) {</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac]&nbsp;&nbsp;&nbsp;&nbsp; ^</FONT>
<BR><FONT SIZE=-1>&nbsp;&nbsp;&nbsp; [javac] 4 errors</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>BUILD FAILED</FONT><FONT SIZE=-1></FONT>

<P><FONT SIZE=-1>/home/nkornwei/jdom/build.xml:156: Compile failed, messages
should have been provided.</FONT>

<P><U>Work around to resolve: </U>this is a known compiler bug with 1.1.x
Java compilers (to my knowledge). The code must be restructured so that
final members are initialized directly in all constructors (rather than
through a call to another constructor).
<BR>The file: <B>src/java/org/jdom/AttributeFilter.java</B> was changed
as follows:

<P>&nbsp;&nbsp;&nbsp; AttributeFilter(Element parent) {
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // original code.
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //this(parent, null, null);
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // added:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.parent = parent;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.name&nbsp;&nbsp; =
null;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.ns&nbsp;&nbsp;&nbsp;&nbsp;
= null;
<BR>&nbsp;&nbsp;&nbsp; }

<P>The compile error relating to ElementContentFilter.java is still a mystery
to me....but running the build a second time <I>does not result in the
error message! </I>(...a little unsettling). Any help regarding this error
message would be appreciated.

<P>Hope the above is clear enough to be of some use. I suspect I am having
these problems either because I&nbsp;am one of the few users still with
Java 1.1.x, or I&nbsp;am doing something wrong!.

<P>Thanks and regards,

<P>Nick Kornweibel
<BR>&nbsp;
<BR>&nbsp;</HTML>