• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getting an error while executing this task

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

This what I have defined in my build file


<target name="docapp">
<unzip dest="${basedir}/tmp" overwrite="true" src="${basedir}/docapps/FnM_Docapp_AP_04.zip">


</unzip>
<!--
<property name="dctm.docbaseName" value="FnM_Docapp_AP_04" />
<property name="dctm.userName" value="${username}" />
<property name="dctm.domain" value="" />
<property name="dctm.loginTix" value="${password}" />

<taskdef name="docapp.install" classname="com.documentum.ant.DocAppInstall" >

</taskdef>

-->

<java classname="com.documentum.ApplicationInstall.DfAppInstaller" classpathref="classpathref">
<arg value="-n"/>
<arg value="${username}"/>
<arg value="-d"/>
<arg value="RMDev_Corporate"/>
<arg value="-a"/>
<arg value="${basedir}/docapps/FnM_Docapp_AP_04"/>
<arg value="-f"/>
<arg value="${basedir}/docapps/FnM_Docapp_AP_04/FnM_Docapp_AP_04.properties"/>
<arg value="-p"/>
<arg value="${password}"/>
<arg value="-l"/>
<arg value="${basedir}/docapps/FnM_Docapp_AP_04"/>
</java>
</target>
<target name="deploy" depends="release">
<sshexec host="dsysadm-ap25" username="{" trust="true" password="${password}" command=". ./.bashrc;. /appl/r9admd/builds/test.sh; "/>
<echo>"Copying Files</echo>
<scp file="${file.fnm.methods.jar}" todir="r9admd@dsysadm-ap25:/appl/r9admd/kailash" trust="true" password="${password}"></scp>
<echo>"Done Copying Files</echo>
</target>

The Error which I get when running the target deploy is this, any clues why ?


[ August 21, 2008: Message edited by: Harjit Singh ]
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I looked up the method indicated by the error message:

[java] java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.get
FileUtils()Lorg/apache/tools/ant/util/FileUtils;

This method was introduced in Ant 1.6.3. What version of Ant are you using (run "ant -version"). My guess is that you have an older version of Ant somewhere and that is being picked up.

Try this. Edit the ant script, adding "-verbose:class" to the JVM command line. This option causes the JVM to print out each class loaded and the JAR it was loaded from. If you do have an older version of Ant hiding somewhere this should point it out.
 
Harjit Singh
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That did it... there was a ant.jar in the classpath and that was version 1.6.2.

Thanks

- Harjit
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you by any chance have the CLASSPATH env var set? If so, unset it. Otherwise this will be only the first of several surprises that you will run into. It is always best to set the classpath only on the command line, and hence why most Java apps are started from scripts (who wants to type long classpaths all the time?).
 
Harjit Singh
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I cleared the classpath and that worked.

Thanks

- Harjit
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic