Re: need help debugging why a simple app install fails

2012-08-12 Thread my koseli
On Fri, Aug 10, 2012 at 8:08 AM, Ognjen Blagojevic 
ognjen.d.blagoje...@gmail.com wrote:

 Hi my,

 On 10.8.2012 6:13, my koseli wrote:

 I tried  adding /text to the end of manager url but that didnt work.

 There is nothing interesting in the /var/log/tomcat6/ also.

 When I do *build* I do get warning as below but I am not sure how serious
 this warning is.


 I just tested some more with 6.0.26, and indeed InstallTask seems to be
 problematic, so just use DeployTask as recommended by Tomcat docs:


 
 taskdef name=manager-deploy classname=org.apache.**
 catalina.ant.DeployTask
 classpath refid=catalina-ant-classpath**/
 /taskdef
 taskdef name=manager-undeploy classname=org.apache.**
 catalina.ant.UndeployTask
 classpath refid=catalina-ant-classpath**/
 /taskdef

 target name=manager-deploy description=Install application in
 Tomcat
 manager-deploy url=${tomcat.manager.url}

  username=${tomcat.manager.**username}
  password=${tomcat.manager.**password}
  path=/${name}
  war=${name}.war/
 /target

 target name=manager-undeploy description=Install application in
 Tomcat
 manager-undeploy url=${tomcat.manager.url}

  username=${tomcat.manager.**username}
  password=${tomcat.manager.**password}
  path=/${name}/
 /target
 

 -Ognjen



 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




I changed the build.xml to below but I still get the error. Any idea?

 target name=manager-deploy description=Install application in Tomcat
 manager-deploy url=${tomcat.manager.url}
  username=${tomcat.manager.username}
  password=${tomcat.manager.password}
  path=/${name}
  war=${name}.war/
 /target



Not sure what is causing this. Any idea?


Trying the default build file: build.xml

 Buildfile: /home/user/springapp2/build.xml
 Detected Java version: 1.6 in: /usr/lib/jvm/java-6-openjdk/jre
 Detected OS: Linux
 parsing buildfile /home/user/springapp2/build.xml with URI =
 file:/home/user/springapp2/build.xml
 Project base dir set to: /home/user/springapp2
 parsing buildfile
 jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
 URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
 from a zip file
  [property] Loading /home/user/springapp2/build.properties
 Override ignored for property tomcat.manager.url
 Override ignored for property tomcat.manager.username
 Override ignored for property tomcat.manager.password
 Build sequence for target(s) `manager-deploy' is [manager-deploy]
 Complete build sequence is [manager-deploy, reload, start, install, build,
 deploy, manager-undeploy, list, usage, stop, deploywar, ]
 manager-deploy:



 BUILD FAILED
 /home/user/springapp2/build.xml:74: java.io.FileNotFoundException:
 springapp2.war (No such file or directory)
 at java.io.FileInputStream.open(Native Method)
 at java.io.FileInputStream.init(FileInputStream.java:137)
 at java.io.FileInputStream.init(FileInputStream.java:96)
 at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:169)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 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:390)
 at org.apache.tools.ant.Target.performTasks(Target.java:411)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
 at
 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
 at org.apache.tools.ant.Main.runBuild(Main.java:801)
 at org.apache.tools.ant.Main.startAnt(Main.java:218)
 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)




Re: need help debugging why a simple app install fails

2012-08-12 Thread my koseli
On Sun, Aug 12, 2012 at 10:52 AM, my koseli mykos...@gmail.com wrote:



 On Fri, Aug 10, 2012 at 8:08 AM, Ognjen Blagojevic 
 ognjen.d.blagoje...@gmail.com wrote:

 Hi my,

 On 10.8.2012 6:13, my koseli wrote:

 I tried  adding /text to the end of manager url but that didnt work.

 There is nothing interesting in the /var/log/tomcat6/ also.

 When I do *build* I do get warning as below but I am not sure how serious
 this warning is.


 I just tested some more with 6.0.26, and indeed InstallTask seems to be
 problematic, so just use DeployTask as recommended by Tomcat docs:


 
 taskdef name=manager-deploy classname=org.apache.**
 catalina.ant.DeployTask
 classpath refid=catalina-ant-classpath**/
 /taskdef
 taskdef name=manager-undeploy classname=org.apache.**
 catalina.ant.UndeployTask
 classpath refid=catalina-ant-classpath**/
 /taskdef

 target name=manager-deploy description=Install application in
 Tomcat
 manager-deploy url=${tomcat.manager.url}

  username=${tomcat.manager.**username}
  password=${tomcat.manager.**password}
  path=/${name}
  war=${name}.war/
 /target

 target name=manager-undeploy description=Install application in
 Tomcat
 manager-undeploy url=${tomcat.manager.url}

  username=${tomcat.manager.**username}
  password=${tomcat.manager.**password}
  path=/${name}/
 /target
 

 -Ognjen



 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 I changed the build.xml to below but I still get the error. Any idea?

 target name=manager-deploy description=Install application in Tomcat
 manager-deploy url=${tomcat.manager.url}
  username=${tomcat.manager.username}
  password=${tomcat.manager.password}
  path=/${name}
  war=${name}.war/
 /target



 Not sure what is causing this. Any idea?


 Trying the default build file: build.xml

 Buildfile: /home/user/springapp2/build.xml

 Detected Java version: 1.6 in: /usr/lib/jvm/java-6-openjdk/jre
 Detected OS: Linux
 parsing buildfile /home/user/springapp2/build.xml with URI =
 file:/home/user/springapp2/build.xml
 Project base dir set to: /home/user/springapp2
 parsing buildfile
 jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
 URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
 from a zip file
  [property] Loading /home/user/springapp2/build.properties
 Override ignored for property tomcat.manager.url
 Override ignored for property tomcat.manager.username
 Override ignored for property tomcat.manager.password
 Build sequence for target(s) `manager-deploy' is [manager-deploy]
 Complete build sequence is [manager-deploy, reload, start, install,
 build, deploy, manager-undeploy, list, usage, stop, deploywar, ]
 manager-deploy:



 BUILD FAILED
 /home/user/springapp2/build.xml:74: java.io.FileNotFoundException:
 springapp2.war (No such file or directory)
 at java.io.FileInputStream.open(Native Method)
 at java.io.FileInputStream.init(FileInputStream.java:137)
 at java.io.FileInputStream.init(FileInputStream.java:96)
 at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:169)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 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:390)
 at org.apache.tools.ant.Target.performTasks(Target.java:411)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
 at
 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
 at org.apache.tools.ant.Main.runBuild(Main.java:801)
 at org.apache.tools.ant.Main.startAnt(Main.java:218)
 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)



This is the tutorial I am trying to follow:
http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html


need help debugging why a simple app install fails

2012-08-09 Thread my koseli

 Hi,

I am using tomcat6 in ubuntu Ubuntu 10.04.4 LTS and running into problem
when installing a very simple app.

When I do ant build, deploy it seems to work but when I do ant install -v
I get failed to build with output below. I cant find the reason this is
failing. Is it possible to get some help on debugging this?

Detected Java version: 1.6 in: /usr/lib/jvm/java-6-openjdk/jre

 Detected OS: Linux
 parsing buildfile /home/user/springapp2/build.xml with URI =
 file:/home/user/springapp2/build.xml
 Project base dir set to: /home/user/springapp2
 parsing buildfile
 jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
 URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
 from a zip file
  [property] Loading /home/user/springapp2/build.properties
 Build sequence for target(s) `install' is [install]
 Complete build sequence is [install, reload, start, build, deploy, list,
 usage, stop, deploywar, ]
 install:
   [install] FAIL - Failed to deploy application at context path /springapp2
 BUILD FAILED
 /home/user/springapp2/build.xml:106: FAIL - Failed to deploy application
 at context path /springapp2
 at
 org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:258)
 at
 org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:146)
 at org.apache.catalina.ant.InstallTask.execute(InstallTask.java:114)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 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:390)
 at org.apache.tools.ant.Target.performTasks(Target.java:411)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
 at
 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
 at org.apache.tools.ant.Main.runBuild(Main.java:801)
 at org.apache.tools.ant.Main.startAnt(Main.java:218)
 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
 Total time: 0 seconds




Re: need help debugging why a simple app install fails

2012-08-09 Thread my koseli
Here's the relevant lines from build.xml

101 target name=install description=Install application in Tomcat
 102 install url=${tomcat.manager.url}
 103  username=${tomcat.manager.username}
 104  password=${tomcat.manager.password}
 105  path=/${name}
 106  war=${name}.war/
 107 /target


I have attached the full build.xml along with this email.

I am using openjdk version of java with tomcat6.

My build.properties file looks like this:

 # Ant properties for building the springapp
 appserver.home=/usr/share/tomcat6
 # for Tomcat 5 use $appserver.home}/server/lib
 # for Tomcat 6 use $appserver.home}/lib
 appserver.lib=${appserver.home}/lib
 deploy.path=${appserver.home}/webapps
 tomcat.manager.url=http://192.168.1.12:8010/manager
 tomcat.manager.username=admin
 tomcat.manager.password=pass





On Thu, Aug 9, 2012 at 7:28 AM, Ognjen Blagojevic 
ognjen.d.blagoje...@gmail.com wrote:

 Hi my,


 On 9.8.2012 14:55, my koseli wrote:

 When I do ant build, deploy it seems to work but when I do ant install
 -v
 I get failed to build with output below. I cant find the reason this is
 failing. Is it possible to get some help on debugging this?


 You get the message from Manager webapp (Failed to deploy...). There
 should be some more information about the reason of the failure in Tomcat
 logs, check them out.

 -Ognjen

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


?xml version=1.0?

project name=springapp2 basedir=. default=usage
property file=build.properties/

property name=src.dir value=src/
property name=web.dir value=war/
property name=build.dir value=${web.dir}/WEB-INF/classes/
property name=name value=springapp2/

path id=master-classpath
fileset dir=${web.dir}/WEB-INF/lib
include name=*.jar/
/fileset
!-- We need the servlet API classes: --
!--  * for Tomcat 5/6 use servlet-api.jar --
!--  * for other app servers - check the docs --
fileset dir=${appserver.lib}
include name=servlet*.jar/
/fileset
pathelement path=${build.dir}/
/path

target name=usage
echo message=/
echo message=${name} build file/
echo message=---/
echo message=/
echo message=Available targets are:/
echo message=/
echo message=build -- Build the application/
echo message=deploy-- Deploy application as directory/
echo message=deploywar -- Deploy application as a WAR file/
echo message=install   -- Install application in Tomcat/
echo message=reload-- Reload application in Tomcat/
echo message=start -- Start Tomcat application/
echo message=stop  -- Stop Tomcat application/
echo message=list  -- List Tomcat applications/
echo message=/
/target

target name=build description=Compile main source tree java files
mkdir dir=${build.dir}/
javac destdir=${build.dir} source=1.6 target=1.6 debug=true
   deprecation=false optimize=false failonerror=true
src path=${src.dir}/
classpath refid=master-classpath/
/javac
/target

target name=deploy depends=build description=Deploy application
copy todir=${deploy.path}/${name} preservelastmodified=true
fileset dir=${web.dir}
include name=**/*.*/
/fileset
/copy
/target

target name=deploywar depends=build description=Deploy application as a WAR file
war destfile=${name}.war
 webxml=${web.dir}/WEB-INF/web.xml
fileset dir=${web.dir}
include name=**/*.*/
/fileset
/war
copy todir=${deploy.path} preservelastmodified=true
fileset dir=.
include name=*.war/
/fileset
/copy
/target

!-- == --
!-- Tomcat tasks - remove these if you don't have Tomcat installed --
!-- == --

path id=catalina-ant-classpath
!-- We need the Catalina jars for Tomcat --
!--  * for other app servers - check the docs --
fileset dir=${appserver.lib}
include name=catalina-ant.jar/
/fileset
/path

taskdef name=install classname=org.apache.catalina.ant.InstallTask
classpath refid=catalina-ant-classpath/
/taskdef
taskdef name=reload classname=org.apache.catalina.ant.ReloadTask
classpath refid=catalina-ant-classpath/
/taskdef
taskdef name=list classname=org.apache.catalina.ant.ListTask
classpath refid=catalina-ant

Re: need help debugging why a simple app install fails

2012-08-09 Thread my koseli
I tried  adding /text to the end of manager url but that didnt work.

There is nothing interesting in the /var/log/tomcat6/ also.

When I do *build* I do get warning as below but I am not sure how serious
this warning is.

Buildfile: /home/user/springapp2/build.xml
 build:
 [javac] /home/user/springapp2/build.xml:48: warning:
 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
 to false for repeatable builds
 BUILD SUCCESSFUL


I also added the install script to my deploy so that it looks like this
below:

 target name=deploy depends=build description=Deploy application
 copy todir=${deploy.path}/${name} preservelastmodified=true
 fileset dir=${web.dir}
 include name=**/*.*/
 /fileset
 /copy
 install url=${tomcat.manager.url}
  username=${tomcat.manager.username}
  password=${tomcat.manager.password}
  path=/${name}
  war=${name}.war/
 /target



On Thu, Aug 9, 2012 at 2:30 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 My,

 On 8/9/12 10:57 AM, my koseli wrote:
  tomcat.manager.url=http://192.168.1.12:8010/manager

 Try adding /text to the end of that URL so it looks like this:

 tomcat.manager.url=http://192.168.1.12:8010/manager/text

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAlAkHf0ACgkQ9CaO5/Lv0PA8+QCgrwFuTueW+G3hiwffqvCKbLdK
 V0MAn17tEZN3yQoPewDqsZG/3kMZ0QWA
 =Fp/e
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org