You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by James Abley <ja...@volantis.com> on 2005/04/01 09:08:12 UTC

Re: NoClassDefFoundError for class that is on the classpath?

On Thu, 2005-03-31 at 15:25, Fermin Da Costa wrote:
> On Thu, 31 Mar 2005 09:04:17 -0500, Doklovic, Jonathan
> <JD...@vscat.com> wrote:
> > What does your <junit> entry look like?
> I'm assuming y'r referring to the code that actually calls the class.
> ...
> <target name="jmlUnitTestStubs" depends="init" description="Produce
> unit testing code stubs for use with JUnit">
> 		<java classname="org.jmlspecs.jmlunit.Main" fork="true"
> failonerror="true" maxmemory="256m">
> 			<arg line="-C${cp}" />
> 			<arg line="-S${src.dir}" />
> 			<arg line="--recursive"/>
> 			<arg line="${jml.files}"/>
> 		</java>
> 	</target>
> ...
> 

I'm probably missing something, but why aren't you using a classpath
argument to <java/>?

e.g.

<java ... >
        <classpath refid="cp" />
        ...
</java>

James


> The init target works just fine (as in: it does not come up with an error)
> 
> The org.jmlspecs.jmlunit.Main *is* where one expects it to be.
> 
> tia,
> 
> Fermin DCG
> 
> > 
> > -----Original Message-----
> > From: F Da Costa Gomez [mailto:dacostagomez@gmail.com]
> > Sent: Thursday, March 31, 2005 7:53 AM
> > To: user@ant.apache.org
> > Subject: NoClassDefFoundError for class that is on the classpath?
> > 
> > Hi,
> > 
> > Following the error i get when trying to run a script (from Eclipse 3.0.2)
> > 
> > jmlUnitTestStubs:
> >       [java] java.lang.NoClassDefFoundError: org/jmlspecs/jmlunit/Main
> >       [java] Exception in thread "main"
> > 
> > The class is actually *on* the classpath because the following line in
> > echo-ed:
> > ...
> > C:/eclipse/plugins/org.jmlspecs_1.0.4/jml-release.jar;
> > C:/eclipse/plugins/org.jmlspecs_1.0.4/jml-specs;
> > 
> > Actually it can be found in the release.jar
> > 
> > The code used to set the classpath is as follows <snip>
> > <!-- Set the classpath for the project, include the JML spec-files as well
> > --> <path id="classpath">
> >   <pathelement path="${java.class.path}" />
> >   <fileset dir="${jmlhome}/bin">
> >    <include name="**/*.jar"/>
> >   </fileset>
> >   <fileset dir="${test.dir}">
> >    <include name="jmlfiles.jar"/>
> >   </fileset>
> > </path>
> > 
> > <pathconvert property="cp" refid="classpath" dirsep="/" pathsep=";"/>
> > </snip>
> > 
> > Could anybody point a the right direction to resolve this?
> > 
> > tia,
> > 
> > Fermin DCG
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> > commands, e-mail: user-help@ant.apache.org
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 



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


Error trying to use cvs task to access CVS repository via extssh

Posted by ko...@iclployalty.com.
Hi

First of all I apologise if this is slightly off topic as it may well not be
ant which is the cause of the problem.

I have an ANT script which I am running from within Eclipse which exports
the specified tag/branch from a CVS repository to the webroot. It works
with an old pserver repository but we now have a new one and are using
extssh which unfortunately gives the following error:

"cvs [version aborted]: the :extssh: access method is
not installed on this system", 

(when trying to run `<cvs command="version" />)

A similar error message appears when using :ssh: instead of :extssh:.
Using :ext: results in a different error: 

"[cvs] cvs export: warning:unrecognized response `'ssh' is not recognized as
an internal or
external command,
[cvs] ' from cvs servercvs export: warning: unrecognized response
`operable program or batch file.".

I would be grateful if anyone could offer any insight into the possible
cause of this.

Thanks in advance


Kola




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