You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Marseld Dedgjonaj <ma...@ikubinfo.com> on 2011/03/10 16:39:41 UTC

antlib.xml could not be found

Hello everybody,

I am new to Ant and more detailed help would be more valuable to me.

I am trying to use Ant to reload a tomcat application. I write the build.xml
file based on "Managing Applications with Ant" section of the "Professional
Apache Tomcat" book.

 

The Build.xml file:

 

<project name="ManageApp" default="compile" basedir=".">

 

  <!-- Configure the directory into which the web application is built -->

  <property name="build"    value="${basedir}/build"/>

 

  <!-- Configure the context path for this application -->

  <property name="path"     value="ikub_MainInstance"/>

 

  <!-- Configure properties to access the Manager application -->

  <property name="url"      value="http://localhost:8080/manager/html"/>

  <property name="username" value="manager"/>

  <property name="password" value="manager123+"/>

 

  <!-- Configure the custom Ant tasks for the Manager application -->

  <taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>

  <taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>

  <taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/>

  <taskdef name="resources"
classname="org.apache.catalina.ant.ResourcesTask"/>

  <taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"/>

  <taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/>

  <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>

  <taskdef name="undeploy"
classname="org.apache.catalina.ant.UndeployTask"/>

 

 

  <!-- Executable Targets -->

     <target name="compile" description="Compile web application">

     </target>

 

     <target name="reload" description="Reload web application"

             depends="compile">

       <reload url="${url}" username="${username}" password="${password}"

              path="${path}"/>

     </target>

 

 

  <target name="deploy" description="Install web application"

          depends="compile">

    <deploy url="${url}" username="${username}" password="${password}"

            path="${path}" war="file:${build}${path}.war"/>

  </target>

 

  <target name="undeploy" description="Remove web application">

    <undeploy url="${url}" username="${username}" password="${password}"

            path="${path}"/>

  </target>

 

</project>

 

 

When I run "ant reload -debug" I got this error:

 

 

                Adding reference: ant.PropertyHelper

Detected Java version: 1.6 in: /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre

Detected OS: Linux

Adding reference: ant.ComponentHelper

Setting ro project property: ant.file ->
/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml

Adding reference: ant.projectHelper

Adding reference: ant.parsing.context

Adding reference: ant.targets

parsing buildfile /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml with
URI = file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml

Setting ro project property: ant.project.name -> ManageApp

Adding reference: ManageApp

Setting ro project property: ant.file.ManageApp ->
/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml

Project base dir set to: /mnt/ikub_nutch/AppHelpers/ManageWebApps

+Target: 

 +Target: compile

+Target: reload

+Target: deploy

+Target: undeploy

[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.

Setting project property: build ->
/mnt/ikub_nutch/AppHelpers/ManageWebApps/build

Setting project property: path -> ikub_MainInstance

Setting project property: url -> http://localhost:8080/manager/html

Setting project property: username -> manager

Setting project property: password -> manager123+

Class org.apache.catalina.ant.DeployTask loaded from parent loader
(parentFirst)

+Datatype deploy org.apache.catalina.ant.DeployTask

Class org.apache.catalina.ant.ListTask loaded from parent loader
(parentFirst)

+Datatype list org.apache.catalina.ant.ListTask

Class org.apache.catalina.ant.ReloadTask loaded from parent loader
(parentFirst)

+Datatype reload org.apache.catalina.ant.ReloadTask

Class org.apache.catalina.ant.ResourcesTask loaded from parent loader
(parentFirst)

Trying to override old definition of datatype resources

+Datatype resources org.apache.catalina.ant.ResourcesTask

Class org.apache.catalina.ant.RolesTask loaded from parent loader
(parentFirst)

+Datatype roles org.apache.catalina.ant.RolesTask

Class org.apache.catalina.ant.StartTask loaded from parent loader
(parentFirst)

+Datatype start org.apache.catalina.ant.StartTask

Class org.apache.catalina.ant.StopTask loaded from parent loader
(parentFirst)

+Datatype stop org.apache.catalina.ant.StopTask

Class org.apache.catalina.ant.UndeployTask loaded from parent loader
(parentFirst)

+Datatype undeploy org.apache.catalina.ant.UndeployTask

Attempting to create object of type
org.apache.tools.ant.helper.DefaultExecutor

Adding reference: ant.executor

Build sequence for target(s) `reload' is [compile, reload]

Complete build sequence is [compile, reload, deploy, undeploy, ]

 

compile:

 

reload:

   [reload] <html>

   [reload] <head>

   [reload] <style>

 

....

 

  [reload] </html>

 

BUILD FAILED

<html>

                at
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
va:258)

                at
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
va:146)

                at
org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)

                at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                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.j
ava: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)

 

Total time: 0 seconds

 

 

Please any help for this issue.

 

Thanks in advance.

Best Regards,

Marseldi

 



<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
<p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>

RE: antlib.xml could not be found

Posted by Marseld Dedgjonaj <ma...@ikubinfo.com>.
Thank you Martin,
For your help and for your suggestion book.

I put the catalina-ant.jar in my classpath, which has the structure
"org/apache/catalina/ant/antlib.xml" if you are referring to this.
Command to add in classpath: $ CLASSPATH=$CLASSPATH:path/to/catalina-ant.jar
If you are not referring to this, please tell me in more details if you can.

Best regards,
Marseldi


-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Thursday, March 10, 2011 5:49 PM
To: Ant Users List
Subject: RE: antlib.xml could not be found


you need to declare taskdef (which you have done) but in order for other ant
tasks to locate your Deploy task you will need to
place the entry into antlib.xml (located on classpath) e.g.
<antlib>
  <typedef name="Deploy"
    classname="org.apache.catalina.ant.DeployTask" />
..............other entries................
</antlib>

Nota Bene: Steve Loughrans book 'Ant in anger' is a must buy for ant newbies

HTH
Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.




> From: marseld.dedgjonaj@ikubinfo.com
> To: user@ant.apache.org
> Subject: antlib.xml could not be found
> Date: Thu, 10 Mar 2011 16:39:41 +0100
> 
> Hello everybody,
> 
> I am new to Ant and more detailed help would be more valuable to me.
> 
> I am trying to use Ant to reload a tomcat application. I write the
build.xml
> file based on "Managing Applications with Ant" section of the
"Professional
> Apache Tomcat" book.
> 
>  
> 
> The Build.xml file:
> 
>  
> 
> <project name="ManageApp" default="compile" basedir=".">
> 
>  
> 
>   <!-- Configure the directory into which the web application is built -->
> 
>   <property name="build"    value="${basedir}/build"/>
> 
>  
> 
>   <!-- Configure the context path for this application -->
> 
>   <property name="path"     value="ikub_MainInstance"/>
> 
>  
> 
>   <!-- Configure properties to access the Manager application -->
> 
>   <property name="url"      value="http://localhost:8080/manager/html"/>
> 
>   <property name="username" value="manager"/>
> 
>   <property name="password" value="manager123+"/>
> 
>  
> 
>   <!-- Configure the custom Ant tasks for the Manager application -->
> 
>   <taskdef name="deploy"
classname="org.apache.catalina.ant.DeployTask"/>
> 
>   <taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>
> 
>   <taskdef name="reload"
classname="org.apache.catalina.ant.ReloadTask"/>
> 
>   <taskdef name="resources"
> classname="org.apache.catalina.ant.ResourcesTask"/>
> 
>   <taskdef name="roles"
classname="org.apache.catalina.ant.RolesTask"/>
> 
>   <taskdef name="start"
classname="org.apache.catalina.ant.StartTask"/>
> 
>   <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>
> 
>   <taskdef name="undeploy"
> classname="org.apache.catalina.ant.UndeployTask"/>
> 
>  
> 
>  
> 
>   <!-- Executable Targets -->
> 
>      <target name="compile" description="Compile web application">
> 
>      </target>
> 
>  
> 
>      <target name="reload" description="Reload web application"
> 
>              depends="compile">
> 
>        <reload url="${url}" username="${username}" password="${password}"
> 
>               path="${path}"/>
> 
>      </target>
> 
>  
> 
>  
> 
>   <target name="deploy" description="Install web application"
> 
>           depends="compile">
> 
>     <deploy url="${url}" username="${username}" password="${password}"
> 
>             path="${path}" war="file:${build}${path}.war"/>
> 
>   </target>
> 
>  
> 
>   <target name="undeploy" description="Remove web application">
> 
>     <undeploy url="${url}" username="${username}" password="${password}"
> 
>             path="${path}"/>
> 
>   </target>
> 
>  
> 
> </project>
> 
>  
> 
>  
> 
> When I run "ant reload -debug" I got this error:
> 
>  
> 
>  
> 
>                 Adding reference: ant.PropertyHelper
> 
> Detected Java version: 1.6 in: /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> 
> Detected OS: Linux
> 
> Adding reference: ant.ComponentHelper
> 
> Setting ro project property: ant.file ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Adding reference: ant.projectHelper
> 
> Adding reference: ant.parsing.context
> 
> Adding reference: ant.targets
> 
> parsing buildfile /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml with
> URI = file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Setting ro project property: ant.project.name -> ManageApp
> 
> Adding reference: ManageApp
> 
> Setting ro project property: ant.file.ManageApp ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Project base dir set to: /mnt/ikub_nutch/AppHelpers/ManageWebApps
> 
> +Target: 
> 
>  +Target: compile
> 
> +Target: reload
> 
> +Target: deploy
> 
> +Target: undeploy
> 
> [antlib:org.apache.tools.ant] Could not load definitions from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> 
> Setting project property: build ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> 
> Setting project property: path -> ikub_MainInstance
> 
> Setting project property: url -> http://localhost:8080/manager/html
> 
> Setting project property: username -> manager
> 
> Setting project property: password -> manager123+
> 
> Class org.apache.catalina.ant.DeployTask loaded from parent loader
> (parentFirst)
> 
> +Datatype deploy org.apache.catalina.ant.DeployTask
> 
> Class org.apache.catalina.ant.ListTask loaded from parent loader
> (parentFirst)
> 
> +Datatype list org.apache.catalina.ant.ListTask
> 
> Class org.apache.catalina.ant.ReloadTask loaded from parent loader
> (parentFirst)
> 
> +Datatype reload org.apache.catalina.ant.ReloadTask
> 
> Class org.apache.catalina.ant.ResourcesTask loaded from parent loader
> (parentFirst)
> 
> Trying to override old definition of datatype resources
> 
> +Datatype resources org.apache.catalina.ant.ResourcesTask
> 
> Class org.apache.catalina.ant.RolesTask loaded from parent loader
> (parentFirst)
> 
> +Datatype roles org.apache.catalina.ant.RolesTask
> 
> Class org.apache.catalina.ant.StartTask loaded from parent loader
> (parentFirst)
> 
> +Datatype start org.apache.catalina.ant.StartTask
> 
> Class org.apache.catalina.ant.StopTask loaded from parent loader
> (parentFirst)
> 
> +Datatype stop org.apache.catalina.ant.StopTask
> 
> Class org.apache.catalina.ant.UndeployTask loaded from parent loader
> (parentFirst)
> 
> +Datatype undeploy org.apache.catalina.ant.UndeployTask
> 
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> 
> Adding reference: ant.executor
> 
> Build sequence for target(s) `reload' is [compile, reload]
> 
> Complete build sequence is [compile, reload, deploy, undeploy, ]
> 
>  
> 
> compile:
> 
>  
> 
> reload:
> 
>    [reload] <html>
> 
>    [reload] <head>
> 
>    [reload] <style>
> 
>  
> 
> ....
> 
>  
> 
>   [reload] </html>
> 
>  
> 
> BUILD FAILED
> 
> <html>
> 
>                 at
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:258)
> 
>                 at
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:146)
> 
>                 at
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> 
>                 at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 
>                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 
>                 at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 
>                 at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
>                 at java.lang.reflect.Method.invoke(Method.java:597)
> 
>                 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.j
> ava: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)
> 
>  
> 
> Total time: 0 seconds
> 
>  
> 
>  
> 
> Please any help for this issue.
> 
>  
> 
> Thanks in advance.
> 
> Best Regards,
> 
> Marseldi
> 
>  
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni
<b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r
Pun&euml;</b>... Vizitoni: <a target="_blank"
href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
style="text-decoration: none;"><img width="165" height="31" border="0"
alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png"
/></span></a></p>
 		 	   		  



<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
<p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>



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


RE: antlib.xml could not be found

Posted by Martin Gainty <mg...@hotmail.com>.
you need to declare taskdef (which you have done) but in order for other ant tasks to locate your Deploy task you will need to
place the entry into antlib.xml (located on classpath) e.g.
<antlib>
  <typedef name="Deploy"
    classname="org.apache.catalina.ant.DeployTask" />
..............other entries................
</antlib>

Nota Bene: Steve Loughrans book 'Ant in anger' is a must buy for ant newbies

HTH
Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: marseld.dedgjonaj@ikubinfo.com
> To: user@ant.apache.org
> Subject: antlib.xml could not be found
> Date: Thu, 10 Mar 2011 16:39:41 +0100
> 
> Hello everybody,
> 
> I am new to Ant and more detailed help would be more valuable to me.
> 
> I am trying to use Ant to reload a tomcat application. I write the build.xml
> file based on "Managing Applications with Ant" section of the "Professional
> Apache Tomcat" book.
> 
>  
> 
> The Build.xml file:
> 
>  
> 
> <project name="ManageApp" default="compile" basedir=".">
> 
>  
> 
>   <!-- Configure the directory into which the web application is built -->
> 
>   <property name="build"    value="${basedir}/build"/>
> 
>  
> 
>   <!-- Configure the context path for this application -->
> 
>   <property name="path"     value="ikub_MainInstance"/>
> 
>  
> 
>   <!-- Configure properties to access the Manager application -->
> 
>   <property name="url"      value="http://localhost:8080/manager/html"/>
> 
>   <property name="username" value="manager"/>
> 
>   <property name="password" value="manager123+"/>
> 
>  
> 
>   <!-- Configure the custom Ant tasks for the Manager application -->
> 
>   <taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>
> 
>   <taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>
> 
>   <taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/>
> 
>   <taskdef name="resources"
> classname="org.apache.catalina.ant.ResourcesTask"/>
> 
>   <taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"/>
> 
>   <taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/>
> 
>   <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>
> 
>   <taskdef name="undeploy"
> classname="org.apache.catalina.ant.UndeployTask"/>
> 
>  
> 
>  
> 
>   <!-- Executable Targets -->
> 
>      <target name="compile" description="Compile web application">
> 
>      </target>
> 
>  
> 
>      <target name="reload" description="Reload web application"
> 
>              depends="compile">
> 
>        <reload url="${url}" username="${username}" password="${password}"
> 
>               path="${path}"/>
> 
>      </target>
> 
>  
> 
>  
> 
>   <target name="deploy" description="Install web application"
> 
>           depends="compile">
> 
>     <deploy url="${url}" username="${username}" password="${password}"
> 
>             path="${path}" war="file:${build}${path}.war"/>
> 
>   </target>
> 
>  
> 
>   <target name="undeploy" description="Remove web application">
> 
>     <undeploy url="${url}" username="${username}" password="${password}"
> 
>             path="${path}"/>
> 
>   </target>
> 
>  
> 
> </project>
> 
>  
> 
>  
> 
> When I run "ant reload -debug" I got this error:
> 
>  
> 
>  
> 
>                 Adding reference: ant.PropertyHelper
> 
> Detected Java version: 1.6 in: /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> 
> Detected OS: Linux
> 
> Adding reference: ant.ComponentHelper
> 
> Setting ro project property: ant.file ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Adding reference: ant.projectHelper
> 
> Adding reference: ant.parsing.context
> 
> Adding reference: ant.targets
> 
> parsing buildfile /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml with
> URI = file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Setting ro project property: ant.project.name -> ManageApp
> 
> Adding reference: ManageApp
> 
> Setting ro project property: ant.file.ManageApp ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Project base dir set to: /mnt/ikub_nutch/AppHelpers/ManageWebApps
> 
> +Target: 
> 
>  +Target: compile
> 
> +Target: reload
> 
> +Target: deploy
> 
> +Target: undeploy
> 
> [antlib:org.apache.tools.ant] Could not load definitions from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> 
> Setting project property: build ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> 
> Setting project property: path -> ikub_MainInstance
> 
> Setting project property: url -> http://localhost:8080/manager/html
> 
> Setting project property: username -> manager
> 
> Setting project property: password -> manager123+
> 
> Class org.apache.catalina.ant.DeployTask loaded from parent loader
> (parentFirst)
> 
> +Datatype deploy org.apache.catalina.ant.DeployTask
> 
> Class org.apache.catalina.ant.ListTask loaded from parent loader
> (parentFirst)
> 
> +Datatype list org.apache.catalina.ant.ListTask
> 
> Class org.apache.catalina.ant.ReloadTask loaded from parent loader
> (parentFirst)
> 
> +Datatype reload org.apache.catalina.ant.ReloadTask
> 
> Class org.apache.catalina.ant.ResourcesTask loaded from parent loader
> (parentFirst)
> 
> Trying to override old definition of datatype resources
> 
> +Datatype resources org.apache.catalina.ant.ResourcesTask
> 
> Class org.apache.catalina.ant.RolesTask loaded from parent loader
> (parentFirst)
> 
> +Datatype roles org.apache.catalina.ant.RolesTask
> 
> Class org.apache.catalina.ant.StartTask loaded from parent loader
> (parentFirst)
> 
> +Datatype start org.apache.catalina.ant.StartTask
> 
> Class org.apache.catalina.ant.StopTask loaded from parent loader
> (parentFirst)
> 
> +Datatype stop org.apache.catalina.ant.StopTask
> 
> Class org.apache.catalina.ant.UndeployTask loaded from parent loader
> (parentFirst)
> 
> +Datatype undeploy org.apache.catalina.ant.UndeployTask
> 
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> 
> Adding reference: ant.executor
> 
> Build sequence for target(s) `reload' is [compile, reload]
> 
> Complete build sequence is [compile, reload, deploy, undeploy, ]
> 
>  
> 
> compile:
> 
>  
> 
> reload:
> 
>    [reload] <html>
> 
>    [reload] <head>
> 
>    [reload] <style>
> 
>  
> 
> ....
> 
>  
> 
>   [reload] </html>
> 
>  
> 
> BUILD FAILED
> 
> <html>
> 
>                 at
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:258)
> 
>                 at
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:146)
> 
>                 at
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> 
>                 at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 
>                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 
>                 at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
>                 at java.lang.reflect.Method.invoke(Method.java:597)
> 
>                 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.j
> ava: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)
> 
>  
> 
> Total time: 0 seconds
> 
>  
> 
>  
> 
> Please any help for this issue.
> 
>  
> 
> Thanks in advance.
> 
> Best Regards,
> 
> Marseldi
> 
>  
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>
 		 	   		  

RE: antlib.xml could not be found

Posted by Marseld Dedgjonaj <ma...@ikubinfo.com>.
Have tried it before and no results :(
I am really stack.

Thanks 

-----Original Message-----
From: Vimil Saju [mailto:vimilsaju@yahoo.com] 
Sent: Friday, March 11, 2011 4:46 PM
To: Ant Users List
Subject: RE: antlib.xml could not be found


Try using '/ikub_MainInstance' as the path in the build.xml instead of
'ikub_MainInstance' and see if that works. :)

--- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: RE: antlib.xml could not be found
> To: "'Ant Users List'" <us...@ant.apache.org>
> Date: Friday, March 11, 2011, 7:19 AM
> If I open http://localhost:8080/manager/html, I see
> "ikub_MainInstance" in
> list of Applications and if I click "Reload" from it works
> but I need to
> reload it by calling a shell script.
> And if I open http://localhost:8080/ikub_MainInstance/
> I see my application
> is working.
> Does this mean that the application has been installed ok?
> 
> Regards,
> Marseld
> 
> 
> -----Original Message-----
> From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> 
> Sent: Friday, March 11, 2011 3:45 PM
> To: Ant Users List
> Subject: RE: antlib.xml could not be found
> 
> The url needs to be "http://localhost:8080/manager". The url to access the
> manager console is different from the url that needs to be
> passed to tomcat
> ant tasks.
> 
> The error below is because the webapp "ikub_MainInstance"
> has not been
> installed.
> 
> Access the manager console and see if the webapp has been
> installed. If it
> is not, you will need to first install the webapp by using
> the deploy task.
> Once the webapp has been deployed it can be reloaded.
> 
> Thanks
> Vimil
> 
> --- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> wrote:
> 
> > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > Subject: RE: antlib.xml could not be found
> > To: "'Ant Users List'" <us...@ant.apache.org>
> > Date: Friday, March 11, 2011, 2:41 AM
> > Thanks Vimil,
> > As I see is not the problem of url because the url to
> > access manager on the
> > browser in my tomcat congifuration is
http://localhost:8080/manager/html.
> > I try to set the url to http://localhost:8080/manager as you suggest and
I
> > got the same error but with a diference when the
> system
> > tries to execute
> > Reload.
> > 
> > The error:
> > 
> > reload:
> >    [reload] FAIL - No context exists for
> > path ikub_MainInstance
> > 
> > BUILD FAILED
> > FAIL - No context exists for path ikub_MainInstance 
> > 
> > If it helps I am using: Fedora 12 and ant 1.7.1
> compiled on
> > October 20 2009.
> > 
> > Best regards,
> > Marseld
> > 
> > 
> > -----Original Message-----
> > From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> > 
> > Sent: Thursday, March 10, 2011 7:07 PM
> > To: Ant Users List
> > Subject: Re: antlib.xml could not be found
> > 
> > 
> > You are right. From the stacktrace I see that ant is
> indeed
> > able to find the
> > tomcat tasks. 
> > 
> > I think you should set the url property to
"http://localhost:8080/manager"
> > instead of "http://localhost:8080/manager/html"
> > 
> > 
> > 
> > --- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> > wrote:
> > 
> > > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > > Subject: antlib.xml could not be found
> > > To: user@ant.apache.org
> > > Date: Thursday, March 10, 2011, 7:39 AM
> > > Hello everybody,
> > > 
> > > I am new to Ant and more detailed help would be
> more
> > > valuable to me.
> > > 
> > > I am trying to use Ant to reload a tomcat
> application.
> > I
> > > write the build.xml
> > > file based on "Managing Applications with Ant"
> section
> > of
> > > the "Professional
> > > Apache Tomcat" book.
> > > 
> > >  
> > > 
> > > The Build.xml file:
> > > 
> > >  
> > > 
> > > <project name="ManageApp" default="compile"
> > > basedir=".">
> > > 
> > >  
> > > 
> > >   <!-- Configure the directory into which the
> web
> > > application is built -->
> > > 
> > >   <property name="build"   
> > > value="${basedir}/build"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure the context path for this
> > > application -->
> > > 
> > >   <property name="path" 
> > >    value="ikub_MainInstance"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure properties to access the
> Manager
> > > application -->
> > > 
> > >   <property name="url"     
> > > value="http://localhost:8080/manager/html"/>
> > > 
> > >   <property name="username"
> value="manager"/>
> > > 
> > >   <property name="password"
> > > value="manager123+"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure the custom Ant tasks for
> the
> > > Manager application -->
> > > 
> > >   <taskdef name="deploy"   
> > >
> classname="org.apache.catalina.ant.DeployTask"/>
> > > 
> > >   <taskdef name="list"     
> > >
> classname="org.apache.catalina.ant.ListTask"/>
> > > 
> > >   <taskdef name="reload"   
> > >
> classname="org.apache.catalina.ant.ReloadTask"/>
> > > 
> > >   <taskdef name="resources"
> > >
> >
> classname="org.apache.catalina.ant.ResourcesTask"/>
> > > 
> > >   <taskdef name="roles" 
> > >
> >
>    classname="org.apache.catalina.ant.RolesTask"/>
> > > 
> > >   <taskdef name="start" 
> > >
> >
>    classname="org.apache.catalina.ant.StartTask"/>
> > > 
> > >   <taskdef name="stop"     
> > >
> classname="org.apache.catalina.ant.StopTask"/>
> > > 
> > >   <taskdef name="undeploy"
> > >
> classname="org.apache.catalina.ant.UndeployTask"/>
> > > 
> > >  
> > > 
> > >  
> > > 
> > >   <!-- Executable Targets -->
> > > 
> > >      <target name="compile"
> > > description="Compile web application">
> > > 
> > >      </target>
> > > 
> > >  
> > > 
> > >      <target name="reload"
> > > description="Reload web application"
> > > 
> > >          
> > >    depends="compile">
> > > 
> > >        <reload url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >              
> > > path="${path}"/>
> > > 
> > >      </target>
> > > 
> > >  
> > > 
> > >  
> > > 
> > >   <target name="deploy" description="Install
> web
> > > application"
> > > 
> > >           depends="compile">
> > > 
> > >     <deploy url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >             path="${path}"
> > > war="file:${build}${path}.war"/>
> > > 
> > >   </target>
> > > 
> > >  
> > > 
> > >   <target name="undeploy" description="Remove
> web
> > > application">
> > > 
> > >     <undeploy url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >            
> > > path="${path}"/>
> > > 
> > >   </target>
> > > 
> > >  
> > > 
> > > </project>
> > > 
> > >  
> > > 
> > >  
> > > 
> > > When I run "ant reload -debug" I got this error:
> > > 
> > >  
> > > 
> > >  
> > > 
> > >                
> > > Adding reference: ant.PropertyHelper
> > > 
> > > Detected Java version: 1.6 in:
> > > /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> > > 
> > > Detected OS: Linux
> > > 
> > > Adding reference: ant.ComponentHelper
> > > 
> > > Setting ro project property: ant.file ->
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Adding reference: ant.projectHelper
> > > 
> > > Adding reference: ant.parsing.context
> > > 
> > > Adding reference: ant.targets
> > > 
> > > parsing buildfile
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > with
> > > URI =
> > >
> >
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Setting ro project property: ant.project.name
> ->
> > > ManageApp
> > > 
> > > Adding reference: ManageApp
> > > 
> > > Setting ro project property: ant.file.ManageApp
> ->
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Project base dir set to:
> > > /mnt/ikub_nutch/AppHelpers/ManageWebApps
> > > 
> > > +Target: 
> > > 
> > >  +Target: compile
> > > 
> > > +Target: reload
> > > 
> > > +Target: deploy
> > > 
> > > +Target: undeploy
> > > 
> > > [antlib:org.apache.tools.ant] Could not load
> > definitions
> > > from resource
> > > org/apache/tools/ant/antlib.xml. It could not be
> > found.
> > > 
> > > Setting project property: build ->
> > > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> > > 
> > > Setting project property: path ->
> > ikub_MainInstance
> > > 
> > > Setting project property: url -> http://localhost:8080/manager/html
> > > 
> > > Setting project property: username -> manager
> > > 
> > > Setting project property: password ->
> manager123+
> > > 
> > > Class org.apache.catalina.ant.DeployTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype deploy
> org.apache.catalina.ant.DeployTask
> > > 
> > > Class org.apache.catalina.ant.ListTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype list org.apache.catalina.ant.ListTask
> > > 
> > > Class org.apache.catalina.ant.ReloadTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype reload
> org.apache.catalina.ant.ReloadTask
> > > 
> > > Class org.apache.catalina.ant.ResourcesTask
> loaded
> > from
> > > parent loader
> > > (parentFirst)
> > > 
> > > Trying to override old definition of datatype
> > resources
> > > 
> > > +Datatype resources
> > org.apache.catalina.ant.ResourcesTask
> > > 
> > > Class org.apache.catalina.ant.RolesTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype roles
> org.apache.catalina.ant.RolesTask
> > > 
> > > Class org.apache.catalina.ant.StartTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype start
> org.apache.catalina.ant.StartTask
> > > 
> > > Class org.apache.catalina.ant.StopTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype stop org.apache.catalina.ant.StopTask
> > > 
> > > Class org.apache.catalina.ant.UndeployTask
> loaded
> > from
> > > parent loader
> > > (parentFirst)
> > > 
> > > +Datatype undeploy
> > org.apache.catalina.ant.UndeployTask
> > > 
> > > Attempting to create object of type
> > > org.apache.tools.ant.helper.DefaultExecutor
> > > 
> > > Adding reference: ant.executor
> > > 
> > > Build sequence for target(s) `reload' is
> [compile,
> > reload]
> > > 
> > > Complete build sequence is [compile, reload,
> deploy,
> > > undeploy, ]
> > > 
> > >  
> > > 
> > > compile:
> > > 
> > >  
> > > 
> > > reload:
> > > 
> > >    [reload] <html>
> > > 
> > >    [reload] <head>
> > > 
> > >    [reload] <style>
> > > 
> > >  
> > > 
> > > ....
> > > 
> > >  
> > > 
> > >   [reload] </html>
> > > 
> > >  
> > > 
> > > BUILD FAILED
> > > 
> > > <html>
> > > 
> > >                 at
> > >
> >
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > > va:258)
> > > 
> > >                 at
> > >
> >
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > > va:146)
> > > 
> > >                 at
> > >
> >
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> > > 
> > >                 at
> > >
> >
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > > 
> > >                 at
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > > 
> > >                 at
> > >
> >
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > > )
> > > 
> > >                 at
> > >
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > > .java:25)
> > > 
> > >                 at
> > > java.lang.reflect.Method.invoke(Method.java:597)
> > > 
> > >                 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.j
> > > ava: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)
> > > 
> > >  
> > > 
> > > Total time: 0 seconds
> > > 
> > >  
> > > 
> > >  
> > > 
> > > Please any help for this issue.
> > > 
> > >  
> > > 
> > > Thanks in advance.
> > > 
> > > Best Regards,
> > > 
> > > Marseldi
> > > 
> > >  
> > > 
> > > 
> > > 
> > > <p class="MsoNormal"><span
> style="color:
> > rgb(31,
> > > 73, 125);">Gjeni <b>Pun&euml;
> > t&euml;
> > > Mir&euml;</b> dhe <b>t&euml;
> > > Mir&euml; p&euml;r
> Pun&euml;</b>...
> > > Vizitoni: <a target="_blank"
> > href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > > <p><a target="_blank" href="http://www.punaime.al/"><span
> > > style="text-decoration: none;"><img
> width="165"
> > > height="31" border="0" alt="punaime"
> > src="http://www.ikub.al/images/punaime.al_small.png"
> > > /></span></a></p>
> > > 
> > 
> > 
> >       
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > 
> > <p class="MsoNormal"><span style="color:
> rgb(31,
> > 73, 125);">Gjeni <b>Pun&euml;
> t&euml;
> > Mir&euml;</b> dhe <b>t&euml;
> > Mir&euml; p&euml;r Pun&euml;</b>...
> > Vizitoni: <a target="_blank"
> href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > <p><a target="_blank" href="http://www.punaime.al/"><span
> > style="text-decoration: none;"><img width="165"
> > height="31" border="0" alt="punaime"
> src="http://www.ikub.al/images/punaime.al_small.png"
> > /></span></a></p>
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > 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
> 
> 
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank"
href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime"
src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 
> 
> 
> ---------------------------------------------------------------------
> 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





<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
<p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>



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


RE: antlib.xml could not be found

Posted by Marseld Dedgjonaj <ma...@ikubinfo.com>.
Hey Vimil,
Thank you very much. 
The solution was in what you suggest. 
I make the url = "http://localhost:8080/manager/" and now is working.
I have tried it before but was trying wit "http://localhost:8080/manager"
without "/" and wasn’t work.

Thanks again.
Best regards,
Marseldi

-----Original Message-----
From: Vimil Saju [mailto:vimilsaju@yahoo.com] 
Sent: Friday, March 11, 2011 4:46 PM
To: Ant Users List
Subject: RE: antlib.xml could not be found


Try using '/ikub_MainInstance' as the path in the build.xml instead of
'ikub_MainInstance' and see if that works. :)

--- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: RE: antlib.xml could not be found
> To: "'Ant Users List'" <us...@ant.apache.org>
> Date: Friday, March 11, 2011, 7:19 AM
> If I open http://localhost:8080/manager/html, I see
> "ikub_MainInstance" in
> list of Applications and if I click "Reload" from it works
> but I need to
> reload it by calling a shell script.
> And if I open http://localhost:8080/ikub_MainInstance/
> I see my application
> is working.
> Does this mean that the application has been installed ok?
> 
> Regards,
> Marseld
> 
> 
> -----Original Message-----
> From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> 
> Sent: Friday, March 11, 2011 3:45 PM
> To: Ant Users List
> Subject: RE: antlib.xml could not be found
> 
> The url needs to be "http://localhost:8080/manager". The url to access the
> manager console is different from the url that needs to be
> passed to tomcat
> ant tasks.
> 
> The error below is because the webapp "ikub_MainInstance"
> has not been
> installed.
> 
> Access the manager console and see if the webapp has been
> installed. If it
> is not, you will need to first install the webapp by using
> the deploy task.
> Once the webapp has been deployed it can be reloaded.
> 
> Thanks
> Vimil
> 
> --- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> wrote:
> 
> > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > Subject: RE: antlib.xml could not be found
> > To: "'Ant Users List'" <us...@ant.apache.org>
> > Date: Friday, March 11, 2011, 2:41 AM
> > Thanks Vimil,
> > As I see is not the problem of url because the url to
> > access manager on the
> > browser in my tomcat congifuration is
http://localhost:8080/manager/html.
> > I try to set the url to http://localhost:8080/manager as you suggest and
I
> > got the same error but with a diference when the
> system
> > tries to execute
> > Reload.
> > 
> > The error:
> > 
> > reload:
> >    [reload] FAIL - No context exists for
> > path ikub_MainInstance
> > 
> > BUILD FAILED
> > FAIL - No context exists for path ikub_MainInstance 
> > 
> > If it helps I am using: Fedora 12 and ant 1.7.1
> compiled on
> > October 20 2009.
> > 
> > Best regards,
> > Marseld
> > 
> > 
> > -----Original Message-----
> > From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> > 
> > Sent: Thursday, March 10, 2011 7:07 PM
> > To: Ant Users List
> > Subject: Re: antlib.xml could not be found
> > 
> > 
> > You are right. From the stacktrace I see that ant is
> indeed
> > able to find the
> > tomcat tasks. 
> > 
> > I think you should set the url property to
"http://localhost:8080/manager"
> > instead of "http://localhost:8080/manager/html"
> > 
> > 
> > 
> > --- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> > wrote:
> > 
> > > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > > Subject: antlib.xml could not be found
> > > To: user@ant.apache.org
> > > Date: Thursday, March 10, 2011, 7:39 AM
> > > Hello everybody,
> > > 
> > > I am new to Ant and more detailed help would be
> more
> > > valuable to me.
> > > 
> > > I am trying to use Ant to reload a tomcat
> application.
> > I
> > > write the build.xml
> > > file based on "Managing Applications with Ant"
> section
> > of
> > > the "Professional
> > > Apache Tomcat" book.
> > > 
> > >  
> > > 
> > > The Build.xml file:
> > > 
> > >  
> > > 
> > > <project name="ManageApp" default="compile"
> > > basedir=".">
> > > 
> > >  
> > > 
> > >   <!-- Configure the directory into which the
> web
> > > application is built -->
> > > 
> > >   <property name="build"   
> > > value="${basedir}/build"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure the context path for this
> > > application -->
> > > 
> > >   <property name="path" 
> > >    value="ikub_MainInstance"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure properties to access the
> Manager
> > > application -->
> > > 
> > >   <property name="url"     
> > > value="http://localhost:8080/manager/html"/>
> > > 
> > >   <property name="username"
> value="manager"/>
> > > 
> > >   <property name="password"
> > > value="manager123+"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure the custom Ant tasks for
> the
> > > Manager application -->
> > > 
> > >   <taskdef name="deploy"   
> > >
> classname="org.apache.catalina.ant.DeployTask"/>
> > > 
> > >   <taskdef name="list"     
> > >
> classname="org.apache.catalina.ant.ListTask"/>
> > > 
> > >   <taskdef name="reload"   
> > >
> classname="org.apache.catalina.ant.ReloadTask"/>
> > > 
> > >   <taskdef name="resources"
> > >
> >
> classname="org.apache.catalina.ant.ResourcesTask"/>
> > > 
> > >   <taskdef name="roles" 
> > >
> >
>    classname="org.apache.catalina.ant.RolesTask"/>
> > > 
> > >   <taskdef name="start" 
> > >
> >
>    classname="org.apache.catalina.ant.StartTask"/>
> > > 
> > >   <taskdef name="stop"     
> > >
> classname="org.apache.catalina.ant.StopTask"/>
> > > 
> > >   <taskdef name="undeploy"
> > >
> classname="org.apache.catalina.ant.UndeployTask"/>
> > > 
> > >  
> > > 
> > >  
> > > 
> > >   <!-- Executable Targets -->
> > > 
> > >      <target name="compile"
> > > description="Compile web application">
> > > 
> > >      </target>
> > > 
> > >  
> > > 
> > >      <target name="reload"
> > > description="Reload web application"
> > > 
> > >          
> > >    depends="compile">
> > > 
> > >        <reload url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >              
> > > path="${path}"/>
> > > 
> > >      </target>
> > > 
> > >  
> > > 
> > >  
> > > 
> > >   <target name="deploy" description="Install
> web
> > > application"
> > > 
> > >           depends="compile">
> > > 
> > >     <deploy url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >             path="${path}"
> > > war="file:${build}${path}.war"/>
> > > 
> > >   </target>
> > > 
> > >  
> > > 
> > >   <target name="undeploy" description="Remove
> web
> > > application">
> > > 
> > >     <undeploy url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >            
> > > path="${path}"/>
> > > 
> > >   </target>
> > > 
> > >  
> > > 
> > > </project>
> > > 
> > >  
> > > 
> > >  
> > > 
> > > When I run "ant reload -debug" I got this error:
> > > 
> > >  
> > > 
> > >  
> > > 
> > >                
> > > Adding reference: ant.PropertyHelper
> > > 
> > > Detected Java version: 1.6 in:
> > > /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> > > 
> > > Detected OS: Linux
> > > 
> > > Adding reference: ant.ComponentHelper
> > > 
> > > Setting ro project property: ant.file ->
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Adding reference: ant.projectHelper
> > > 
> > > Adding reference: ant.parsing.context
> > > 
> > > Adding reference: ant.targets
> > > 
> > > parsing buildfile
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > with
> > > URI =
> > >
> >
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Setting ro project property: ant.project.name
> ->
> > > ManageApp
> > > 
> > > Adding reference: ManageApp
> > > 
> > > Setting ro project property: ant.file.ManageApp
> ->
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Project base dir set to:
> > > /mnt/ikub_nutch/AppHelpers/ManageWebApps
> > > 
> > > +Target: 
> > > 
> > >  +Target: compile
> > > 
> > > +Target: reload
> > > 
> > > +Target: deploy
> > > 
> > > +Target: undeploy
> > > 
> > > [antlib:org.apache.tools.ant] Could not load
> > definitions
> > > from resource
> > > org/apache/tools/ant/antlib.xml. It could not be
> > found.
> > > 
> > > Setting project property: build ->
> > > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> > > 
> > > Setting project property: path ->
> > ikub_MainInstance
> > > 
> > > Setting project property: url -> http://localhost:8080/manager/html
> > > 
> > > Setting project property: username -> manager
> > > 
> > > Setting project property: password ->
> manager123+
> > > 
> > > Class org.apache.catalina.ant.DeployTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype deploy
> org.apache.catalina.ant.DeployTask
> > > 
> > > Class org.apache.catalina.ant.ListTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype list org.apache.catalina.ant.ListTask
> > > 
> > > Class org.apache.catalina.ant.ReloadTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype reload
> org.apache.catalina.ant.ReloadTask
> > > 
> > > Class org.apache.catalina.ant.ResourcesTask
> loaded
> > from
> > > parent loader
> > > (parentFirst)
> > > 
> > > Trying to override old definition of datatype
> > resources
> > > 
> > > +Datatype resources
> > org.apache.catalina.ant.ResourcesTask
> > > 
> > > Class org.apache.catalina.ant.RolesTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype roles
> org.apache.catalina.ant.RolesTask
> > > 
> > > Class org.apache.catalina.ant.StartTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype start
> org.apache.catalina.ant.StartTask
> > > 
> > > Class org.apache.catalina.ant.StopTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype stop org.apache.catalina.ant.StopTask
> > > 
> > > Class org.apache.catalina.ant.UndeployTask
> loaded
> > from
> > > parent loader
> > > (parentFirst)
> > > 
> > > +Datatype undeploy
> > org.apache.catalina.ant.UndeployTask
> > > 
> > > Attempting to create object of type
> > > org.apache.tools.ant.helper.DefaultExecutor
> > > 
> > > Adding reference: ant.executor
> > > 
> > > Build sequence for target(s) `reload' is
> [compile,
> > reload]
> > > 
> > > Complete build sequence is [compile, reload,
> deploy,
> > > undeploy, ]
> > > 
> > >  
> > > 
> > > compile:
> > > 
> > >  
> > > 
> > > reload:
> > > 
> > >    [reload] <html>
> > > 
> > >    [reload] <head>
> > > 
> > >    [reload] <style>
> > > 
> > >  
> > > 
> > > ....
> > > 
> > >  
> > > 
> > >   [reload] </html>
> > > 
> > >  
> > > 
> > > BUILD FAILED
> > > 
> > > <html>
> > > 
> > >                 at
> > >
> >
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > > va:258)
> > > 
> > >                 at
> > >
> >
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > > va:146)
> > > 
> > >                 at
> > >
> >
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> > > 
> > >                 at
> > >
> >
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > > 
> > >                 at
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > > 
> > >                 at
> > >
> >
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > > )
> > > 
> > >                 at
> > >
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > > .java:25)
> > > 
> > >                 at
> > > java.lang.reflect.Method.invoke(Method.java:597)
> > > 
> > >                 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.j
> > > ava: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)
> > > 
> > >  
> > > 
> > > Total time: 0 seconds
> > > 
> > >  
> > > 
> > >  
> > > 
> > > Please any help for this issue.
> > > 
> > >  
> > > 
> > > Thanks in advance.
> > > 
> > > Best Regards,
> > > 
> > > Marseldi
> > > 
> > >  
> > > 
> > > 
> > > 
> > > <p class="MsoNormal"><span
> style="color:
> > rgb(31,
> > > 73, 125);">Gjeni <b>Pun&euml;
> > t&euml;
> > > Mir&euml;</b> dhe <b>t&euml;
> > > Mir&euml; p&euml;r
> Pun&euml;</b>...
> > > Vizitoni: <a target="_blank"
> > href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > > <p><a target="_blank" href="http://www.punaime.al/"><span
> > > style="text-decoration: none;"><img
> width="165"
> > > height="31" border="0" alt="punaime"
> > src="http://www.ikub.al/images/punaime.al_small.png"
> > > /></span></a></p>
> > > 
> > 
> > 
> >       
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > 
> > <p class="MsoNormal"><span style="color:
> rgb(31,
> > 73, 125);">Gjeni <b>Pun&euml;
> t&euml;
> > Mir&euml;</b> dhe <b>t&euml;
> > Mir&euml; p&euml;r Pun&euml;</b>...
> > Vizitoni: <a target="_blank"
> href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > <p><a target="_blank" href="http://www.punaime.al/"><span
> > style="text-decoration: none;"><img width="165"
> > height="31" border="0" alt="punaime"
> src="http://www.ikub.al/images/punaime.al_small.png"
> > /></span></a></p>
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > 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
> 
> 
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank"
href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime"
src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 
> 
> 
> ---------------------------------------------------------------------
> 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





<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
<p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>



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


RE: antlib.xml could not be found

Posted by Vimil Saju <vi...@yahoo.com>.
Try using '/ikub_MainInstance' as the path in the build.xml instead of 'ikub_MainInstance' and see if that works. :)

--- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com> wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: RE: antlib.xml could not be found
> To: "'Ant Users List'" <us...@ant.apache.org>
> Date: Friday, March 11, 2011, 7:19 AM
> If I open http://localhost:8080/manager/html, I see
> "ikub_MainInstance" in
> list of Applications and if I click "Reload" from it works
> but I need to
> reload it by calling a shell script.
> And if I open http://localhost:8080/ikub_MainInstance/
> I see my application
> is working.
> Does this mean that the application has been installed ok?
> 
> Regards,
> Marseld
> 
> 
> -----Original Message-----
> From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> 
> Sent: Friday, March 11, 2011 3:45 PM
> To: Ant Users List
> Subject: RE: antlib.xml could not be found
> 
> The url needs to be "http://localhost:8080/manager". The url to access the
> manager console is different from the url that needs to be
> passed to tomcat
> ant tasks.
> 
> The error below is because the webapp "ikub_MainInstance"
> has not been
> installed.
> 
> Access the manager console and see if the webapp has been
> installed. If it
> is not, you will need to first install the webapp by using
> the deploy task.
> Once the webapp has been deployed it can be reloaded.
> 
> Thanks
> Vimil
> 
> --- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> wrote:
> 
> > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > Subject: RE: antlib.xml could not be found
> > To: "'Ant Users List'" <us...@ant.apache.org>
> > Date: Friday, March 11, 2011, 2:41 AM
> > Thanks Vimil,
> > As I see is not the problem of url because the url to
> > access manager on the
> > browser in my tomcat congifuration is http://localhost:8080/manager/html.
> > I try to set the url to http://localhost:8080/manager as you suggest and I
> > got the same error but with a diference when the
> system
> > tries to execute
> > Reload.
> > 
> > The error:
> > 
> > reload:
> >    [reload] FAIL - No context exists for
> > path ikub_MainInstance
> > 
> > BUILD FAILED
> > FAIL - No context exists for path ikub_MainInstance 
> > 
> > If it helps I am using: Fedora 12 and ant 1.7.1
> compiled on
> > October 20 2009.
> > 
> > Best regards,
> > Marseld
> > 
> > 
> > -----Original Message-----
> > From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> > 
> > Sent: Thursday, March 10, 2011 7:07 PM
> > To: Ant Users List
> > Subject: Re: antlib.xml could not be found
> > 
> > 
> > You are right. From the stacktrace I see that ant is
> indeed
> > able to find the
> > tomcat tasks. 
> > 
> > I think you should set the url property to "http://localhost:8080/manager"
> > instead of "http://localhost:8080/manager/html"
> > 
> > 
> > 
> > --- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> > wrote:
> > 
> > > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > > Subject: antlib.xml could not be found
> > > To: user@ant.apache.org
> > > Date: Thursday, March 10, 2011, 7:39 AM
> > > Hello everybody,
> > > 
> > > I am new to Ant and more detailed help would be
> more
> > > valuable to me.
> > > 
> > > I am trying to use Ant to reload a tomcat
> application.
> > I
> > > write the build.xml
> > > file based on "Managing Applications with Ant"
> section
> > of
> > > the "Professional
> > > Apache Tomcat" book.
> > > 
> > >  
> > > 
> > > The Build.xml file:
> > > 
> > >  
> > > 
> > > <project name="ManageApp" default="compile"
> > > basedir=".">
> > > 
> > >  
> > > 
> > >   <!-- Configure the directory into which the
> web
> > > application is built -->
> > > 
> > >   <property name="build"   
> > > value="${basedir}/build"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure the context path for this
> > > application -->
> > > 
> > >   <property name="path" 
> > >    value="ikub_MainInstance"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure properties to access the
> Manager
> > > application -->
> > > 
> > >   <property name="url"     
> > > value="http://localhost:8080/manager/html"/>
> > > 
> > >   <property name="username"
> value="manager"/>
> > > 
> > >   <property name="password"
> > > value="manager123+"/>
> > > 
> > >  
> > > 
> > >   <!-- Configure the custom Ant tasks for
> the
> > > Manager application -->
> > > 
> > >   <taskdef name="deploy"   
> > >
> classname="org.apache.catalina.ant.DeployTask"/>
> > > 
> > >   <taskdef name="list"     
> > >
> classname="org.apache.catalina.ant.ListTask"/>
> > > 
> > >   <taskdef name="reload"   
> > >
> classname="org.apache.catalina.ant.ReloadTask"/>
> > > 
> > >   <taskdef name="resources"
> > >
> >
> classname="org.apache.catalina.ant.ResourcesTask"/>
> > > 
> > >   <taskdef name="roles" 
> > >
> >
>    classname="org.apache.catalina.ant.RolesTask"/>
> > > 
> > >   <taskdef name="start" 
> > >
> >
>    classname="org.apache.catalina.ant.StartTask"/>
> > > 
> > >   <taskdef name="stop"     
> > >
> classname="org.apache.catalina.ant.StopTask"/>
> > > 
> > >   <taskdef name="undeploy"
> > >
> classname="org.apache.catalina.ant.UndeployTask"/>
> > > 
> > >  
> > > 
> > >  
> > > 
> > >   <!-- Executable Targets -->
> > > 
> > >      <target name="compile"
> > > description="Compile web application">
> > > 
> > >      </target>
> > > 
> > >  
> > > 
> > >      <target name="reload"
> > > description="Reload web application"
> > > 
> > >          
> > >    depends="compile">
> > > 
> > >        <reload url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >              
> > > path="${path}"/>
> > > 
> > >      </target>
> > > 
> > >  
> > > 
> > >  
> > > 
> > >   <target name="deploy" description="Install
> web
> > > application"
> > > 
> > >           depends="compile">
> > > 
> > >     <deploy url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >             path="${path}"
> > > war="file:${build}${path}.war"/>
> > > 
> > >   </target>
> > > 
> > >  
> > > 
> > >   <target name="undeploy" description="Remove
> web
> > > application">
> > > 
> > >     <undeploy url="${url}"
> > > username="${username}" password="${password}"
> > > 
> > >            
> > > path="${path}"/>
> > > 
> > >   </target>
> > > 
> > >  
> > > 
> > > </project>
> > > 
> > >  
> > > 
> > >  
> > > 
> > > When I run "ant reload -debug" I got this error:
> > > 
> > >  
> > > 
> > >  
> > > 
> > >                
> > > Adding reference: ant.PropertyHelper
> > > 
> > > Detected Java version: 1.6 in:
> > > /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> > > 
> > > Detected OS: Linux
> > > 
> > > Adding reference: ant.ComponentHelper
> > > 
> > > Setting ro project property: ant.file ->
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Adding reference: ant.projectHelper
> > > 
> > > Adding reference: ant.parsing.context
> > > 
> > > Adding reference: ant.targets
> > > 
> > > parsing buildfile
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > with
> > > URI =
> > >
> >
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Setting ro project property: ant.project.name
> ->
> > > ManageApp
> > > 
> > > Adding reference: ManageApp
> > > 
> > > Setting ro project property: ant.file.ManageApp
> ->
> > >
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > > 
> > > Project base dir set to:
> > > /mnt/ikub_nutch/AppHelpers/ManageWebApps
> > > 
> > > +Target: 
> > > 
> > >  +Target: compile
> > > 
> > > +Target: reload
> > > 
> > > +Target: deploy
> > > 
> > > +Target: undeploy
> > > 
> > > [antlib:org.apache.tools.ant] Could not load
> > definitions
> > > from resource
> > > org/apache/tools/ant/antlib.xml. It could not be
> > found.
> > > 
> > > Setting project property: build ->
> > > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> > > 
> > > Setting project property: path ->
> > ikub_MainInstance
> > > 
> > > Setting project property: url -> http://localhost:8080/manager/html
> > > 
> > > Setting project property: username -> manager
> > > 
> > > Setting project property: password ->
> manager123+
> > > 
> > > Class org.apache.catalina.ant.DeployTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype deploy
> org.apache.catalina.ant.DeployTask
> > > 
> > > Class org.apache.catalina.ant.ListTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype list org.apache.catalina.ant.ListTask
> > > 
> > > Class org.apache.catalina.ant.ReloadTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype reload
> org.apache.catalina.ant.ReloadTask
> > > 
> > > Class org.apache.catalina.ant.ResourcesTask
> loaded
> > from
> > > parent loader
> > > (parentFirst)
> > > 
> > > Trying to override old definition of datatype
> > resources
> > > 
> > > +Datatype resources
> > org.apache.catalina.ant.ResourcesTask
> > > 
> > > Class org.apache.catalina.ant.RolesTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype roles
> org.apache.catalina.ant.RolesTask
> > > 
> > > Class org.apache.catalina.ant.StartTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype start
> org.apache.catalina.ant.StartTask
> > > 
> > > Class org.apache.catalina.ant.StopTask loaded
> from
> > parent
> > > loader
> > > (parentFirst)
> > > 
> > > +Datatype stop org.apache.catalina.ant.StopTask
> > > 
> > > Class org.apache.catalina.ant.UndeployTask
> loaded
> > from
> > > parent loader
> > > (parentFirst)
> > > 
> > > +Datatype undeploy
> > org.apache.catalina.ant.UndeployTask
> > > 
> > > Attempting to create object of type
> > > org.apache.tools.ant.helper.DefaultExecutor
> > > 
> > > Adding reference: ant.executor
> > > 
> > > Build sequence for target(s) `reload' is
> [compile,
> > reload]
> > > 
> > > Complete build sequence is [compile, reload,
> deploy,
> > > undeploy, ]
> > > 
> > >  
> > > 
> > > compile:
> > > 
> > >  
> > > 
> > > reload:
> > > 
> > >    [reload] <html>
> > > 
> > >    [reload] <head>
> > > 
> > >    [reload] <style>
> > > 
> > >  
> > > 
> > > ....
> > > 
> > >  
> > > 
> > >   [reload] </html>
> > > 
> > >  
> > > 
> > > BUILD FAILED
> > > 
> > > <html>
> > > 
> > >                 at
> > >
> >
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > > va:258)
> > > 
> > >                 at
> > >
> >
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > > va:146)
> > > 
> > >                 at
> > >
> >
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> > > 
> > >                 at
> > >
> >
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > > 
> > >                 at
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > > 
> > >                 at
> > >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > > )
> > > 
> > >                 at
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > > .java:25)
> > > 
> > >                 at
> > > java.lang.reflect.Method.invoke(Method.java:597)
> > > 
> > >                 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.j
> > > ava: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)
> > > 
> > >  
> > > 
> > > Total time: 0 seconds
> > > 
> > >  
> > > 
> > >  
> > > 
> > > Please any help for this issue.
> > > 
> > >  
> > > 
> > > Thanks in advance.
> > > 
> > > Best Regards,
> > > 
> > > Marseldi
> > > 
> > >  
> > > 
> > > 
> > > 
> > > <p class="MsoNormal"><span
> style="color:
> > rgb(31,
> > > 73, 125);">Gjeni <b>Pun&euml;
> > t&euml;
> > > Mir&euml;</b> dhe <b>t&euml;
> > > Mir&euml; p&euml;r
> Pun&euml;</b>...
> > > Vizitoni: <a target="_blank"
> > href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > > <p><a target="_blank" href="http://www.punaime.al/"><span
> > > style="text-decoration: none;"><img
> width="165"
> > > height="31" border="0" alt="punaime"
> > src="http://www.ikub.al/images/punaime.al_small.png"
> > > /></span></a></p>
> > > 
> > 
> > 
> >       
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > 
> > <p class="MsoNormal"><span style="color:
> rgb(31,
> > 73, 125);">Gjeni <b>Pun&euml;
> t&euml;
> > Mir&euml;</b> dhe <b>t&euml;
> > Mir&euml; p&euml;r Pun&euml;</b>...
> > Vizitoni: <a target="_blank"
> href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > <p><a target="_blank" href="http://www.punaime.al/"><span
> > style="text-decoration: none;"><img width="165"
> > height="31" border="0" alt="punaime"
> src="http://www.ikub.al/images/punaime.al_small.png"
> > /></span></a></p>
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > 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
> 
> 
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: antlib.xml could not be found

Posted by Marseld Dedgjonaj <ma...@ikubinfo.com>.
If I open http://localhost:8080/manager/html, I see "ikub_MainInstance" in
list of Applications and if I click "Reload" from it works but I need to
reload it by calling a shell script.
And if I open http://localhost:8080/ikub_MainInstance/ I see my application
is working.
Does this mean that the application has been installed ok?

Regards,
Marseld


-----Original Message-----
From: Vimil Saju [mailto:vimilsaju@yahoo.com] 
Sent: Friday, March 11, 2011 3:45 PM
To: Ant Users List
Subject: RE: antlib.xml could not be found

The url needs to be "http://localhost:8080/manager". The url to access the
manager console is different from the url that needs to be passed to tomcat
ant tasks.

The error below is because the webapp "ikub_MainInstance" has not been
installed.

Access the manager console and see if the webapp has been installed. If it
is not, you will need to first install the webapp by using the deploy task.
Once the webapp has been deployed it can be reloaded.

Thanks
Vimil

--- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: RE: antlib.xml could not be found
> To: "'Ant Users List'" <us...@ant.apache.org>
> Date: Friday, March 11, 2011, 2:41 AM
> Thanks Vimil,
> As I see is not the problem of url because the url to
> access manager on the
> browser in my tomcat congifuration is http://localhost:8080/manager/html.
> I try to set the url to http://localhost:8080/manager as you suggest and I
> got the same error but with a diference when the system
> tries to execute
> Reload.
> 
> The error:
> 
> reload:
>    [reload] FAIL - No context exists for
> path ikub_MainInstance
> 
> BUILD FAILED
> FAIL - No context exists for path ikub_MainInstance 
> 
> If it helps I am using: Fedora 12 and ant 1.7.1 compiled on
> October 20 2009.
> 
> Best regards,
> Marseld
> 
> 
> -----Original Message-----
> From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> 
> Sent: Thursday, March 10, 2011 7:07 PM
> To: Ant Users List
> Subject: Re: antlib.xml could not be found
> 
> 
> You are right. From the stacktrace I see that ant is indeed
> able to find the
> tomcat tasks. 
> 
> I think you should set the url property to "http://localhost:8080/manager"
> instead of "http://localhost:8080/manager/html"
> 
> 
> 
> --- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> wrote:
> 
> > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > Subject: antlib.xml could not be found
> > To: user@ant.apache.org
> > Date: Thursday, March 10, 2011, 7:39 AM
> > Hello everybody,
> > 
> > I am new to Ant and more detailed help would be more
> > valuable to me.
> > 
> > I am trying to use Ant to reload a tomcat application.
> I
> > write the build.xml
> > file based on "Managing Applications with Ant" section
> of
> > the "Professional
> > Apache Tomcat" book.
> > 
> >  
> > 
> > The Build.xml file:
> > 
> >  
> > 
> > <project name="ManageApp" default="compile"
> > basedir=".">
> > 
> >  
> > 
> >   <!-- Configure the directory into which the web
> > application is built -->
> > 
> >   <property name="build"   
> > value="${basedir}/build"/>
> > 
> >  
> > 
> >   <!-- Configure the context path for this
> > application -->
> > 
> >   <property name="path" 
> >    value="ikub_MainInstance"/>
> > 
> >  
> > 
> >   <!-- Configure properties to access the Manager
> > application -->
> > 
> >   <property name="url"     
> > value="http://localhost:8080/manager/html"/>
> > 
> >   <property name="username" value="manager"/>
> > 
> >   <property name="password"
> > value="manager123+"/>
> > 
> >  
> > 
> >   <!-- Configure the custom Ant tasks for the
> > Manager application -->
> > 
> >   <taskdef name="deploy"   
> > classname="org.apache.catalina.ant.DeployTask"/>
> > 
> >   <taskdef name="list"     
> > classname="org.apache.catalina.ant.ListTask"/>
> > 
> >   <taskdef name="reload"   
> > classname="org.apache.catalina.ant.ReloadTask"/>
> > 
> >   <taskdef name="resources"
> >
> classname="org.apache.catalina.ant.ResourcesTask"/>
> > 
> >   <taskdef name="roles" 
> >
>    classname="org.apache.catalina.ant.RolesTask"/>
> > 
> >   <taskdef name="start" 
> >
>    classname="org.apache.catalina.ant.StartTask"/>
> > 
> >   <taskdef name="stop"     
> > classname="org.apache.catalina.ant.StopTask"/>
> > 
> >   <taskdef name="undeploy"
> > classname="org.apache.catalina.ant.UndeployTask"/>
> > 
> >  
> > 
> >  
> > 
> >   <!-- Executable Targets -->
> > 
> >      <target name="compile"
> > description="Compile web application">
> > 
> >      </target>
> > 
> >  
> > 
> >      <target name="reload"
> > description="Reload web application"
> > 
> >          
> >    depends="compile">
> > 
> >        <reload url="${url}"
> > username="${username}" password="${password}"
> > 
> >              
> > path="${path}"/>
> > 
> >      </target>
> > 
> >  
> > 
> >  
> > 
> >   <target name="deploy" description="Install web
> > application"
> > 
> >           depends="compile">
> > 
> >     <deploy url="${url}"
> > username="${username}" password="${password}"
> > 
> >             path="${path}"
> > war="file:${build}${path}.war"/>
> > 
> >   </target>
> > 
> >  
> > 
> >   <target name="undeploy" description="Remove web
> > application">
> > 
> >     <undeploy url="${url}"
> > username="${username}" password="${password}"
> > 
> >            
> > path="${path}"/>
> > 
> >   </target>
> > 
> >  
> > 
> > </project>
> > 
> >  
> > 
> >  
> > 
> > When I run "ant reload -debug" I got this error:
> > 
> >  
> > 
> >  
> > 
> >                
> > Adding reference: ant.PropertyHelper
> > 
> > Detected Java version: 1.6 in:
> > /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> > 
> > Detected OS: Linux
> > 
> > Adding reference: ant.ComponentHelper
> > 
> > Setting ro project property: ant.file ->
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > 
> > Adding reference: ant.projectHelper
> > 
> > Adding reference: ant.parsing.context
> > 
> > Adding reference: ant.targets
> > 
> > parsing buildfile
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> with
> > URI =
> >
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > 
> > Setting ro project property: ant.project.name ->
> > ManageApp
> > 
> > Adding reference: ManageApp
> > 
> > Setting ro project property: ant.file.ManageApp ->
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > 
> > Project base dir set to:
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps
> > 
> > +Target: 
> > 
> >  +Target: compile
> > 
> > +Target: reload
> > 
> > +Target: deploy
> > 
> > +Target: undeploy
> > 
> > [antlib:org.apache.tools.ant] Could not load
> definitions
> > from resource
> > org/apache/tools/ant/antlib.xml. It could not be
> found.
> > 
> > Setting project property: build ->
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> > 
> > Setting project property: path ->
> ikub_MainInstance
> > 
> > Setting project property: url -> http://localhost:8080/manager/html
> > 
> > Setting project property: username -> manager
> > 
> > Setting project property: password -> manager123+
> > 
> > Class org.apache.catalina.ant.DeployTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype deploy org.apache.catalina.ant.DeployTask
> > 
> > Class org.apache.catalina.ant.ListTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype list org.apache.catalina.ant.ListTask
> > 
> > Class org.apache.catalina.ant.ReloadTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype reload org.apache.catalina.ant.ReloadTask
> > 
> > Class org.apache.catalina.ant.ResourcesTask loaded
> from
> > parent loader
> > (parentFirst)
> > 
> > Trying to override old definition of datatype
> resources
> > 
> > +Datatype resources
> org.apache.catalina.ant.ResourcesTask
> > 
> > Class org.apache.catalina.ant.RolesTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype roles org.apache.catalina.ant.RolesTask
> > 
> > Class org.apache.catalina.ant.StartTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype start org.apache.catalina.ant.StartTask
> > 
> > Class org.apache.catalina.ant.StopTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype stop org.apache.catalina.ant.StopTask
> > 
> > Class org.apache.catalina.ant.UndeployTask loaded
> from
> > parent loader
> > (parentFirst)
> > 
> > +Datatype undeploy
> org.apache.catalina.ant.UndeployTask
> > 
> > Attempting to create object of type
> > org.apache.tools.ant.helper.DefaultExecutor
> > 
> > Adding reference: ant.executor
> > 
> > Build sequence for target(s) `reload' is [compile,
> reload]
> > 
> > Complete build sequence is [compile, reload, deploy,
> > undeploy, ]
> > 
> >  
> > 
> > compile:
> > 
> >  
> > 
> > reload:
> > 
> >    [reload] <html>
> > 
> >    [reload] <head>
> > 
> >    [reload] <style>
> > 
> >  
> > 
> > ....
> > 
> >  
> > 
> >   [reload] </html>
> > 
> >  
> > 
> > BUILD FAILED
> > 
> > <html>
> > 
> >                 at
> >
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > va:258)
> > 
> >                 at
> >
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > va:146)
> > 
> >                 at
> >
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> > 
> >                 at
> >
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > 
> >                 at
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > 
> >                 at
> >
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> > 
> >                 at
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > 
> >                 at
> > java.lang.reflect.Method.invoke(Method.java:597)
> > 
> >                 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.j
> > ava: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)
> > 
> >  
> > 
> > Total time: 0 seconds
> > 
> >  
> > 
> >  
> > 
> > Please any help for this issue.
> > 
> >  
> > 
> > Thanks in advance.
> > 
> > Best Regards,
> > 
> > Marseldi
> > 
> >  
> > 
> > 
> > 
> > <p class="MsoNormal"><span style="color:
> rgb(31,
> > 73, 125);">Gjeni <b>Pun&euml;
> t&euml;
> > Mir&euml;</b> dhe <b>t&euml;
> > Mir&euml; p&euml;r Pun&euml;</b>...
> > Vizitoni: <a target="_blank"
> href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > <p><a target="_blank" href="http://www.punaime.al/"><span
> > style="text-decoration: none;"><img width="165"
> > height="31" border="0" alt="punaime"
> src="http://www.ikub.al/images/punaime.al_small.png"
> > /></span></a></p>
> > 
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank"
href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime"
src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 
> 
> 
> ---------------------------------------------------------------------
> 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





<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
<p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>



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


RE: antlib.xml could not be found

Posted by Vimil Saju <vi...@yahoo.com>.
The url needs to be "http://localhost:8080/manager". The url to access the manager console is different from the url that needs to be passed to tomcat ant tasks.

The error below is because the webapp "ikub_MainInstance" has not been installed.

Access the manager console and see if the webapp has been installed. If it is not, you will need to first install the webapp by using the deploy task. Once the webapp has been deployed it can be reloaded.

Thanks
Vimil

--- On Fri, 3/11/11, Marseld Dedgjonaj <ma...@ikubinfo.com> wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: RE: antlib.xml could not be found
> To: "'Ant Users List'" <us...@ant.apache.org>
> Date: Friday, March 11, 2011, 2:41 AM
> Thanks Vimil,
> As I see is not the problem of url because the url to
> access manager on the
> browser in my tomcat congifuration is http://localhost:8080/manager/html.
> I try to set the url to http://localhost:8080/manager as you suggest and I
> got the same error but with a diference when the system
> tries to execute
> Reload.
> 
> The error:
> 
> reload:
>    [reload] FAIL - No context exists for
> path ikub_MainInstance
> 
> BUILD FAILED
> FAIL - No context exists for path ikub_MainInstance 
> 
> If it helps I am using: Fedora 12 and ant 1.7.1 compiled on
> October 20 2009.
> 
> Best regards,
> Marseld
> 
> 
> -----Original Message-----
> From: Vimil Saju [mailto:vimilsaju@yahoo.com]
> 
> Sent: Thursday, March 10, 2011 7:07 PM
> To: Ant Users List
> Subject: Re: antlib.xml could not be found
> 
> 
> You are right. From the stacktrace I see that ant is indeed
> able to find the
> tomcat tasks. 
> 
> I think you should set the url property to "http://localhost:8080/manager"
> instead of "http://localhost:8080/manager/html"
> 
> 
> 
> --- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
> wrote:
> 
> > From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> > Subject: antlib.xml could not be found
> > To: user@ant.apache.org
> > Date: Thursday, March 10, 2011, 7:39 AM
> > Hello everybody,
> > 
> > I am new to Ant and more detailed help would be more
> > valuable to me.
> > 
> > I am trying to use Ant to reload a tomcat application.
> I
> > write the build.xml
> > file based on "Managing Applications with Ant" section
> of
> > the "Professional
> > Apache Tomcat" book.
> > 
> >  
> > 
> > The Build.xml file:
> > 
> >  
> > 
> > <project name="ManageApp" default="compile"
> > basedir=".">
> > 
> >  
> > 
> >   <!-- Configure the directory into which the web
> > application is built -->
> > 
> >   <property name="build"   
> > value="${basedir}/build"/>
> > 
> >  
> > 
> >   <!-- Configure the context path for this
> > application -->
> > 
> >   <property name="path" 
> >    value="ikub_MainInstance"/>
> > 
> >  
> > 
> >   <!-- Configure properties to access the Manager
> > application -->
> > 
> >   <property name="url"     
> > value="http://localhost:8080/manager/html"/>
> > 
> >   <property name="username" value="manager"/>
> > 
> >   <property name="password"
> > value="manager123+"/>
> > 
> >  
> > 
> >   <!-- Configure the custom Ant tasks for the
> > Manager application -->
> > 
> >   <taskdef name="deploy"   
> > classname="org.apache.catalina.ant.DeployTask"/>
> > 
> >   <taskdef name="list"     
> > classname="org.apache.catalina.ant.ListTask"/>
> > 
> >   <taskdef name="reload"   
> > classname="org.apache.catalina.ant.ReloadTask"/>
> > 
> >   <taskdef name="resources"
> >
> classname="org.apache.catalina.ant.ResourcesTask"/>
> > 
> >   <taskdef name="roles" 
> >
>    classname="org.apache.catalina.ant.RolesTask"/>
> > 
> >   <taskdef name="start" 
> >
>    classname="org.apache.catalina.ant.StartTask"/>
> > 
> >   <taskdef name="stop"     
> > classname="org.apache.catalina.ant.StopTask"/>
> > 
> >   <taskdef name="undeploy"
> > classname="org.apache.catalina.ant.UndeployTask"/>
> > 
> >  
> > 
> >  
> > 
> >   <!-- Executable Targets -->
> > 
> >      <target name="compile"
> > description="Compile web application">
> > 
> >      </target>
> > 
> >  
> > 
> >      <target name="reload"
> > description="Reload web application"
> > 
> >          
> >    depends="compile">
> > 
> >        <reload url="${url}"
> > username="${username}" password="${password}"
> > 
> >              
> > path="${path}"/>
> > 
> >      </target>
> > 
> >  
> > 
> >  
> > 
> >   <target name="deploy" description="Install web
> > application"
> > 
> >           depends="compile">
> > 
> >     <deploy url="${url}"
> > username="${username}" password="${password}"
> > 
> >             path="${path}"
> > war="file:${build}${path}.war"/>
> > 
> >   </target>
> > 
> >  
> > 
> >   <target name="undeploy" description="Remove web
> > application">
> > 
> >     <undeploy url="${url}"
> > username="${username}" password="${password}"
> > 
> >            
> > path="${path}"/>
> > 
> >   </target>
> > 
> >  
> > 
> > </project>
> > 
> >  
> > 
> >  
> > 
> > When I run "ant reload -debug" I got this error:
> > 
> >  
> > 
> >  
> > 
> >                
> > Adding reference: ant.PropertyHelper
> > 
> > Detected Java version: 1.6 in:
> > /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> > 
> > Detected OS: Linux
> > 
> > Adding reference: ant.ComponentHelper
> > 
> > Setting ro project property: ant.file ->
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > 
> > Adding reference: ant.projectHelper
> > 
> > Adding reference: ant.parsing.context
> > 
> > Adding reference: ant.targets
> > 
> > parsing buildfile
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> with
> > URI =
> >
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > 
> > Setting ro project property: ant.project.name ->
> > ManageApp
> > 
> > Adding reference: ManageApp
> > 
> > Setting ro project property: ant.file.ManageApp ->
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> > 
> > Project base dir set to:
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps
> > 
> > +Target: 
> > 
> >  +Target: compile
> > 
> > +Target: reload
> > 
> > +Target: deploy
> > 
> > +Target: undeploy
> > 
> > [antlib:org.apache.tools.ant] Could not load
> definitions
> > from resource
> > org/apache/tools/ant/antlib.xml. It could not be
> found.
> > 
> > Setting project property: build ->
> > /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> > 
> > Setting project property: path ->
> ikub_MainInstance
> > 
> > Setting project property: url -> http://localhost:8080/manager/html
> > 
> > Setting project property: username -> manager
> > 
> > Setting project property: password -> manager123+
> > 
> > Class org.apache.catalina.ant.DeployTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype deploy org.apache.catalina.ant.DeployTask
> > 
> > Class org.apache.catalina.ant.ListTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype list org.apache.catalina.ant.ListTask
> > 
> > Class org.apache.catalina.ant.ReloadTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype reload org.apache.catalina.ant.ReloadTask
> > 
> > Class org.apache.catalina.ant.ResourcesTask loaded
> from
> > parent loader
> > (parentFirst)
> > 
> > Trying to override old definition of datatype
> resources
> > 
> > +Datatype resources
> org.apache.catalina.ant.ResourcesTask
> > 
> > Class org.apache.catalina.ant.RolesTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype roles org.apache.catalina.ant.RolesTask
> > 
> > Class org.apache.catalina.ant.StartTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype start org.apache.catalina.ant.StartTask
> > 
> > Class org.apache.catalina.ant.StopTask loaded from
> parent
> > loader
> > (parentFirst)
> > 
> > +Datatype stop org.apache.catalina.ant.StopTask
> > 
> > Class org.apache.catalina.ant.UndeployTask loaded
> from
> > parent loader
> > (parentFirst)
> > 
> > +Datatype undeploy
> org.apache.catalina.ant.UndeployTask
> > 
> > Attempting to create object of type
> > org.apache.tools.ant.helper.DefaultExecutor
> > 
> > Adding reference: ant.executor
> > 
> > Build sequence for target(s) `reload' is [compile,
> reload]
> > 
> > Complete build sequence is [compile, reload, deploy,
> > undeploy, ]
> > 
> >  
> > 
> > compile:
> > 
> >  
> > 
> > reload:
> > 
> >    [reload] <html>
> > 
> >    [reload] <head>
> > 
> >    [reload] <style>
> > 
> >  
> > 
> > ....
> > 
> >  
> > 
> >   [reload] </html>
> > 
> >  
> > 
> > BUILD FAILED
> > 
> > <html>
> > 
> >                 at
> >
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > va:258)
> > 
> >                 at
> >
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> > va:146)
> > 
> >                 at
> >
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> > 
> >                 at
> >
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> > 
> >                 at
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > 
> >                 at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> > 
> >                 at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > 
> >                 at
> > java.lang.reflect.Method.invoke(Method.java:597)
> > 
> >                 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.j
> > ava: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)
> > 
> >  
> > 
> > Total time: 0 seconds
> > 
> >  
> > 
> >  
> > 
> > Please any help for this issue.
> > 
> >  
> > 
> > Thanks in advance.
> > 
> > Best Regards,
> > 
> > Marseldi
> > 
> >  
> > 
> > 
> > 
> > <p class="MsoNormal"><span style="color:
> rgb(31,
> > 73, 125);">Gjeni <b>Pun&euml;
> t&euml;
> > Mir&euml;</b> dhe <b>t&euml;
> > Mir&euml; p&euml;r Pun&euml;</b>...
> > Vizitoni: <a target="_blank"
> href="http://www.punaime.al/">www.punaime.al</a></span></p>
> > <p><a target="_blank" href="http://www.punaime.al/"><span
> > style="text-decoration: none;"><img width="165"
> > height="31" border="0" alt="punaime"
> src="http://www.ikub.al/images/punaime.al_small.png"
> > /></span></a></p>
> > 
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: antlib.xml could not be found

Posted by Marseld Dedgjonaj <ma...@ikubinfo.com>.
Thanks Vimil,
As I see is not the problem of url because the url to access manager on the
browser in my tomcat congifuration is http://localhost:8080/manager/html.
I try to set the url to http://localhost:8080/manager as you suggest and I
got the same error but with a diference when the system tries to execute
Reload.

The error:

reload:
   [reload] FAIL - No context exists for path ikub_MainInstance

BUILD FAILED
FAIL - No context exists for path ikub_MainInstance 

If it helps I am using: Fedora 12 and ant 1.7.1 compiled on October 20 2009.

Best regards,
Marseld


-----Original Message-----
From: Vimil Saju [mailto:vimilsaju@yahoo.com] 
Sent: Thursday, March 10, 2011 7:07 PM
To: Ant Users List
Subject: Re: antlib.xml could not be found


You are right. From the stacktrace I see that ant is indeed able to find the
tomcat tasks. 

I think you should set the url property to "http://localhost:8080/manager"
instead of "http://localhost:8080/manager/html"



--- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: antlib.xml could not be found
> To: user@ant.apache.org
> Date: Thursday, March 10, 2011, 7:39 AM
> Hello everybody,
> 
> I am new to Ant and more detailed help would be more
> valuable to me.
> 
> I am trying to use Ant to reload a tomcat application. I
> write the build.xml
> file based on "Managing Applications with Ant" section of
> the "Professional
> Apache Tomcat" book.
> 
>  
> 
> The Build.xml file:
> 
>  
> 
> <project name="ManageApp" default="compile"
> basedir=".">
> 
>  
> 
>   <!-- Configure the directory into which the web
> application is built -->
> 
>   <property name="build"   
> value="${basedir}/build"/>
> 
>  
> 
>   <!-- Configure the context path for this
> application -->
> 
>   <property name="path" 
>    value="ikub_MainInstance"/>
> 
>  
> 
>   <!-- Configure properties to access the Manager
> application -->
> 
>   <property name="url"     
> value="http://localhost:8080/manager/html"/>
> 
>   <property name="username" value="manager"/>
> 
>   <property name="password"
> value="manager123+"/>
> 
>  
> 
>   <!-- Configure the custom Ant tasks for the
> Manager application -->
> 
>   <taskdef name="deploy"   
> classname="org.apache.catalina.ant.DeployTask"/>
> 
>   <taskdef name="list"     
> classname="org.apache.catalina.ant.ListTask"/>
> 
>   <taskdef name="reload"   
> classname="org.apache.catalina.ant.ReloadTask"/>
> 
>   <taskdef name="resources"
> classname="org.apache.catalina.ant.ResourcesTask"/>
> 
>   <taskdef name="roles" 
>    classname="org.apache.catalina.ant.RolesTask"/>
> 
>   <taskdef name="start" 
>    classname="org.apache.catalina.ant.StartTask"/>
> 
>   <taskdef name="stop"     
> classname="org.apache.catalina.ant.StopTask"/>
> 
>   <taskdef name="undeploy"
> classname="org.apache.catalina.ant.UndeployTask"/>
> 
>  
> 
>  
> 
>   <!-- Executable Targets -->
> 
>      <target name="compile"
> description="Compile web application">
> 
>      </target>
> 
>  
> 
>      <target name="reload"
> description="Reload web application"
> 
>          
>    depends="compile">
> 
>        <reload url="${url}"
> username="${username}" password="${password}"
> 
>              
> path="${path}"/>
> 
>      </target>
> 
>  
> 
>  
> 
>   <target name="deploy" description="Install web
> application"
> 
>           depends="compile">
> 
>     <deploy url="${url}"
> username="${username}" password="${password}"
> 
>             path="${path}"
> war="file:${build}${path}.war"/>
> 
>   </target>
> 
>  
> 
>   <target name="undeploy" description="Remove web
> application">
> 
>     <undeploy url="${url}"
> username="${username}" password="${password}"
> 
>            
> path="${path}"/>
> 
>   </target>
> 
>  
> 
> </project>
> 
>  
> 
>  
> 
> When I run "ant reload -debug" I got this error:
> 
>  
> 
>  
> 
>                
> Adding reference: ant.PropertyHelper
> 
> Detected Java version: 1.6 in:
> /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> 
> Detected OS: Linux
> 
> Adding reference: ant.ComponentHelper
> 
> Setting ro project property: ant.file ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Adding reference: ant.projectHelper
> 
> Adding reference: ant.parsing.context
> 
> Adding reference: ant.targets
> 
> parsing buildfile
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml with
> URI =
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Setting ro project property: ant.project.name ->
> ManageApp
> 
> Adding reference: ManageApp
> 
> Setting ro project property: ant.file.ManageApp ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Project base dir set to:
> /mnt/ikub_nutch/AppHelpers/ManageWebApps
> 
> +Target: 
> 
>  +Target: compile
> 
> +Target: reload
> 
> +Target: deploy
> 
> +Target: undeploy
> 
> [antlib:org.apache.tools.ant] Could not load definitions
> from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> 
> Setting project property: build ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> 
> Setting project property: path -> ikub_MainInstance
> 
> Setting project property: url -> http://localhost:8080/manager/html
> 
> Setting project property: username -> manager
> 
> Setting project property: password -> manager123+
> 
> Class org.apache.catalina.ant.DeployTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype deploy org.apache.catalina.ant.DeployTask
> 
> Class org.apache.catalina.ant.ListTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype list org.apache.catalina.ant.ListTask
> 
> Class org.apache.catalina.ant.ReloadTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype reload org.apache.catalina.ant.ReloadTask
> 
> Class org.apache.catalina.ant.ResourcesTask loaded from
> parent loader
> (parentFirst)
> 
> Trying to override old definition of datatype resources
> 
> +Datatype resources org.apache.catalina.ant.ResourcesTask
> 
> Class org.apache.catalina.ant.RolesTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype roles org.apache.catalina.ant.RolesTask
> 
> Class org.apache.catalina.ant.StartTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype start org.apache.catalina.ant.StartTask
> 
> Class org.apache.catalina.ant.StopTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype stop org.apache.catalina.ant.StopTask
> 
> Class org.apache.catalina.ant.UndeployTask loaded from
> parent loader
> (parentFirst)
> 
> +Datatype undeploy org.apache.catalina.ant.UndeployTask
> 
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> 
> Adding reference: ant.executor
> 
> Build sequence for target(s) `reload' is [compile, reload]
> 
> Complete build sequence is [compile, reload, deploy,
> undeploy, ]
> 
>  
> 
> compile:
> 
>  
> 
> reload:
> 
>    [reload] <html>
> 
>    [reload] <head>
> 
>    [reload] <style>
> 
>  
> 
> ....
> 
>  
> 
>   [reload] </html>
> 
>  
> 
> BUILD FAILED
> 
> <html>
> 
>                 at
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:258)
> 
>                 at
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:146)
> 
>                 at
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> 
>                 at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 
>                 at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 
>                 at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
>                 at
> java.lang.reflect.Method.invoke(Method.java:597)
> 
>                 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.j
> ava: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)
> 
>  
> 
> Total time: 0 seconds
> 
>  
> 
>  
> 
> Please any help for this issue.
> 
>  
> 
> Thanks in advance.
> 
> Best Regards,
> 
> Marseldi
> 
>  
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank"
href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime"
src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 


      

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





<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
<p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>



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


RE: antlib.xml could not be found

Posted by Marseld Dedgjonaj <ma...@ikubinfo.com>.
Hi Vimil,
Thank you for your response.
I have copied the catalina-ant.jar regards to the tutorial I followed.
So I think is not this the problem.

Regards,
Marseld

-----Original Message-----
From: Vimil Saju [mailto:vimilsaju@yahoo.com] 
Sent: Thursday, March 10, 2011 5:42 PM
To: Ant Users List
Subject: Re: antlib.xml could not be found


You need to have catalina-ant.jar in your classpath as this jar contains the
tasks to manage the tomcat server.

you can either copy this jar to the ant/lib directory or  use the -lib
command-line argument to specify the folder under which it is located.

Hope this helps you :)

--- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com>
wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: antlib.xml could not be found
> To: user@ant.apache.org
> Date: Thursday, March 10, 2011, 7:39 AM
> Hello everybody,
> 
> I am new to Ant and more detailed help would be more
> valuable to me.
> 
> I am trying to use Ant to reload a tomcat application. I
> write the build.xml
> file based on "Managing Applications with Ant" section of
> the "Professional
> Apache Tomcat" book.
> 
>  
> 
> The Build.xml file:
> 
>  
> 
> <project name="ManageApp" default="compile"
> basedir=".">
> 
>  
> 
>   <!-- Configure the directory into which the web
> application is built -->
> 
>   <property name="build"   
> value="${basedir}/build"/>
> 
>  
> 
>   <!-- Configure the context path for this
> application -->
> 
>   <property name="path" 
>    value="ikub_MainInstance"/>
> 
>  
> 
>   <!-- Configure properties to access the Manager
> application -->
> 
>   <property name="url"     
> value="http://localhost:8080/manager/html"/>
> 
>   <property name="username" value="manager"/>
> 
>   <property name="password"
> value="manager123+"/>
> 
>  
> 
>   <!-- Configure the custom Ant tasks for the
> Manager application -->
> 
>   <taskdef name="deploy"   
> classname="org.apache.catalina.ant.DeployTask"/>
> 
>   <taskdef name="list"     
> classname="org.apache.catalina.ant.ListTask"/>
> 
>   <taskdef name="reload"   
> classname="org.apache.catalina.ant.ReloadTask"/>
> 
>   <taskdef name="resources"
> classname="org.apache.catalina.ant.ResourcesTask"/>
> 
>   <taskdef name="roles" 
>    classname="org.apache.catalina.ant.RolesTask"/>
> 
>   <taskdef name="start" 
>    classname="org.apache.catalina.ant.StartTask"/>
> 
>   <taskdef name="stop"     
> classname="org.apache.catalina.ant.StopTask"/>
> 
>   <taskdef name="undeploy"
> classname="org.apache.catalina.ant.UndeployTask"/>
> 
>  
> 
>  
> 
>   <!-- Executable Targets -->
> 
>      <target name="compile"
> description="Compile web application">
> 
>      </target>
> 
>  
> 
>      <target name="reload"
> description="Reload web application"
> 
>          
>    depends="compile">
> 
>        <reload url="${url}"
> username="${username}" password="${password}"
> 
>              
> path="${path}"/>
> 
>      </target>
> 
>  
> 
>  
> 
>   <target name="deploy" description="Install web
> application"
> 
>           depends="compile">
> 
>     <deploy url="${url}"
> username="${username}" password="${password}"
> 
>             path="${path}"
> war="file:${build}${path}.war"/>
> 
>   </target>
> 
>  
> 
>   <target name="undeploy" description="Remove web
> application">
> 
>     <undeploy url="${url}"
> username="${username}" password="${password}"
> 
>            
> path="${path}"/>
> 
>   </target>
> 
>  
> 
> </project>
> 
>  
> 
>  
> 
> When I run "ant reload -debug" I got this error:
> 
>  
> 
>  
> 
>                
> Adding reference: ant.PropertyHelper
> 
> Detected Java version: 1.6 in:
> /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> 
> Detected OS: Linux
> 
> Adding reference: ant.ComponentHelper
> 
> Setting ro project property: ant.file ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Adding reference: ant.projectHelper
> 
> Adding reference: ant.parsing.context
> 
> Adding reference: ant.targets
> 
> parsing buildfile
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml with
> URI =
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Setting ro project property: ant.project.name ->
> ManageApp
> 
> Adding reference: ManageApp
> 
> Setting ro project property: ant.file.ManageApp ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Project base dir set to:
> /mnt/ikub_nutch/AppHelpers/ManageWebApps
> 
> +Target: 
> 
>  +Target: compile
> 
> +Target: reload
> 
> +Target: deploy
> 
> +Target: undeploy
> 
> [antlib:org.apache.tools.ant] Could not load definitions
> from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> 
> Setting project property: build ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> 
> Setting project property: path -> ikub_MainInstance
> 
> Setting project property: url -> http://localhost:8080/manager/html
> 
> Setting project property: username -> manager
> 
> Setting project property: password -> manager123+
> 
> Class org.apache.catalina.ant.DeployTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype deploy org.apache.catalina.ant.DeployTask
> 
> Class org.apache.catalina.ant.ListTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype list org.apache.catalina.ant.ListTask
> 
> Class org.apache.catalina.ant.ReloadTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype reload org.apache.catalina.ant.ReloadTask
> 
> Class org.apache.catalina.ant.ResourcesTask loaded from
> parent loader
> (parentFirst)
> 
> Trying to override old definition of datatype resources
> 
> +Datatype resources org.apache.catalina.ant.ResourcesTask
> 
> Class org.apache.catalina.ant.RolesTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype roles org.apache.catalina.ant.RolesTask
> 
> Class org.apache.catalina.ant.StartTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype start org.apache.catalina.ant.StartTask
> 
> Class org.apache.catalina.ant.StopTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype stop org.apache.catalina.ant.StopTask
> 
> Class org.apache.catalina.ant.UndeployTask loaded from
> parent loader
> (parentFirst)
> 
> +Datatype undeploy org.apache.catalina.ant.UndeployTask
> 
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> 
> Adding reference: ant.executor
> 
> Build sequence for target(s) `reload' is [compile, reload]
> 
> Complete build sequence is [compile, reload, deploy,
> undeploy, ]
> 
>  
> 
> compile:
> 
>  
> 
> reload:
> 
>    [reload] <html>
> 
>    [reload] <head>
> 
>    [reload] <style>
> 
>  
> 
> ....
> 
>  
> 
>   [reload] </html>
> 
>  
> 
> BUILD FAILED
> 
> <html>
> 
>                 at
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:258)
> 
>                 at
>
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:146)
> 
>                 at
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> 
>                 at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 
>                 at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 
>                 at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
>                 at
> java.lang.reflect.Method.invoke(Method.java:597)
> 
>                 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.j
> ava: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)
> 
>  
> 
> Total time: 0 seconds
> 
>  
> 
>  
> 
> Please any help for this issue.
> 
>  
> 
> Thanks in advance.
> 
> Best Regards,
> 
> Marseldi
> 
>  
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank"
href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime"
src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 


      

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





<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Gjeni <b>Pun&euml; t&euml; Mir&euml;</b> dhe <b>t&euml; Mir&euml; p&euml;r Pun&euml;</b>... Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
<p><a target="_blank" href="http://www.punaime.al/"><span style="text-decoration: none;"><img width="165" height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png" /></span></a></p>



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


Re: antlib.xml could not be found

Posted by Vimil Saju <vi...@yahoo.com>.
You are right. From the stacktrace I see that ant is indeed able to find the tomcat tasks. 

I think you should set the url property to "http://localhost:8080/manager"
instead of "http://localhost:8080/manager/html"



--- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com> wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: antlib.xml could not be found
> To: user@ant.apache.org
> Date: Thursday, March 10, 2011, 7:39 AM
> Hello everybody,
> 
> I am new to Ant and more detailed help would be more
> valuable to me.
> 
> I am trying to use Ant to reload a tomcat application. I
> write the build.xml
> file based on "Managing Applications with Ant" section of
> the "Professional
> Apache Tomcat" book.
> 
>  
> 
> The Build.xml file:
> 
>  
> 
> <project name="ManageApp" default="compile"
> basedir=".">
> 
>  
> 
>   <!-- Configure the directory into which the web
> application is built -->
> 
>   <property name="build"   
> value="${basedir}/build"/>
> 
>  
> 
>   <!-- Configure the context path for this
> application -->
> 
>   <property name="path" 
>    value="ikub_MainInstance"/>
> 
>  
> 
>   <!-- Configure properties to access the Manager
> application -->
> 
>   <property name="url"     
> value="http://localhost:8080/manager/html"/>
> 
>   <property name="username" value="manager"/>
> 
>   <property name="password"
> value="manager123+"/>
> 
>  
> 
>   <!-- Configure the custom Ant tasks for the
> Manager application -->
> 
>   <taskdef name="deploy"   
> classname="org.apache.catalina.ant.DeployTask"/>
> 
>   <taskdef name="list"     
> classname="org.apache.catalina.ant.ListTask"/>
> 
>   <taskdef name="reload"   
> classname="org.apache.catalina.ant.ReloadTask"/>
> 
>   <taskdef name="resources"
> classname="org.apache.catalina.ant.ResourcesTask"/>
> 
>   <taskdef name="roles" 
>    classname="org.apache.catalina.ant.RolesTask"/>
> 
>   <taskdef name="start" 
>    classname="org.apache.catalina.ant.StartTask"/>
> 
>   <taskdef name="stop"     
> classname="org.apache.catalina.ant.StopTask"/>
> 
>   <taskdef name="undeploy"
> classname="org.apache.catalina.ant.UndeployTask"/>
> 
>  
> 
>  
> 
>   <!-- Executable Targets -->
> 
>      <target name="compile"
> description="Compile web application">
> 
>      </target>
> 
>  
> 
>      <target name="reload"
> description="Reload web application"
> 
>          
>    depends="compile">
> 
>        <reload url="${url}"
> username="${username}" password="${password}"
> 
>              
> path="${path}"/>
> 
>      </target>
> 
>  
> 
>  
> 
>   <target name="deploy" description="Install web
> application"
> 
>           depends="compile">
> 
>     <deploy url="${url}"
> username="${username}" password="${password}"
> 
>             path="${path}"
> war="file:${build}${path}.war"/>
> 
>   </target>
> 
>  
> 
>   <target name="undeploy" description="Remove web
> application">
> 
>     <undeploy url="${url}"
> username="${username}" password="${password}"
> 
>            
> path="${path}"/>
> 
>   </target>
> 
>  
> 
> </project>
> 
>  
> 
>  
> 
> When I run "ant reload -debug" I got this error:
> 
>  
> 
>  
> 
>                
> Adding reference: ant.PropertyHelper
> 
> Detected Java version: 1.6 in:
> /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> 
> Detected OS: Linux
> 
> Adding reference: ant.ComponentHelper
> 
> Setting ro project property: ant.file ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Adding reference: ant.projectHelper
> 
> Adding reference: ant.parsing.context
> 
> Adding reference: ant.targets
> 
> parsing buildfile
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml with
> URI =
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Setting ro project property: ant.project.name ->
> ManageApp
> 
> Adding reference: ManageApp
> 
> Setting ro project property: ant.file.ManageApp ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Project base dir set to:
> /mnt/ikub_nutch/AppHelpers/ManageWebApps
> 
> +Target: 
> 
>  +Target: compile
> 
> +Target: reload
> 
> +Target: deploy
> 
> +Target: undeploy
> 
> [antlib:org.apache.tools.ant] Could not load definitions
> from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> 
> Setting project property: build ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> 
> Setting project property: path -> ikub_MainInstance
> 
> Setting project property: url -> http://localhost:8080/manager/html
> 
> Setting project property: username -> manager
> 
> Setting project property: password -> manager123+
> 
> Class org.apache.catalina.ant.DeployTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype deploy org.apache.catalina.ant.DeployTask
> 
> Class org.apache.catalina.ant.ListTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype list org.apache.catalina.ant.ListTask
> 
> Class org.apache.catalina.ant.ReloadTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype reload org.apache.catalina.ant.ReloadTask
> 
> Class org.apache.catalina.ant.ResourcesTask loaded from
> parent loader
> (parentFirst)
> 
> Trying to override old definition of datatype resources
> 
> +Datatype resources org.apache.catalina.ant.ResourcesTask
> 
> Class org.apache.catalina.ant.RolesTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype roles org.apache.catalina.ant.RolesTask
> 
> Class org.apache.catalina.ant.StartTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype start org.apache.catalina.ant.StartTask
> 
> Class org.apache.catalina.ant.StopTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype stop org.apache.catalina.ant.StopTask
> 
> Class org.apache.catalina.ant.UndeployTask loaded from
> parent loader
> (parentFirst)
> 
> +Datatype undeploy org.apache.catalina.ant.UndeployTask
> 
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> 
> Adding reference: ant.executor
> 
> Build sequence for target(s) `reload' is [compile, reload]
> 
> Complete build sequence is [compile, reload, deploy,
> undeploy, ]
> 
>  
> 
> compile:
> 
>  
> 
> reload:
> 
>    [reload] <html>
> 
>    [reload] <head>
> 
>    [reload] <style>
> 
>  
> 
> ....
> 
>  
> 
>   [reload] </html>
> 
>  
> 
> BUILD FAILED
> 
> <html>
> 
>                 at
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:258)
> 
>                 at
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:146)
> 
>                 at
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> 
>                 at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 
>                 at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
>                 at
> java.lang.reflect.Method.invoke(Method.java:597)
> 
>                 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.j
> ava: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)
> 
>  
> 
> Total time: 0 seconds
> 
>  
> 
>  
> 
> Please any help for this issue.
> 
>  
> 
> Thanks in advance.
> 
> Best Regards,
> 
> Marseldi
> 
>  
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 


      

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


Re: antlib.xml could not be found

Posted by Vimil Saju <vi...@yahoo.com>.
You need to have catalina-ant.jar in your classpath as this jar contains the tasks to manage the tomcat server.

you can either copy this jar to the ant/lib directory or  use the -lib command-line argument to specify the folder under which it is located.

Hope this helps you :)

--- On Thu, 3/10/11, Marseld Dedgjonaj <ma...@ikubinfo.com> wrote:

> From: Marseld Dedgjonaj <ma...@ikubinfo.com>
> Subject: antlib.xml could not be found
> To: user@ant.apache.org
> Date: Thursday, March 10, 2011, 7:39 AM
> Hello everybody,
> 
> I am new to Ant and more detailed help would be more
> valuable to me.
> 
> I am trying to use Ant to reload a tomcat application. I
> write the build.xml
> file based on "Managing Applications with Ant" section of
> the "Professional
> Apache Tomcat" book.
> 
>  
> 
> The Build.xml file:
> 
>  
> 
> <project name="ManageApp" default="compile"
> basedir=".">
> 
>  
> 
>   <!-- Configure the directory into which the web
> application is built -->
> 
>   <property name="build"   
> value="${basedir}/build"/>
> 
>  
> 
>   <!-- Configure the context path for this
> application -->
> 
>   <property name="path" 
>    value="ikub_MainInstance"/>
> 
>  
> 
>   <!-- Configure properties to access the Manager
> application -->
> 
>   <property name="url"     
> value="http://localhost:8080/manager/html"/>
> 
>   <property name="username" value="manager"/>
> 
>   <property name="password"
> value="manager123+"/>
> 
>  
> 
>   <!-- Configure the custom Ant tasks for the
> Manager application -->
> 
>   <taskdef name="deploy"   
> classname="org.apache.catalina.ant.DeployTask"/>
> 
>   <taskdef name="list"     
> classname="org.apache.catalina.ant.ListTask"/>
> 
>   <taskdef name="reload"   
> classname="org.apache.catalina.ant.ReloadTask"/>
> 
>   <taskdef name="resources"
> classname="org.apache.catalina.ant.ResourcesTask"/>
> 
>   <taskdef name="roles" 
>    classname="org.apache.catalina.ant.RolesTask"/>
> 
>   <taskdef name="start" 
>    classname="org.apache.catalina.ant.StartTask"/>
> 
>   <taskdef name="stop"     
> classname="org.apache.catalina.ant.StopTask"/>
> 
>   <taskdef name="undeploy"
> classname="org.apache.catalina.ant.UndeployTask"/>
> 
>  
> 
>  
> 
>   <!-- Executable Targets -->
> 
>      <target name="compile"
> description="Compile web application">
> 
>      </target>
> 
>  
> 
>      <target name="reload"
> description="Reload web application"
> 
>          
>    depends="compile">
> 
>        <reload url="${url}"
> username="${username}" password="${password}"
> 
>              
> path="${path}"/>
> 
>      </target>
> 
>  
> 
>  
> 
>   <target name="deploy" description="Install web
> application"
> 
>           depends="compile">
> 
>     <deploy url="${url}"
> username="${username}" password="${password}"
> 
>             path="${path}"
> war="file:${build}${path}.war"/>
> 
>   </target>
> 
>  
> 
>   <target name="undeploy" description="Remove web
> application">
> 
>     <undeploy url="${url}"
> username="${username}" password="${password}"
> 
>            
> path="${path}"/>
> 
>   </target>
> 
>  
> 
> </project>
> 
>  
> 
>  
> 
> When I run "ant reload -debug" I got this error:
> 
>  
> 
>  
> 
>                
> Adding reference: ant.PropertyHelper
> 
> Detected Java version: 1.6 in:
> /usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre
> 
> Detected OS: Linux
> 
> Adding reference: ant.ComponentHelper
> 
> Setting ro project property: ant.file ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Adding reference: ant.projectHelper
> 
> Adding reference: ant.parsing.context
> 
> Adding reference: ant.targets
> 
> parsing buildfile
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml with
> URI =
> file:/mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Setting ro project property: ant.project.name ->
> ManageApp
> 
> Adding reference: ManageApp
> 
> Setting ro project property: ant.file.ManageApp ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build.xml
> 
> Project base dir set to:
> /mnt/ikub_nutch/AppHelpers/ManageWebApps
> 
> +Target: 
> 
>  +Target: compile
> 
> +Target: reload
> 
> +Target: deploy
> 
> +Target: undeploy
> 
> [antlib:org.apache.tools.ant] Could not load definitions
> from resource
> org/apache/tools/ant/antlib.xml. It could not be found.
> 
> Setting project property: build ->
> /mnt/ikub_nutch/AppHelpers/ManageWebApps/build
> 
> Setting project property: path -> ikub_MainInstance
> 
> Setting project property: url -> http://localhost:8080/manager/html
> 
> Setting project property: username -> manager
> 
> Setting project property: password -> manager123+
> 
> Class org.apache.catalina.ant.DeployTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype deploy org.apache.catalina.ant.DeployTask
> 
> Class org.apache.catalina.ant.ListTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype list org.apache.catalina.ant.ListTask
> 
> Class org.apache.catalina.ant.ReloadTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype reload org.apache.catalina.ant.ReloadTask
> 
> Class org.apache.catalina.ant.ResourcesTask loaded from
> parent loader
> (parentFirst)
> 
> Trying to override old definition of datatype resources
> 
> +Datatype resources org.apache.catalina.ant.ResourcesTask
> 
> Class org.apache.catalina.ant.RolesTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype roles org.apache.catalina.ant.RolesTask
> 
> Class org.apache.catalina.ant.StartTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype start org.apache.catalina.ant.StartTask
> 
> Class org.apache.catalina.ant.StopTask loaded from parent
> loader
> (parentFirst)
> 
> +Datatype stop org.apache.catalina.ant.StopTask
> 
> Class org.apache.catalina.ant.UndeployTask loaded from
> parent loader
> (parentFirst)
> 
> +Datatype undeploy org.apache.catalina.ant.UndeployTask
> 
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> 
> Adding reference: ant.executor
> 
> Build sequence for target(s) `reload' is [compile, reload]
> 
> Complete build sequence is [compile, reload, deploy,
> undeploy, ]
> 
>  
> 
> compile:
> 
>  
> 
> reload:
> 
>    [reload] <html>
> 
>    [reload] <head>
> 
>    [reload] <style>
> 
>  
> 
> ....
> 
>  
> 
>   [reload] </html>
> 
>  
> 
> BUILD FAILED
> 
> <html>
> 
>                 at
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:258)
> 
>                 at
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
> va:146)
> 
>                 at
> org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:72)
> 
>                 at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> 
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 
>                 at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 
>                 at
> java.lang.reflect.Method.invoke(Method.java:597)
> 
>                 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.j
> ava: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)
> 
>  
> 
> Total time: 0 seconds
> 
>  
> 
>  
> 
> Please any help for this issue.
> 
>  
> 
> Thanks in advance.
> 
> Best Regards,
> 
> Marseldi
> 
>  
> 
> 
> 
> <p class="MsoNormal"><span style="color: rgb(31,
> 73, 125);">Gjeni <b>Pun&euml; t&euml;
> Mir&euml;</b> dhe <b>t&euml;
> Mir&euml; p&euml;r Pun&euml;</b>...
> Vizitoni: <a target="_blank" href="http://www.punaime.al/">www.punaime.al</a></span></p>
> <p><a target="_blank" href="http://www.punaime.al/"><span
> style="text-decoration: none;"><img width="165"
> height="31" border="0" alt="punaime" src="http://www.ikub.al/images/punaime.al_small.png"
> /></span></a></p>
> 


      

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