You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robert Koberg <ro...@koberg.com> on 2006/06/16 01:32:07 UTC

extending Embedded (basically copying Catalina) - Address already in use: JVM_Bind:80

Hi,

I want to use a standard startup the same way startup.sh -> catalina.sh 
-> Bootstrap -> Catalina handles it.

I want to make the (standard)server available to a custom manager in the 
main webapp. I want to be able to start up a Context when a user enters 
a project in my webapp (i.e. I don't want/need all contexts to added at 
startup) and close a context down when no user remains in the project. 
(Access to the context is not needed immediately upon entering as 
project.) (lazy context loading and unloading?)

I have basically copied the above files and modified them for my 
script/package/class names. When I try to start tomcat I get a 
java.net.BindException. I have tried a couple different ports (even 
though I know nothing else is running on those ports).

When I set logging to DEBUG I see that the server starts up once and 
tries to start up again, causing the BindException.

The one thing that I had to do differently (other than changing package 
and  class names) for my version of the catalina.sh was add several jar 
files from the common/lib and server/lib that are not needed by the real 
catalina.sh/startup.

(for the stacktrace included below)
I have added a jar containing only com.freshstory.ripple.server.Ripple 
to the server/lib dir which is basically a duplpicate of Catalina. And 
have added a jar containing only 
com.freshstory.ripple.startup.RippleBootstrap to the bin dir ()basically 
a duplicate of Bootstrap). I have added those jars to the classpath in 
my version of the catalina.sh.

Any ideas on what I am doing wrong or better ways of handling it?

A basic stack trace is here:

15 Jun 2006 17:30:00,859 [main] ERROR (Http11BaseProtocol.java 
[start]:152) - Error starting endpoint
java.net.BindException: Address already in use: JVM_Bind:80
     at 
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
     at 
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
     at 
org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:150)
     at 
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75)
     at org.apache.catalina.connector.Connector.start(Connector.java:1089)
     at 
org.apache.catalina.core.StandardService.start(StandardService.java:459)
     at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
     at com.freshstory.ripple.server.Ripple.start(Ripple.java:158)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at 
com.freshstory.ripple.startup.RippleBootstrap.start(RippleBootstrap.java:233)
     at 
com.freshstory.ripple.startup.RippleBootstrap.main(RippleBootstrap.java:361)



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org