ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian.Al...@regulusgroup.com
Subject Re: method not found when running ant
Date Wed, 03 Nov 2004 18:53:44 GMT
The only way I was able to get ant to stop complaining about those missing 
classes was to place the fully qualified name (including the jar file 
name) in the $CLASSPATH. Once I did that, I get the following error which 
states that com.sun.net.ssl.internal.ssl.Provider is not found. This class 
is part of the standard j2sdk distribution which leads me to believe that 
ant is still not finding my $JAVA_HOME by evidence of the diagnostics 
output. Notice ANT_HOME is null and java.home is set to /usr. Both of 
these are incorrect according to the echo statements that follow.

[sjgetproject] SourceJammer make files read-only (false)
[sjgetproject] SourceJammer config path 
(/usr/local/sourcejammer/client/conf)
[sjgetproject] ac - /usr/local/sourcejammer/conf.xml
[sjgetproject] ac - /usr/local/sourcejammer/client/conf/conf.xml
[sjgetproject] cc - /usr/local/sourcejammer/client/conf/clientconf.xml
[sjgetproject] Connectiong to archive: nas01

BUILD FAILED
java.lang.NoClassDefFoundError: while resolving class: 
org.sourcejammer.client.SOAPPortal
   at java.lang.ClassLoader.resolveClass0(java.lang.Class) 
(/lib/ssa/libgcj.so.4.0.0)
   at java.lang.Class.initializeClass() (/lib/ssa/libgcj.so.4.0.0)
   at 
org.sourcejammer.client.gui.CommandCentral.setServerURL(java.lang.String) 
(Unknown Source)
   at 
org.sourcejammer.client.simpletools.SimpleInterface.connect(java.lang.String, 
java.lang.String, java.lang.String, java.lang.String) (Unknown Source)
   at org.sourcejammer.client.ant.SJGetProject.execute() (Unknown Source)
   at org.apache.tools.ant.UnknownElement.execute() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Task.perform() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Target.execute() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Target.performTasks() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Project.executeTarget(java.lang.String) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Project.executeTargets(java.util.Vector) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Main.runBuild(java.lang.ClassLoader) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Main.start(java.lang.String[], 
java.util.Properties, java.lang.ClassLoader) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Main.main(java.lang.String[]) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
Caused by: java.lang.ClassNotFoundException: 
com.sun.net.ssl.internal.ssl.Provider not found in 
[file:/usr/local/ant/lib/sj_ant.jar, file:/usr/local/ant/lib/sj_lib.jar, 
file:/usr/local/ant/lib/sj_client.jar, file:/usr/local/ant/lib/mail.jar, 
file:/usr/local/ant/lib/activation.jar, file:/usr/local/ant/lib/soap.jar, 
file:./, core:/]
   at java.net.URLClassLoader.findClass(java.lang.String) 
(/lib/ssa/libgcj.so.4.0.0)
   at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) 
(/lib/ssa/libgcj.so.4.0.0)
   at java.lang.ClassLoader.loadClass(java.lang.String, boolean) 
(/lib/ssa/libgcj.so.4.0.0)
   at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) 
(/lib/ssa/libgcj.so.4.0.0)
   at _Jv_PrepareCompiledClass(java.lang.Class) (/lib/ssa/libgcj.so.4.0.0)
   at _Jv_WaitForState(java.lang.Class, int) (/lib/ssa/libgcj.so.4.0.0)
   at java.lang.ClassLoader.linkClass0(java.lang.Class) 
(/lib/ssa/libgcj.so.4.0.0)
   at java.lang.ClassLoader.resolveClass0(java.lang.Class) 
(/lib/ssa/libgcj.so.4.0.0)
   ...13 more

Total time: 0 seconds
java.lang.NoClassDefFoundError: while resolving class: 
org.sourcejammer.client.SOAPPortal
   at java.lang.ClassLoader.resolveClass0(java.lang.Class) 
(/lib/ssa/libgcj.so.4.0.0)
   at java.lang.Class.initializeClass() (/lib/ssa/libgcj.so.4.0.0)
   at 
org.sourcejammer.client.gui.CommandCentral.setServerURL(java.lang.String) 
(Unknown Source)
   at 
org.sourcejammer.client.simpletools.SimpleInterface.connect(java.lang.String, 
java.lang.String, java.lang.String, java.lang.String) (Unknown Source)
   at org.sourcejammer.client.ant.SJGetProject.execute() (Unknown Source)
   at org.apache.tools.ant.UnknownElement.execute() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Task.perform() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Target.execute() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Target.performTasks() 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Project.executeTarget(java.lang.String) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Project.executeTargets(java.util.Vector) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Main.runBuild(java.lang.ClassLoader) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Main.start(java.lang.String[], 
java.util.Properties, java.lang.ClassLoader) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
   at org.apache.tools.ant.Main.main(java.lang.String[]) 
(/usr/lib/lib-org-apache-tools-1.5.2.so)
Caused by: java.lang.ClassNotFoundException: 
com.sun.net.ssl.internal.ssl.Provider not found in 
[file:/usr/local/ant/lib/sj_ant.jar, file:/usr/local/ant/lib/sj_lib.jar, 
file:/usr/local/ant/lib/sj_client.jar, file:/usr/local/ant/lib/mail.jar, 
file:/usr/local/ant/lib/activation.jar, file:/usr/local/ant/lib/soap.jar, 
file:./, core:/]
   at java.net.URLClassLoader.findClass(java.lang.String) 
(/lib/ssa/libgcj.so.4.0.0)
   at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) 
(/lib/ssa/libgcj.so.4.0.0)
   at java.lang.ClassLoader.loadClass(java.lang.String, boolean) 
(/lib/ssa/libgcj.so.4.0.0)
   at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) 
(/lib/ssa/libgcj.so.4.0.0)
   at _Jv_PrepareCompiledClass(java.lang.Class) (/lib/ssa/libgcj.so.4.0.0)
   at _Jv_WaitForState(java.lang.Class, int) (/lib/ssa/libgcj.so.4.0.0)
   at java.lang.ClassLoader.linkClass0(java.lang.Class) 
(/lib/ssa/libgcj.so.4.0.0)
   at java.lang.ClassLoader.resolveClass0(java.lang.Class) 
(/lib/ssa/libgcj.so.4.0.0)
   ...13 more
while resolving class: org.sourcejammer.client.SOAPPortal

[ballen@opacs184 sourcejammer]$ ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.5.2-20 compiled on September 25 2003

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : null
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: null
Unable to list libraries.

-------------------------------------------
 Tasks availability
-------------------------------------------
............

-------------------------------------------
 org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/

-------------------------------------------
 System properties
-------------------------------------------
path.separator : :
java.vm.name : GNU libgcj
java.vm.specification.name : Java(tm) Virtual Machine Specification
java.home : /usr
java.vm.specification.version : 1.0
line.separator :

java.vm.specification.vendor : Sun Microsystems Inc.
gnu.classpath.home.url : file:///lib/ssa
gnu.gcj.progname : ant
java.specification.version : 1.3
java.library.path :
gnu.classpath.vm.shortname : libgcj
java.class.version : 46.0
java.specification.name : Java(tm) Platform API Specification
os.version : 2.4.21-4.EL
gnu.classpath.home : /usr
user.home : /home/ballen
file.encoding : UTF-8
os.name : Linux
build.compiler : gcj
user.name : ballen
java.class.path : 
/usr/local/ant/lib/sj_ant.jar:/usr/local/ant/lib/sj_lib.jar:/usr/local/ant/lib/sj_client.jar:/usr/local/ant/lib/mail.jar:/usr/local/ant/lib/activation.jar:/usr/local/ant/lib/soap.jar:.
java.io.tmpdir : /tmp
os.arch : i686
java.fullversion : GNU libgcj 3.5-tree-ssa 20030617 (Red Hat Linux Rawhide 
3.5ssa-41)
user.language : en
java.specification.vendor : Sun Microsystems Inc.
user.dir : /usr/local/sourcejammer
java.vm.info : GNU libgcj 3.5-tree-ssa 20030617 (Red Hat Linux Rawhide 
3.5ssa-41)
java.version : 3.5-tree-ssa
sun.boot.class.path : /usr/share/java/libgcj-3.5-tree-ssa.jar
java.vm.vendor : Free Software Foundation, Inc.
java.vendor.url : http://gcc.gnu.org/java/
java.vendor : Free Software Foundation, Inc.
file.separator : /
java.vm.version : 3.5-tree-ssa 20030617 (Red Hat Linux Rawhide 3.5ssa-41)
gnu.cpu.endian : little
user.region : US

[ballen@opacs184 sourcejammer]$ echo $JAVA_HOME
/java

[ballen@opacs184 sourcejammer]$ echo $ANT_HOME
/usr/local/ant

[ballen@opacs184 sourcejammer]$ echo $PATH
/usr/kerberos/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/ant/bin:/java/bin:/usr/local:/home/ballen/bin

[ballen@opacs184 sourcejammer]$ echo $CLASSPATH
/usr/local/ant/lib/sj_ant.jar:/usr/local/ant/lib/sj_lib.jar:/usr/local/ant/lib/sj_client.jar:/usr/local/ant/lib/mail.jar:/usr/local/ant/lib/activation.jar:/usr/local/ant/lib/soap.jar





Matt Benson <gudnabrsam@yahoo.com> 
11/03/2004 01:05 PM
Please respond to
"Ant Users List" <user@ant.apache.org>


To
Ant Users List <user@ant.apache.org>
cc

Subject
Re: method not found when running ant






--- Brian.Allen@regulusgroup.com wrote:
> [ballen@opacs184 sourcejammer]$ echo $JAVA_HOME
> /java/bin
Here is one problem.  If you want Ant to pick up
/java/bin/java as its Java executable, JAVA_HOME is
/java.

> [ballen@opacs184 sourcejammer]$ echo $ANT_HOME
> /usr/local/ant

Not sure why this didn't show up as ant.home .  Let's
fix what we do know is wrong first.

> [ballen@opacs184 sourcejammer]$ echo $PATH
>
/usr/kerberos/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/ant/bin:/java/bin:/usr/local/ant/lib:/usr/local/:/home/ballen/bin

I don't see why you would need /usr/local/ant/lib in
your PATH.

> BUILD FAILED
> file:/usr/local/sourcejammer/build.xml:5: taskdef
> class 
> org.sourcejammer.client.ant.SJGetProject cannot be
> found

You could make these classes available for all Ant
invocations by placing them in $HOME/.ant/lib, placing
in $ANT_HOME/lib, setting them in $HOME/.antrc, or
setting the -lib option in $ANT_ARGS.  For a single
invocation you could use the -lib option at the
command line.
For a single buildfile you could use <[task|type]def>s
with nested <classpath>s or <antlib>s.  I won't say
having a system CLASSPATH *never* works, but I've had
enough bad luck with it (with Java applications in
general) that the last time I tried it is an obscure
memory.

HTH,
Matt


 
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message