Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[JAVA] Problems with ANT

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
erwan
Apprentice
Apprentice
User avatar
Posts: 150
Joined: Sun Jun 01, 2003 5:55 am
Location: Tokyo
Contact:
Contact erwan
Website

[JAVA] Problems with ANT

  • Quote

Post by erwan » Mon Jun 16, 2003 5:23 am

Hello.

I just set up my Java environement by reading the Java Gentoo environement.

I installed Blackdown-jdk since some applications seem to need it, then sun-jdk and I set sun's one as default one. I installed Tomcat and ANT plus some other applications, and I added them all to CLASSPATH with java-config.

I tried to compile my friend's program (which actually works on a properly set system) but here I have the following error:

Code: Select all

file:/home/erwan/Research/Implementation/dist/build.xml:147: taskdef class org.apache.catalina.ant.InstallTask cannot be found
It looks like a classpath error, but since I don't know Java very well I don't know where to look to find out it. Maybe ANT needs some additional configuration steps...
See me on Jabber: erwan@im.loisant.org
Top
t1deman
n00b
n00b
User avatar
Posts: 65
Joined: Sat May 10, 2003 9:50 pm
Location: california

  • Quote

Post by t1deman » Mon Jun 16, 2003 10:44 pm

I think you may be missing catalina.jar either in your classpath or on your machine. I think it might be installed with tomcat. Is tomcat installed?
t1deman
Top
erwan
Apprentice
Apprentice
User avatar
Posts: 150
Joined: Sun Jun 01, 2003 5:55 am
Location: Tokyo
Contact:
Contact erwan
Website

  • Quote

Post by erwan » Tue Jun 17, 2003 11:55 am

Well, after using java-config my CLASSPATH is the following:

/opt/sun-j2sdk-1.4.1/jre/lib:/opt/sun-j2sdk-1.4.1/lib/tools.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/optional.jar:/usr/share/tomcat/lib/xercesImpl.jar:/usr/share/tomcat/lib/xmlParserAPIs.jar:/usr/share/tomcat/lib/activation.jar:/usr/share/tomcat/lib/ant.jar:/usr/share/tomcat/lib/commons-collections.jar:/usr/share/tomcat/lib/commons-dbcp.jar:/usr/share/tomcat/lib/commons-logging-api.jar:/usr/share/tomcat/lib/commons-pool.jar:/usr/share/tomcat/lib/jasper-compiler.jar:/usr/share/tomcat/lib/jasper-runtime.jar:/usr/share/tomcat/lib/jdbc2_0-stdext.jar:/usr/share/tomcat/lib/jndi.jar:/usr/share/tomcat/lib/jta.jar:/usr/share/tomcat/lib/mail.jar:/usr/share/tomcat/lib/naming-common.jar:/usr/share/tomcat/lib/naming-factory.jar:/usr/share/tomcat/lib/naming-resources.jar:/usr/share/tomcat/lib/servlet.jar:/usr/share/postgresql/lib/postgresql.jar:.

Indeed, catalina.jar is not is the classpath. I could find it and add it to the classpath ; actually the missing jar was catalina-ant.jar from the same directory.

I am surprised - adding modules "tomcat" and "ant" to classpath using java-config should have installed these jar in classpath, shouldn't it ?
See me on Jabber: erwan@im.loisant.org
Top
bloatedfish
n00b
n00b
User avatar
Posts: 45
Joined: Thu Apr 24, 2003 1:48 pm

  • Quote

Post by bloatedfish » Tue Jun 17, 2003 7:27 pm

I too am having ant/classpath problems. When I run ant I get the following error:

Code: Select all

BUILD FAILED
Unable to load default ProjectHelper due to java.lang.NoClassDefFoundError: org/xml/sax/SAXException
This happens no matter what build file I use. I assume this is a classpath issue, but I don't know how to fix it. I have tried:

Code: Select all

java-config --set-system-classpath=ant
the command completes with no errors but I get no indication that the classpath has actually changed. The CLASSPATH environment varible does not change(although I don't know if it is suspossed to). How do you tell what the current classpath is set too!

Thanks for any help!
Top
poke@ulyssis
n00b
n00b
Posts: 9
Joined: Sat Feb 22, 2003 6:49 pm

  • Quote

Post by poke@ulyssis » Tue Jun 17, 2003 8:29 pm

install xalan and your problem should be solved.

I think ant has to depend on xalan or another xml-java package.
Top
bloatedfish
n00b
n00b
User avatar
Posts: 45
Joined: Thu Apr 24, 2003 1:48 pm

  • Quote

Post by bloatedfish » Wed Jun 18, 2003 1:36 pm

install xalan and your problem should be solved.
My thoughts exactly, but xalan won't install because it uses ant! AYYYEE! What a catch-22. I did get xerces to install, but adding that to the LOCALCLASSPATH used in the ant launcher script didn't help. Still get the same error as before. Seems to me that dev-java/ant-1.5.3-r4 package's dependencies are a incorrect.
Top
bloatedfish
n00b
n00b
User avatar
Posts: 45
Joined: Thu Apr 24, 2003 1:48 pm

  • Quote

Post by bloatedfish » Wed Jun 18, 2003 2:29 pm

I downgraded to ebuild dev-java/ant-1-5.2 and it works like a charm. The big difference between these two packages are these files:

/usr/share/ant/lib/xercesImpl.jar
/usr/share/ant/lib/xml-apis.jar

They are missing, which would coinside with the xml parser missing and the error that I was getting with 1-5.3. Someone should fix this. Does anyone know who is in charge of the ant ebuild?

[/list]
Top
Seclar
n00b
n00b
User avatar
Posts: 60
Joined: Mon Jul 07, 2003 11:42 pm
Location: Chelmsford, England

Same problem

  • Quote

Post by Seclar » Tue Sep 30, 2003 3:00 pm

I too was getting

Code: Select all

BUILD FAILED
Unable to load default ProjectHelper due to java.lang.NoClassDefFoundError: org/xml/sax/SAXException
Wasted a few hours of my day trying to fathom this out.

Can someone please fix the Ant ebuild ???
Seclar

And lo did Moses return from the mountains with the 10 Coding Commandments and a CD full of source code and examples....
Top
Lehren
n00b
n00b
Posts: 4
Joined: Sun Oct 12, 2003 3:04 am

Hmm

  • Quote

Post by Lehren » Wed Oct 15, 2003 2:57 pm

Has there been any progress here? I'm merely attempting to build the tomcat-docs HelloWorld servlet and am getting:

Code: Select all

/opt/tomcat/webapps/tomcat-docs/appdev/sample

Buildfile: build.xml

BUILD FAILED
file:/opt/tomcat/webapps/tomcat-docs/appdev/sample/build.xml:146: taskdef class org.apache.catalina.ant.InstallTask cannot be found
I have ant 1.5.3 and tomcat-4.1.24-r1.

I have tried:

1) copying the catalina-ant.jar to ant/lib, with no change
2) using ant 1.5.4 for kicks, no change

I'd like to downgrade to ant 1.5.2 and try that (a la the poster above), but the 1.5.2 ebuild file appears to have been deleted out of CVS?

Any suggestions would be most appreciated.. thank you.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic