File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Springapp Tutorial FileNotFoundException at Step 1.11, running ant deploy reload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Springapp Tutorial FileNotFoundException at Step 1.11, running ant deploy reload" Watch "Springapp Tutorial FileNotFoundException at Step 1.11, running ant deploy reload" New topic
Author

Springapp Tutorial FileNotFoundException at Step 1.11, running ant deploy reload

Daisy Gutierrez
Greenhorn

Joined: Mar 08, 2011
Posts: 3
Hello everyone,

Thanks in advance for you help. I've been trying to figure this one out for the last 30mnts-1hr. Okay I'm on step 1.11 of the springapp tutorial located here, http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html.

Everything has been running beautifully so far until this step.

When I run "ant deploy reload" I get the following:



Line 113 area of my build.xml:


My properties file is:

appserver.home=C:/apache-tomcat-7.0.11
appserver.lib=${appserver.home}/lib

deploy.path=${appserver.home}/webapps

tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=tomcat
tomcat.manager.password=s3cret


Any suggestions?

Also, curious I'm kind of new to this but why does the build.xml file use <reload url="${tomcat.manager.url} - it's obviously point to http://localhost:8080/manager/ to do the reload - but why? The springapp is in http://localhost:8080/springapp ?? This seems really odd to me - or maybe I just don't really understand what the tomcat manager does... but it seems to me that the build.xml / ant is telling tomcat to go reload in the manager directory and well of course the file is not there, hence the fileIO exception.... I could be totally off lol

Any help or info would be greatly appreciated. Thanks!

And just a heads up - yes the app and unit tests all run fabulously - my server is started, I can see my little test page in the browser: http://localhost:8080/springapp/hello.jsp - which is actually the last thing listed on that page of the tutorial.

So all seems to actually be working but ant is giving me that error... not sure why?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

I haven't tried that tutorial, but I saw a sentence on that page that said if you are using an IDE you will see an error related to tomcat target and to ignore it. But not sure exactly what it means, but what happens if you build on the command line.

I am not going to be much help here as I always use Maven and really hate ant myself. ;)

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Daisy Gutierrez
Greenhorn

Joined: Mar 08, 2011
Posts: 3
I am doing the command line - ant deploy reload. It's odd, I almost finished the tutorial, which is great but I still get this odd ant / tomcat error. Can't believe I'm the only one....
Rajive Rishi
Greenhorn

Joined: Nov 07, 2007
Posts: 1
what version is your tomcat. if it is 7 or above.
you need to change the properties file as below: (reason is that the role manager has now been divided into 4 different roles)
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>

<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>

also you need to change the build.properties file in your springapp root directory to

tomcat.manager.url=http://localhost:8080/manager/html

This doesn't solve the problem but if you are using 7+ verison then this is required.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Welcome to JavaRanch, Rajive Rishi


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Gerardo Morales
Greenhorn

Joined: Jan 10, 2012
Posts: 3
I've had the same problem, to fix it (if you are using tomcat 7 or above), you need to:

1. At least have the manage-script role (change the conf/tomcat-users.xml file as described below)

<tomcat-users>
<role rolename="manager-script"/>
<user username="tomcat" password="s3cret" roles="manager-script"/>
</tomcat-users>

and 2. Have in your build.properties file the following line:

tomcat.manager.url=http://localhost:8080/manager/text
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Daisy Gutierrez wrote:Also, curious I'm kind of new to this but why does the build.xml file use <reload url="${tomcat.manager.url} - it's obviously point to http://localhost:8080/manager/ to do the reload - but why?

The other required parameters are added to the manager URL by the handler (ReloadTask) in this case. It is identified by the reload taskdef in your build.xml

And welcome to the CodeRanch, Gerardo Morales!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Springapp Tutorial FileNotFoundException at Step 1.11, running ant deploy reload
 
Similar Threads
Ant script not finding my build.properties file
Error building a Project using Ant
Build failure in Step-by-step tutorial
Spring coniguration
Error The requested resource is not available