Hi Peter, I downloaded the 5.5.15 beta from Apache Tomcat downloads page and installed it on my desktop. But I found the same issue was still there with this version when I used its admin console webapp to add a new host and store config to the server.xml. The following is the resultant server.xml.
<?xml version="1.0" encoding="UTF-8"?> <Server port="6005"> <Listener className="org.apache.catalina.core.AprLifecycleListener"/> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/> <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/> <GlobalNamingResources> <Environment name="simpleValue" type="java.lang.Integer" value="30"/> <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase" pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/> </GlobalNamingResources> <Service name="Catalina"> <Connector port="6080" redirectPort="6443" minSpareThreads="25" connectionTimeout="60000" connectionLinger="-1" serverSoTimeout="0" maxSpareThreads="75" maxThreads="150" tcpNoDelay="true" maxHttpHeaderSize="8192"> </Connector> <Connector port="6009" redirectPort="6443" protocol="AJP/1.3"> </Connector> <Engine defaultHost="localhost" name="Catalina"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/> <Host appBase="webapps" name="localhost"> </Host> <Host appBase="webapps" name="gyvh"> Thanks, Eric -----Original Message----- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: 2006年1月16日 18:30 To: Tomcat Developers List Subject: Re: truncated server.xml got when storing config on condition that more than one vitual host with same application base directory "webapps" were defined. It storeconfig server.xml saving after add a new host works for me! I have tested with current svn head. create host with fixed MBean descriptor from MBeanFactory (Thanks for this) and store server.xml with mbean StoreConfig.storeConfig(). Regards Peter My saved server.xml looks like this: <?xml version="1.0" encoding="UTF-8"?> <Server port="8010" shutdown="8010"> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/ > <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener" /> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/> <GlobalNamingResources> <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase" pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/> </GlobalNamingResources> <Service name="Catalina"> <Connector URIEncoding="UTF-8" port="8011" connectionTimeout="60000" connectionLinger="-1" serverSoTimeout="0" maxSpareThreads="10" maxThreads="25" tcpNoDelay="true"> </Connector> <Connector URIEncoding="UTF-8" port="8012" minSpareThreads="4" request.registerRequests="true" maxSpareThreads="10" maxThreads="25" acceptCount="100" protocol="AJP/1.3"> </Connector> <Engine defaultHost="localhost" jvmRoute="webdev" name="Catalina"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" digest="MD5"/> <Host appBase="webapps" name="localhost"> </Host> <Host appBase="webapps" name="myhost" xmlNamespaceAware="true" xmlValidation="true"> </Host> </Engine> </Service> </Server> Am 16.01.2006 um 11:03 schrieb Yong Gou: > Hi Peter, > > There were just some info, no severe exception was thrown. You can > try it in your environment. > > Thanks, > Eric > > > -----Original Message----- > From: Peter Rossbach [mailto:[EMAIL PROTECTED] > Sent: 2006年1月16日 17:39 > To: Tomcat Developers List > Subject: Re: truncated server.xml got when storing config on > condition that more than one vitual host with same application base > directory "webapps" were defined. > > Hey, > > see you any exception inside your log? > > Regards > peter > > > Am 16.01.2006 um 09:29 schrieb Yong Gou: > >> The version of Tomcat server is 5.5.12 >> >> -----Original Message----- >> From: Yong Gou >> Sent: 2006年1月16日 16:24 >> To: dev@tomcat.apache.org >> Subject: truncated server.xml got when storing config on condition >> that more than one vitual host with same application base directory >> "webapps" were defined. >> >> Hi, >> >> >> >> I am not sure if the following is an issue of Tomcat JMX server or an >> improper usage? Is there anyone who has experienced the same? >> >> In addition to the virtual host localhost which is predefined by >> Tomcat >> server as the default on a Tomcat server, I created another virtual >> host >> testvh on the server with its attribute appBase being specified as >> webapps and other attributes having their default values via Tomcat >> admin console webapp, and then clicked the "commit changes" button to >> save all configurations to the server's server.xml file. The >> operations >> resulted in the following server.xml. >> >> NOTE that the Host, Engine, Service and Server elements are not >> closed. >> This is an incomplete server.xml. However if I specified another >> value >> other than webapps for its attribute appBase when the virtual host >> testvh was created, the issue would disappear and I could get a >> correct >> server.xml. You can try to define more virtual hosts with the same >> appBase webapps if two cannot reproduce the issue. >> >> >> >> <?xml version="1.0" encoding="UTF-8"?> >> >> <Server >> >> port="9005"> >> >> <Listener >> className="org.apache.catalina.core.AprLifecycleListener"/> >> >> <Listener >> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListene >> r >> "/ >>> >> >> <Listener >> className="org.apache.catalina.storeconfig.StoreConfigLifecycleListen >> e >> r" >> /> >> >> <Listener >> className="org.apache.catalina.mbeans.ServerLifecycleListener"/> >> >> <GlobalNamingResources> >> >> <Environment >> >> name="simpleValue" >> >> type="java.lang.Integer" >> >> value="30"/> >> >> <Resource >> >> auth="Container" >> >> description="User database that can be updated and saved" >> >> name="UserDatabase" >> >> type="org.apache.catalina.UserDatabase" >> >> pathname="conf/tomcat-users.xml" >> >> factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/> >> >> </GlobalNamingResources> >> >> <Service >> >> name="Catalina"> >> >> <Connector >> >> port="9080" >> >> redirectPort="9443" >> >> minSpareThreads="25" >> >> connectionTimeout="20000" >> >> maxThreads="150" >> >> maxSpareThreads="75" >> >> maxHttpHeaderSize="8192"> >> >> </Connector> >> >> <Connector >> >> port="9009" >> >> redirectPort="9443" >> >> protocol="AJP/1.3"> >> >> </Connector> >> >> <Engine >> >> defaultHost="localhost" >> >> name="Catalina"> >> >> <Realm >> className="org.apache.catalina.realm.UserDatabaseRealm"/> >> >> <Host >> >> appBase="webapps" >> >> name="testvh"> >> >> <Context >> >> path="/TomcatLogHelper"> >> >> >> <WatchedResource>d:\javadev\apache\tomcat2\conf\context.xml</ >> WatchedReso >> urce> >> >> </Context> >> >> </Host> >> >> <Host >> >> appBase="webapps" >> >> name="localhost"> >> >> <Alias>gy</Alias> >> >> <Context >> >> path="/TomcatLogHelper"> >> >> >> <WatchedResource>d:\javadev\apache\tomcat2\conf\context.xml</ >> WatchedReso >> urce> >> >> </Context> >> >> >> >> Thanks, >> >> Eric >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> 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] > > > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]