aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Need help in build applications using ant : getting exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Need help in build applications using ant : getting exception" Watch "Need help in build applications using ant : getting exception" New topic
Author

Need help in build applications using ant : getting exception

Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
I am going through site http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html . I am executing ant tasks one by one and they are successful untill i give ant list. When i execute ant list i get below error stack trace


I have gone through similar problems faced by people but the solutions given to them doesnot work for me. For eg similar issue,
but the discussion there didn't helped me.

Please fine below my build.xml and build.properties file

build.properties

build.xml



Please Note
My tomcat is installed in correct location as mentioned in build.xml file and also i have included

in my tomcat-users.xml file.

Please help


Man Suraj
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
Andreas Koenig
Greenhorn

Joined: Jan 10, 2012
Posts: 7

works for me, but are you sure about the port 80 in tomcat.manager.url in the build.properties because default it's 8080, unless you changed it in tomcat's server.xml
Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
Yes I am sure. I changed the port to 80 from 8080. Also, i have deployed other application in the same tomcat and it works fine for me. It's only this ant build which fails
Andreas Koenig
Greenhorn

Joined: Jan 10, 2012
Posts: 7

After changing the port to 80 I get the same exception, maybe because it's default http-port. You should simply use another port.
Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
Well thanks. This did helped up to some extent. I changed the port to 8180 and ant build works fine now. Now i got to know that the error which i mentioned occurs if i start tomcat from eclipse. Neveetheless,I learnt about the other exception which occurs when port is 80. Let me explain it below

1) With port "80" and if i start tomcat from outside(not from eclipse), then i get below error if i execute "ant list"




Now i changed the port to 8180, do an ant build and it works absolutely fine.

But if i start tomcat from eclipse (even with new port 8180) ,and do an ant build, then still i get the same old exception which i mentioned in previous post

Andreas Koenig
Greenhorn

Joined: Jan 10, 2012
Posts: 7

Don't know if you kept in mind that from within eclipse the webapps gets deployed temporarily inside the workspace, for me it's .metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Andreas Koenig
Greenhorn

Joined: Jan 10, 2012
Posts: 7

found a solution. the problem is like I said the webapps-folder within the workspace and the missing manager app. you need to add the folowing line to the server.xml in your workspaces server/tomcat folder

and restart the server
Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
I think we may be little closer to the solution. As you said, i gave below in my server.xml (in workspaces server/tomcat folder )




Now i get below exception


I even tried with giving below in tomcat-users.xml file(in workspaces server/tomcat folder )


Andreas Koenig
Greenhorn

Joined: Jan 10, 2012
Posts: 7

seems like it's nearly working. my tomcat-users.xml has the entries already, apparently imported when I created the server in eclipse. did you restartet the server after editing?
Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
Ya i restarted the server
Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 293
Well i just cleaned it and restarted the server....and now my build works fine Thanks a lot for some great suggestions
 
jQuery in Action, 2nd edition
 
subject: Need help in build applications using ant : getting exception
 
Similar Threads
Install task cannot find file
Ant list -- Build Failed
Not able to display starting jsp page index.jsp
Ant script not finding my build.properties file
Spring coniguration