• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Springapp Tutorial FileNotFoundException at Step 1.11, running ant deploy reload

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Daisy Gutierrez
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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....
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Rajive Rishi
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic