Reputation: 121
I followed the simple steps, for achieving this. Integrated Tomcat and Maven with eclipse. 1. Open eclipse. New->other -> maven project -> webapp 2. Added plugins for tomcat. 3. Right click the POM file and run as maven clean 4. run as maven generate sources 5. run as maven build. 6. passed the command tomcat:run But getting the following error,
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:run (default-cli) on project simplehelloworld: Could not start Tomcat: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind <null>:8080 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Upvotes: 0
Views: 946
Reputation: 1204
Could not start Tomcat: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind <null>:8080
above error means that there is already a service running on port 8080. is there a tomcat server running already?
if any service running on 8080 then you close shut it or you need to change the connector configuration in server.xml to something like below :
<Connector port="9090" protocol="AJP/1.3" redirectPort="8443"/>
you can find if this port already in use or not, refer this link.
Upvotes: 1