You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bharath Vasudevan <bh...@gmail.com> on 2010/03/06 23:05:48 UTC

Tomcat build error

Hi,

I tried building the 6.0.x tomcat source. From the installation looks like
we had to execute "ant download" and then "ant".

Executing "ant download" completed fine and said build successful. But
executing "ant" after it fails with this error:

Any idea if some envt variable is messed up ?

sudo ant
Buildfile: build.xml

build-prepare:
   [delete] Deleting directory /usr/share/tomcat-trunk/output/build/temp
    [mkdir] Created dir: /usr/share/tomcat-trunk/output/build/temp

compile:
    [javac] Compiling 1058 source files to
/usr/share/tomcat-trunk/output/classes

BUILD FAILED
java.lang.NoClassDefFoundError: gnu/classpath/Configuration
        at com.sun.tools.javac.Main.<clinit>(Main.java:66)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:145)
        at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:100)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1058)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassNotFoundException: gnu.classpath.Configuration
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
        ... 23 more

Total time: 1 second

Regards,
Bharath

Re: Tomcat build error

Posted by Bharath Vasudevan <bh...@gmail.com>.
Thanks folks. Looks like the gcj that was installed was causing the issue.
Had uninstalled it and ant started picking up my jdk path.

On Sun, Mar 7, 2010 at 1:34 PM, Mark Thomas <ma...@apache.org> wrote:

> On 07/03/2010 21:14, Bharath Vasudevan wrote:
> > My classpath is set for the tomcat working directory. Looks like
> > apache.ant.org is down now (so couldnt see what it should be set to).
>
> That is ant.apache.org
>
> As you'll see from http://monitoring.apache.org/status/ it is the EU
> mirror that is down. The infra team is updating DNS to use the US mirror
> as I tyope. You can force the use of the US mirror using ant.us.apache.org
>
> > echo $CLASSPATH
> > /usr/share/tomcat6/lib/servlet-api.jar
>
> Irrelevant.
>
> Again. Use a complier from Sun.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: Tomcat build error

Posted by Mark Thomas <ma...@apache.org>.
On 07/03/2010 21:14, Bharath Vasudevan wrote:
> My classpath is set for the tomcat working directory. Looks like
> apache.ant.org is down now (so couldnt see what it should be set to).

That is ant.apache.org

As you'll see from http://monitoring.apache.org/status/ it is the EU
mirror that is down. The infra team is updating DNS to use the US mirror
as I tyope. You can force the use of the US mirror using ant.us.apache.org

> echo $CLASSPATH
> /usr/share/tomcat6/lib/servlet-api.jar

Irrelevant.

Again. Use a complier from Sun.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat build error

Posted by Bharath Vasudevan <bh...@gmail.com>.
My classpath is set for the tomcat working directory. Looks like
apache.ant.org is down now (so couldnt see what it should be set to).

echo $CLASSPATH
/usr/share/tomcat6/lib/servlet-api.jar

I am working on a ubuntu server edition. I had ant-gcj installed previously.
Removed it now and tried it. Still its failing with the same error.

sudo dpkg --get-selections | grep gcj
gcj-4.4-base                                    purge
gcj-4.4-jre-lib                                 install
libgcj-bc                                       install
libgcj-common                                   install
libgcj10                                        install

On Sun, Mar 7, 2010 at 12:04 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2010/3/7 Bharath Vasudevan <bh...@gmail.com>:
> >
> > I have been using sun jdk only. Even my JAVA_HOME path looks fine.
> >
> > echo $JAVA_HOME
> > /usr/lib/jvm/java-6-openjdk/
> >
>
> Do not be so sure. I think you self can see that
> gnu/classpath/Configuration in your logs.
>
> What is the value of $CLASSPATH ?
> http://ant.apache.org/manual/install.html
>
> It is my humble opinion, but you would better go and uninstall gcj
> E.g.  rpm -q -a | grep gcj  can mention something.
> (I do not know what OS you are using).
>
>
> Looking again at the stack trace, it looks like Ant is confused: it
> tries to find some "modern" compiler and initialize a wrapper around
> it, but cannot.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: Tomcat build error

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/3/7 Bharath Vasudevan <bh...@gmail.com>:
>
> I have been using sun jdk only. Even my JAVA_HOME path looks fine.
>
> echo $JAVA_HOME
> /usr/lib/jvm/java-6-openjdk/
>

Do not be so sure. I think you self can see that
gnu/classpath/Configuration in your logs.

What is the value of $CLASSPATH ?
http://ant.apache.org/manual/install.html

It is my humble opinion, but you would better go and uninstall gcj
E.g.  rpm -q -a | grep gcj  can mention something.
(I do not know what OS you are using).


Looking again at the stack trace, it looks like Ant is confused: it
tries to find some "modern" compiler and initialize a wrapper around
it, but cannot.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat build error

Posted by Bharath Vasudevan <bh...@gmail.com>.
Hi Mark,

I have been using sun jdk only. Even my JAVA_HOME path looks fine.

echo $JAVA_HOME
/usr/lib/jvm/java-6-openjdk/

Bharath

On Sun, Mar 7, 2010 at 1:15 AM, Mark Thomas <ma...@apache.org> wrote:

> On 06/03/2010 22:05, Bharath Vasudevan wrote:
> > BUILD FAILED
> > java.lang.NoClassDefFoundError: gnu/classpath/Configuration
>
> Don't use gnu - download a Sun JDK.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: Tomcat build error

Posted by Mark Thomas <ma...@apache.org>.
On 06/03/2010 22:05, Bharath Vasudevan wrote:
> BUILD FAILED
> java.lang.NoClassDefFoundError: gnu/classpath/Configuration

Don't use gnu - download a Sun JDK.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org