I have encountered the same behavior in the past with out configuration apache + tomcat, the context start the first time after tomcat restart and a second time with the first apache connection. Using the following serveur.xml configuration the thing are now running well:
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" liveDeploy="false"> ----- Original Message ----- From: "Asher Tarnopolski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 18, 2004 2:02 PM Subject: context loaded twice > hi, > a strange thing i can't find a sollution for. > > i have a web app that runs in tomcat's root (placed in \webapps\ROOT). > don't ask me why, it's just there. > the controller servlet of the app has <load-on-startup>1.. > it also prints in output "START INIT" when loaded. > > when i start tomcat i see this: > > code: > -------------------------------------------------------------------------- ------ > > Apache Tomcat/4.1.31WebappLoader[]: Deploying class repositories to work > directory > C:\jakarta-tomcat-4.1.31\webapps\ROOT\work\org\apache\jspWebappLoader[]: > Deploy class files /WEB-INF/classes to > C:\jakarta-tomcat-4.1.31\webapps\ROOT\WEB-INF\classesWebappLoader[]: > Reloading checks are enabled for this ContextStandardManager[]: Seeding > random number generator class java.security.SecureRandomStandardManager[]: > Seeding of random number generator has been completedStandardWrapper[ > efault]: Loading container servlet defaultSTART INIT > > -------------------------------------------------------------------------- ------ > > > and then once more the same thing: > > code: > -------------------------------------------------------------------------- ------ > > WebappLoader[/]: Deploying class repositories to work directory > C:\jakarta-tomcat-4.1.31\webapps\ROOT\work\org\apache\jspWebappLoader[/]: > Deploy class files /WEB-INF/classes to > C:\jakarta-tomcat-4.1.31\webapps\ROOT\WEB-INF\classesWebappLoader[/]: > Reloading checks are enabled for this ContextStandardManager[/]: Seeding > random number generator class > java.security.SecureRandomStandardManager[/]: Seeding of random number > generator has been completedStandardWrapper[/ efault]: Loading container > servlet defaultSTART INIT > > -------------------------------------------------------------------------- ------ > > > tomcat not only prints the report twice, it loads the webapp twice, > because right after the second time i get a nasty exception: > > code: > -------------------------------------------------------------------------- ------ > > ServerLifecycleListener: processContainerAddChild: > Throwablejavax.management.InstanceAlreadyExistsException: > Catalina:type=Context,path=/,host=localhost,service=Tomcat-Standalone at > mx4j.server.MBeanServerImpl.register(MBeanServerImpl.java:1123) at > mx4j.server.MBeanServerImpl.registerImpl(MBeanServerImpl.java:1054) at > mx4j.server.MBeanServerImpl.registerMBeanImpl(MBeanServerImpl.java:1002) > at mx4j.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:978) > > -------------------------------------------------------------------------- ------ > > > > tomcat doesn't die, and the application runs ok. but still, i don't wanna > leave it as it is,, knowing that something is wrong. > any ideas? > thanks > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
