ant build fails to compile

52 views
Skip to first unread message

Acharya

unread,
Feb 5, 2009, 4:07:23 AM2/5/09
to Conzilla
Hello Hannes Ebner,
I have downloaded the source from the sourceforge svn (https://
conzilla.svn.sourceforge.net/svnroot/conzilla conzilla). The overall
ant build fails to build under tags/conzilla-2.2.6. I am using ant-1.7
with j2se version 1.6.0_06.

I have observed that the jar file is getting created under the dist
folder, but it gets deleted after the javadoc task is executed. Should
i comment the tasks following the compilation and proceed ?

Thanks
Acharya

Hannes Ebner

unread,
Feb 5, 2009, 4:44:29 AM2/5/09
to conz...@googlegroups.com
Hi,

which target do you execute? "ant jar" should just work fine.

The dist folder shouldn't get deleted unless you call the cleanup target.

/Hannes

Exaos Lee

unread,
Mar 14, 2009, 2:28:36 AM3/14/09
to Conzilla
I confirmed such an error. After checkout from the repository, I
failed to run "ant" in the conzilla-2.2.6 and also "trunk" dir.
Because the dist dir has been deleted before processing "ant zip".
After adding "<mkdir dir=... />" into the "zip" target, I succeeded in
building. The environment I'm working in:
----------------------------
Platform: Ubuntu Linux 8.10
Java: sun-jdk-6 1.6.0_10
ant: 1.7.1
----------------------------
Maybe it is just a special case with the specific ant and java
version. Hope somebody can confirm it again.

Another problem is: I failed to run the application after building.
The error message is:
----------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: se/kth/cid/
conzilla/app/ConzillaAPP
Caused by: java.lang.ClassNotFoundException:
se.kth.cid.conzilla.app.ConzillaAPP
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: se.kth.cid.conzilla.app.ConzillaAPP.
Program will exit.
----------------------------

Running conzilla using "conzilla.jnlp" is OK. :-(
But I need a native verion.

Exaos Lee

unread,
Mar 14, 2009, 2:49:40 AM3/14/09
to Conzilla
I forget to mention one thing: I'm using JAVA x86_64 version. The
"conzilla.jnlp" cannot be started using 64-bit javaws, but OK with 32-
bit javaws.

Hannes Ebner

unread,
Mar 14, 2009, 5:49:33 AM3/14/09
to conz...@googlegroups.com
Exaos Lee wrote:
> I confirmed such an error. After checkout from the repository, I
> failed to run "ant" in the conzilla-2.2.6 and also "trunk" dir.
> Because the dist dir has been deleted before processing "ant zip".
> After adding "<mkdir dir=... />" into the "zip" target, I succeeded in
> building. The environment I'm working in:
> ----------------------------
> Platform: Ubuntu Linux 8.10
> Java: sun-jdk-6 1.6.0_10
> ant: 1.7.1
> ----------------------------
> Maybe it is just a special case with the specific ant and java
> version. Hope somebody can confirm it again.

I just ran the target with the very same OS, Java and Ant versions, and
"ant zip" works without any problems. The cleanup gets called before the
compilation, thereafter the whole structure, including the "dist"
directory is created. That's where you should find the zip file.

> Another problem is: I failed to run the application after building.
> The error message is:
> ----------------------------
> Exception in thread "main" java.lang.NoClassDefFoundError: se/kth/cid/
> conzilla/app/ConzillaAPP
> Caused by: java.lang.ClassNotFoundException:
> se.kth.cid.conzilla.app.ConzillaAPP

Be careful about upper/lower case. The class is called ConzillaApp (not
APP).

HTH,
Hannes

Hannes Ebner

unread,
Mar 14, 2009, 5:54:23 AM3/14/09
to conz...@googlegroups.com
Exaos Lee wrote:
> I forget to mention one thing: I'm using JAVA x86_64 version. The
> "conzilla.jnlp" cannot be started using 64-bit javaws, but OK with 32-
> bit javaws.

What's the problem with javaws on 64-bit? Could you send the error
messages or console output?

Thanks,
Hannes

Exaos Lee

unread,
Mar 15, 2009, 11:23:16 AM3/15/09
to Conzilla
$ javaws conzilla.jnlp
netx: Spec version not supported (supports 1.0)

Exaos Lee

unread,
Mar 15, 2009, 11:24:04 AM3/15/09
to Conzilla
Both "ConzillaAPP" and "ConzillaApp" cannot work. The same error. :-(

Hannes Ebner

unread,
Mar 15, 2009, 1:32:17 PM3/15/09
to conz...@googlegroups.com
Exaos Lee wrote:
> Both "ConzillaAPP" and "ConzillaApp" cannot work. The same error. :-(

How does your classpath look like?

/Hannes

Hannes Ebner

unread,
Mar 15, 2009, 1:35:00 PM3/15/09
to conz...@googlegroups.com
Exaos Lee wrote:
> $ javaws conzilla.jnlp
> netx: Spec version not supported (supports 1.0)

Which Java are you running? Version, vendor, etc.
Currently the JNLP file is made according to JNLP spec version 1.5.

/Hannes

Exaos Lee

unread,
Mar 17, 2009, 4:38:37 AM3/17/09
to Conzilla
----------------------------
Platform: Ubuntu Linux 8.10, x86_64
Java: sun-jdk-6 1.6.0_10
ant: 1.7.1
----------------------------

Cannot build on Ubuntu Linux 8.10 x86/x86_64 both.
Java: sun-java6-jdk 1.6.0_10
ant: 1.7.1
Classpath: the system default setting, no customization

The jnlp file cannot be launched by Java 1.6.0 amd64 version, but can
be launched by x86 version. On my AMD64 system, it works fine with
ia32-sun-java6-jre.

Today, I tried to build conzilla 2.2.6 from SVN on Debian Linux 5.0
amd64 with sun-java6-jdk, still failed with the same error as above!
(Default system setting) :-(
Though I can use Conzilla with javaws (IA32 version), I cannot run it
on another platform without networking. I will try again if I have
spare time.

Exaos Lee

unread,
Mar 17, 2009, 5:37:51 AM3/17/09
to Conzilla
OOPS! I tried to install sun-java5-jdk, Failed to build again!

OS: Ubuntu Linux 8.10 x86
Java: sun-java5-jdk, java 1.5.0_16
---------------------
% javac -version
javac 1.5.0_16
---------------------
ant:
--------------
% ant -version
Apache Ant version 1.7.1 compiled on October 3 2008
--------------

After executing "ant", I got the following Error:
----------------------
zip:

BUILD FAILED
/home/exaos/Downloads/Sources/conzilla/build.xml:242: /home/exaos/
Downloads/Sources/conzilla/dist not found.
----------------------

After removing the dependence on "cleanup" from "zip", builing is OK!
But still failed to execute:
=================================
exaos@memes:~/Downloads/Sources/conzilla % cat bin/run_conzilla.sh
#!/bin/sh
cd ..
exec java -cp dist/Conzilla.jar:dist/Conzilla-formlets.jar:lib/
arq.jar:lib/commons-logging.jar:lib/iri.jaricu4j.jar:lib/jena.jar:lib/
xercesImpl.jar:lib/:lib/batik-awt-util.jar:lib/batik-dom.jar:lib/batik-
svggen.jar:lib/batik-util.jar:lib/batik-xml.jar:lib/
browserlauncher2.jar:lib/collaborilla.jar:lib/
com.noelios.restlet.ext.net.jar:lib/com.noelios.restlet.jar:lib/
commons-codec.jar:lib/commons-httpclient.jar:lib/commons-httpclient-
contrib.jar:lib/commons-logging.jar:lib/commons-logging-api.jar:lib/
commons-net.jar:lib/commons-transaction.jar:lib/edutella.jar:lib/
jakarta-slide-webdavlib.jar:lib/jdom-1.0.jar:lib/log4j.jar:lib/
org.restlet.jar:lib/SHAME.jar:lib/SHAME-formlets.jar:lib/swing-
layout.jar:lib/ se.kth.cid.conzilla.app.ConzillaApp -Xmx256m $@
%
exaos@memes:~/Downloads/Sources/conzilla % ./bin/run_conzilla.sh
Exception in thread "main" java.lang.NoClassDefFoundError: se/kth/cid/
conzilla/app/ConzillaApp
=================================

I hope my problem is described clearly enough, the OS platform, java
version, ant version, building process, classpath, etc.
Another question is: I didn't get the "Conzilla-formlets.jar" in the
"dist" dir after successful build with a little modification with
"build.xml" by removing the dependence of "cleanup" from "zip" target.

Hannes Ebner

unread,
Mar 17, 2009, 8:17:47 AM3/17/09
to conz...@googlegroups.com
Exaos Lee wrote:
> After executing "ant", I got the following Error:
> ----------------------
> zip:
>
> BUILD FAILED
> /home/exaos/Downloads/Sources/conzilla/build.xml:242: /home/exaos/
> Downloads/Sources/conzilla/dist not found.
> ----------------------
>
> After removing the dependence on "cleanup" from "zip", builing is OK!
> But still failed to execute:

Which ant target are you actually executing? If I run "ant zip" all
directories which don't exist are created, including the "dist" directory.

I tried to, but I didn't succeed yet with reproducing the problems you
are facing.

> exaos@memes:~/Downloads/Sources/conzilla % cat bin/run_conzilla.sh

This file hasn't been updated for quite some time because the webstart
version is the only supported method of deployment right now. If you add
all files in the lib directory to the classpath in the shell script it
should work.

/Hannes

Hannes Ebner

unread,
Mar 17, 2009, 8:18:58 AM3/17/09
to conz...@googlegroups.com
Exaos Lee wrote:
> The jnlp file cannot be launched by Java 1.6.0 amd64 version, but can
> be launched by x86 version. On my AMD64 system, it works fine with
> ia32-sun-java6-jre.

I will try to reproduce this problem in a 64-bit Ubuntu VM.

/Hannes

Exaos Lee

unread,
Mar 17, 2009, 9:43:38 PM3/17/09
to Conzilla
I just type "ant", which means "ant all".
The commands "ant jar" and "ant scripts" are executed OK, but failed
to run the script and "Conzilla.jar".
Could anybody upload a compiled distribution here? I don't want to
build again. :-(

Exaos Lee

unread,
Mar 18, 2009, 1:02:38 AM3/18/09
to Conzilla
I just setup the CLASSPATH, and run directly in the "classes" path, It
seems OK. It might be the problem of archiving the ".jar" file. So,
until now, two problems are on my platform:
1. "ant jar" cannot generate an available "Conzilla.jar". I cannot
using the generated ".jar".
2. "ant zip" cannot generate the "zip" file directory.
Reply all
Reply to author
Forward
0 new messages