Passed the old guide on the spring spring step by step

I did everything clean as it was written, but one problem arose: when I tried to launch the Ant task to launch, Tomcat throws out the Connection error. I ran over the English-speaking tops, but I could not find a suitable solution.

<path id="catalina-ant-classpath"> <!-- We need the Catalina jars for Tomcat --> <!-- * for other app servers - check the docs --> <fileset dir="${appserver.lib}"> <include name="catalina-ant.jar"/> </fileset> </path> <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"> <classpath refid="catalina-ant-classpath"/> </taskdef> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"> <classpath refid="catalina-ant-classpath"/> </taskdef> <taskdef name="list" classname="org.apache.catalina.ant.ListTask"> <classpath refid="catalina-ant-classpath"/> </taskdef> <taskdef name="start" classname="org.apache.catalina.ant.StartTask"> <classpath refid="catalina-ant-classpath"/> </taskdef> <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"> <classpath refid="catalina-ant-classpath"/> </taskdef> <target name="install" description="Install application in Tomcat"> <install url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${name}" war="${name}"/> </target> <target name="reload" description="Reload application in Tomcat"> <reload url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${name}"/> </target> <target name="start" description="Start Tomcat application"> <start url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${name}"/> </target> <target name="stop" description="Stop Tomcat application"> <stop url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${name}"/> </target> <target name="list" description="List Tomcat applications"> <list url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}"/> </target> 

Mistake:

 Buildfile: C:\JavaProjects\springapp\build.xml list: BUILD FAILED F:\Java Programs\Ant project folder\springapp\build.xml:123: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478).... 

Maybe someone came across. Advise how to fix. Thank you in advance

  • What in this line is build.xml: 123? - Vladislav Pyatkov
  • @VladislavPyatkov, in that line path = "/ $ {name}", where name is a property with the value springapp. I thought that I did not connect because of the installation of tomcat on the system disk (the rights type is not enough), but transferring to another disk gives the same result. - I. Smirnov
  • I think the reason is that the upserver does not start, and only then it is impossible to join it. Try to run it by hand, in% CATALINA_HOME% \ bin \ startup - Vladislav Pyatkov

0