Build failure (qdox)

I’'m trying to upgrade our existing server to the new 3.2.0 release. When rebuilding all of my plugins, the build suddenly fails:

BUILD FAILED
<snip>\wildfire\build\build.xml:1002: The following error occurred while executing this line:
<snip>\wildfire\build\build.xml:1011: The following error occurred while executing this line:
<snip>\wildfire\build\build.xml:1013: The following error occurred while executing this line:
<snip>\wildfire\build\build.xml:1085: com.thoughtworks.qdox.parser.ParseException: syntax error @[27,52] in <snip>/wildfire/src/plugins/msntransport/src/java/com/buzzaa/wildfire/plugin/msntransport/packet/Packet.java

The error seems to track back to ‘‘srcinc’’ typedef declaration that was introduced in build.xml in revision 6801.

I haven’‘t changed the code between the last succesful build (using an older Wildfire) and this one. Eclipse doesn’‘t detect any syntax errors when building the code, so I’‘m suspecting the package called qdox to generate the error on its own. I’‘m not seeing any illegal code or javadoc in the file that’‘s included in the stacktrace. I’‘ve tried removing the javadoc that is included right before the exception is thrown, but that didn’'t help.

Packet.java is an abstract class. The line and column that is included in the exception message point to the parentheses of an abstract method declaration (that doesn’'t include arguments):

public abstract class Packet
{
    private static enum PacketType
    {
        VER, CVR, CVQ, USR, CHG, ILN, FLN, NLN, PNG, QNG, CHL, QRY, SYN, GTC,
        BLP, PRP, LSG, LST, ADD, BPR, REM, REA, ADG, RMG, REG, MSG, XFR, RNG,
        OUT, ANS, IRO, CAL, JOI, BYE, NOT
    }
        public static final String MSN_NEWLINE = "\r\n";
        /**
     * Returns an UTF-8 encoded representation of the packet.
     *      * @return Packet content.
     */
    public abstract String getStringRepresentation();
        public byte[] getBytes()
    { <snip> }

What’'s going on here? Did anyone encounter this before? Any known workarounds?

Hey Guus,

Are you using the source code in SVN? Where are you getting the source code from? Have you tried using trunk?

Have you tried building it from the command line? Which version of ant are you using? I’'m using ant 1.6.5. Which Java version are you using?

Regards,

– Gato

Hi Gato,

I was using the WILDFIRE_3_2_0 tag from SVN. I just tried trunk/head, but that doesn’‘t solve it. I’'m using the same ant version, and java 1.5.0_08.

Ok, I found the cause of my problem. Notice the enum that I declared on top of the file: it doesn’‘t end with a semi-colon. The compiler doesn’'t have a problem with that, but qdox does.

In summery: don’'t do this:

public static enum Type
    {
        INVITE,
        ACCEPT,
        CANCEL
    }

But do this instead:

public static enum Type
    {
        INVITE,
        ACCEPT,
        CANCEL
    };