Results 1 to 10 of 17

Thread: java.net.ConnectException

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    India
    Posts
    12

    Default java.net.ConnectException

    Hi,

    I am following the below link for developing sample spring application.

    springframework.org/docs/Spring-MVC-step-by-step/part1.html#step1.2

    I run the "build.xml" file by Ant Build. It displays the following in the console..

    Buildfile: D:\Ramesh\WorkSpace\springapp\build.xml
    usage:
    [echo] springapp build file
    [echo] -----------------------------------
    [echo] Available targets are:
    [echo] build --> Build the application
    [echo] deploy --> Deploy application as directory
    [echo] deploywar --> Deploy application as a WAR file
    [echo] install --> Install application in Tomcat
    [echo] reload --> Reload application in Tomcat
    [echo] start --> Start Tomcat application
    [echo] stop --> Stop Tomcat application
    [echo] list --> List Tomcat applications
    build:
    build:
    deploy:
    build:
    deploywar:
    reload:

    BUILD FAILED
    D:\Ramesh\WorkSpace\springapp\build.xml:113: java.net.ConnectException: Connection refused: connect

    Total time: 2 seconds

    Any one give me the solution.....

  2. #2

    Default

    Quote Originally Posted by ram2206 View Post
    Hi,

    I am following the below link for developing sample spring application.

    springframework.org/docs/Spring-MVC-step-by-step/part1.html#step1.2

    I run the "build.xml" file by Ant Build. It displays the following in the console..

    Buildfile: D:\Ramesh\WorkSpace\springapp\build.xml
    usage:
    [echo] springapp build file
    [echo] -----------------------------------
    [echo] Available targets are:
    [echo] build --> Build the application
    [echo] deploy --> Deploy application as directory
    [echo] deploywar --> Deploy application as a WAR file
    [echo] install --> Install application in Tomcat
    [echo] reload --> Reload application in Tomcat
    [echo] start --> Start Tomcat application
    [echo] stop --> Stop Tomcat application
    [echo] list --> List Tomcat applications
    build:
    build:
    deploy:
    build:
    deploywar:
    reload:

    BUILD FAILED
    D:\Ramesh\WorkSpace\springapp\build.xml:113: java.net.ConnectException: Connection refused: connect

    Total time: 2 seconds

    Any one give me the solution.....
    check build.properties file
    It seems like your settings are incorrect. Most likely this is something to do with your web server. Check your configuration

  3. #3
    Join Date
    Sep 2008
    Location
    India
    Posts
    12

    Default

    Quote Originally Posted by anurudda_spring View Post
    check build.properties file
    It seems like your settings are incorrect. Most likely this is something to do with your web server. Check your configuration
    Thank you for your reply...

    The build.properties file contains the following contents..

    appserver.home=D:/apache-tomcat-6.0.18
    appserver.lib=${appserver.home}/lib
    deploy.path=${appserver.home}/webapps

    tomcat.manager.url=localhost:8080/manager #url with protocol
    tomcat.manager.username=tomcat
    tomcat.manager.password=s3cret
    -----------

    Is there any more configuration file required?

    Still I'm having the same problem...

  4. #4

    Default

    Quote Originally Posted by ram2206 View Post
    Thank you for your reply...

    The build.properties file contains the following contents..

    appserver.home=D:/apache-tomcat-6.0.18
    appserver.lib=${appserver.home}/lib
    deploy.path=${appserver.home}/webapps

    tomcat.manager.url=localhost:8080/manager #url with protocol
    tomcat.manager.username=tomcat
    tomcat.manager.password=s3cret
    -----------

    Is there any more configuration file required?

    Still I'm having the same problem...
    Are you sure your tomcat manager username and passwords are correct?
    check inside D:/apache-tomcat-6.0.18/conf/tomcat-users.xml

  5. #5
    Join Date
    Sep 2008
    Location
    India
    Posts
    12

    Default

    Thank you for your quick reply...
    Yes, I am sure...

    D:\apache-tomcat-6.0.18\conf\tomcat-users.xml contains the following...

    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="manager"/>
    <user username="tomcat" password="s3cret" roles="manager"/>

    </tomcat-users>

  6. #6
    Join Date
    Sep 2008
    Location
    India
    Posts
    12

    Default

    Still I'm having the same problem...

  7. #7

    Default

    Quote Originally Posted by ram2206 View Post
    Thank you for your quick reply...
    Yes, I am sure...

    D:\apache-tomcat-6.0.18\conf\tomcat-users.xml contains the following...

    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="manager"/>
    <user username="tomcat" password="s3cret" roles="manager"/>

    </tomcat-users>
    Can u show us the build.xml file?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •