ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Ant Wiki] Update of "AntNewbies" by SteveLoughran
Date Mon, 11 Apr 2005 10:17:37 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ant Wiki" for change notification.

The following page has been changed by SteveLoughran:

The comment on the change is:
explain error message more clearly.

  I'm thinking it either has to do with their version of JDK (1.4.1_02) or Ant (they claim
it's 1.6.1). Anyone seen this error before? I can't get it to reproduce on my system.
+ '''Answer #9''' - Any error message {{{Element <a> doesn't support nested element
of type <b>}}} means that there is 
+ a bit of the build file that goes
+ {{{
+ <a> 
+  <b/>
+ </a>
+ }}}
+ And the element "a" -be it task, datatype, whatever, does not support nested elements of
type "b". It is a parse time error, done when mapping XML nodes to the implementation classes.
In the initial problem snippet, there is no way the sample code could raise this error. There
is something else wrong with the build file, something like {{{<exec><echo>echo
... </echo></exec>}}}. It has nothing to do with the JDK or Ant version, as no
version of Ant supports {{{<echo>}}} as a nested element of {{{<exec>}}}. 
+ If you see this error, here is what you should do
+  * Use an XML-aware editor/mode to make sure you are doing well formed XML.
+  * Find the outer element at the reported line.
+  * Locate the inner element that is causing the problem.
+  * Verify in your Ant manual that it is allowed in the outer element, if not, remove it.
+  * If it is apparently allowed, you have a misspelling or a mismatch between your documentation
+    the version of ant that is actually running.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message