Results 1 to 6 of 6

Thread: Having a problem w/tomcat-connect in "Developing a Spring Framework MVC - Part 1"

  1. #1
    Join Date
    Jun 2006
    Posts
    5

    Default Having a problem w/tomcat-connect in "Developing a Spring Framework MVC - Part 1"

    Hi,

    I am going through the tutorial at http://www.springframework.org/docs/...ep-Part-1.html and I am trying to run the ANT directives for controlling tomcat ... eg, ant start . I copied the build.xml file verbatim. Here is the shell input/output.

    C:\dev\springapp>ant start
    Buildfile: build.xml

    start:

    BUILD FAILED
    C:\dev\springapp\build.xml:103: java.net.ConnectException: Connection refused: connect


    Any suggestions/thoughts on the problem could be?

    Thank you,

    Gene

  2. #2
    Join Date
    Apr 2006
    Location
    Oslo, Norway
    Posts
    23

    Default Wrong Tomcat address?

    Could it be that you have input the wrong path to the Tomcat installation? Or maybe wrong username or password?

  3. #3
    Join Date
    Jun 2006
    Posts
    5

    Default

    hi, i thought you might be interested to know i checked out the config stuff and it all looked right... finally I started Tomcat manually and actually/manually logged into the manager ... then it worked from ANT to start & stop it after that ... maybe there was some init thing that needed to happen? thanks for the nudge to keep at it

  4. #4
    Join Date
    Jun 2006
    Location
    Roma (Italy)
    Posts
    9

    Default

    hello ,
    i'm following the same exmaple to start working with Spring..

    I have this problem when trying to reach hello.htm how the exmaple explain

    org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'springappcontroller' defined in ServletContext resource [/WEB-INF/springapp-servlet.xml]: Bean class [SpringappController] not found; nested exception is java.lang.ClassNotFoundException: SpringappController

    why the context can't find my .class?
    any suggestion ?
    thanks for the help.

  5. #5

    Default "Developing a Spring Framework MVC - Part 1"

    I had a similar problem and needed to add the fully qualified name to the bean class. See below.

    <bean id="SpringTutorialController" class="com.ibx.SpringTutorial.controller.SpringTut orialController"/>

    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">

    <property name="mappings">
    <props>
    <prop key="/hello.htm">SpringTutorialController</prop>
    </props>
    </property>
    </bean>

  6. #6

    Default

    Quote Originally Posted by gkasrel
    Hi,

    I am going through the tutorial at http://www.springframework.org/docs/...ep-Part-1.html and I am trying to run the ANT directives for controlling tomcat ... eg, ant start . I copied the build.xml file verbatim. Here is the shell input/output.

    C:\dev\springapp>ant start
    Buildfile: build.xml

    start:

    BUILD FAILED
    C:\dev\springapp\build.xml:103: java.net.ConnectException: Connection refused: connect


    Any suggestions/thoughts on the problem could be?

    Thank you,

    Gene
    Actually, I was facing the same problem till you realize the simple fact that the start and stop targets as described by the build.xml are only referring to starting and stopping the application itself and not the server. So for the application to be started or stopped, the foremost requirement is for the server to be running in the first place. That is why you kepy getting that connect error simply because the server was not running at all. Hope that helps. If you want the targets to start and stop the server, let me know and I will post it for you.

    Cheers!

Posting Permissions

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