Hi,

Thank you all for your answers.

First, the struts-*.jar files are in each webapp's WEB-INF/lib directory, not 
in Tomcat's shared folder. And both apps use the same version of Struts.

I found the following exception (see full stack trace below) that I failed to 
see before, in the localhost*.log file from Tomcat :

org.apache.xerces.parsers.XML11Configuration cannot be cast to 
org.apache.xerces.xni.parser.XMLParserConfiguration

After googlig it and reading some posts other posts about similar issues 
suggesting that it could be a conflict between xerces library from the webapp 
and from the jdk's libs, I removed the xerces jar (it was xerces-2.6.2) from 
both apps. It solved the problem, and now both apps start normally on the same 
tomcat instance.

See : http://www.mail-archive.com/d...@tomcat.apache.org/msg24296.html and 
http://issues.appfuse.org/browse/APF-846 

Why the problem happened only when the 2 apps were deployed, and only for one 
of the two apps remains a mistery to me... If somebody has a clue as to what 
was happening exactly, I'd be interested !

Thanks again for the help

Pierre

The xerces problem stack trace :

17 août 2009 09:46:22 org.apache.catalina.core.StandardContext filterStart
FIN:  Starting filter 'struts2'
17 août 2009 09:46:23 org.apache.catalina.core.StandardContext filterStart
GRAVE: Exception au d�marrage du filtre struts2
Unable to load configuration. - [unknown location]
        at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
        at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
        at 
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
        at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
        at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
        at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
        at 
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
        at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
        at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        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:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Caught exception while loading file struts-default.xml - [unknown 
location]
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:894)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:144)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:111)
        at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:164)
        at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
        ... 31 more
Caused by: java.lang.ClassCastException: 
org.apache.xerces.parsers.XML11Configuration cannot be cast to 
org.apache.xerces.xni.parser.XMLParserConfiguration
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
        at 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown 
Source)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:69)
        at 
com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:392)
        at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.setResult(TransformerHandlerImpl.java:137)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.setup(DomHelper.java:205)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:190)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:181)
        at 
com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:167)
        at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:107)
        at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:885)
        ... 35 more


-----Message d'origine-----
De : Wes Wannemacher [mailto:w...@wantii.com] 
Envoyé : vendredi 14 août 2009 17:37
À : Struts Users Mailing List
Objet : Re: Impossible to start two Struts 2 apps at the same time on Tomcat 6

Just curious, where are the struts-*.jar files? I vaguely remember a
classloader issue if you are trying to put the jars in one of Tomcat's
shared jar folders.

-Wes

On Fri, Aug 14, 2009 at 11:00 AM, HENRY Pierre<pierre.he...@unine.ch> wrote:
> Hi,
>
> I have 2 separate Struts 2 webapps, based both on Struts 2.1.6.
>
> Both webapps work fine when deployed separately on Tomcat 6.0.18. But when I 
> deploy both at the same time on the same Tomcat, one is working (the first 
> one alphabetically) and the seconds doesn’t start up, it gives me the 
> infamous  ‘SEVERE : error filterStart’ in the logs, and not much more 
> meaningful information as to why it’s crashing. (I set the log level to DEBUG 
> for the struts2 and xworks2 packages in log4j).
>
> If I comment out the struts 2 filter and filter mapping segments in the 
> web.xml of the second webapp, then the webapp starts without error (but of 
> course it doesn’t work), that’s why I think the problem is related to having 
> 2 Struts 2 webapps together.
>
> Thanks for any advice. I would like to at least have a stack trace…
>
> My config :
> Vista 64
> Tomcat 6.0.18
> Struts 2.1.6
> Besides that my apps also use Hibernate, Quartz, Tiles…
>
> Pierre
>
>
>
> The log of Tomcat’s startup :
>
> Listening for transport dt_socket at address: 8888
> 14 ao¹t 2009 15:53:14 org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not fou
> nd on the java.library.path: c:\Program Files 
> (x86)\Java\jdk1.6.0_13\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C
> :\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program 
> Files\Intel\DMIX;C:\Program Files (x86)\Com
> mon Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio 
> Shared\DLLShared;C:\Program Files (x86)\Commo
> n Files\Roxio 
> Shared\9.0\DLLShared;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program 
> Files (x86)\WinSCP\;C:\Program
> Files\SlikSvn\bin\;C:\Program Files\TortoiseSVN\bin;C:\Program Files 
> (x86)\CVSNT\
> 14 ao¹t 2009 15:53:14 org.apache.coyote.http11.Http11Protocol init
> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
> 14 ao¹t 2009 15:53:14 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 319 ms
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardService start
> INFO: D´┐¢marrage du service Catalina
> 14 ao¹t 2009 15:53:15 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
> 15:53:15,755 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,760 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,793 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:15,796 - [thread:main] 
> org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
> WARN:'Cannot find TilesRequestContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesRequestContextFactory'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Initializing filter...'
> 15:53:16,569 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateSessionInterceptor.init()
> INFO:'Obtaining SessionFactory from static HibernateUtil singleton'
> 15:53:19,482 - [thread:main] 
> ch.unine.sitel.bipeadmin.hibernate.HibernateUtil.<clinit>()
> DEBUG:'Hibernate session factory created.'
> 15:53:19,502 - [thread:main] 
> ch.unine.sitel.bipeadmin.struts.security.SecurityInterceptor.init()
> INFO:'Intializing the securityInterceptor.'
> 15:53:19,506 - [thread:main] 
> ch.unine.sitel.bipeadmin.services.SecurityService.reloadFile()
> INFO:'Reloading permissions.xml file because it has changed.'
> 15:53:20,602 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,610 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,649 - [thread:main] 
> org.apache.tiles.context.ChainedTilesApplicationContextFactory.init()
> WARN:'Cannot find TilesContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory'
> 15:53:20,653 - [thread:main] 
> org.apache.tiles.context.ChainedTilesRequestContextFactory.init()
> WARN:'Cannot find TilesRequestContextFactory class 
> org.apache.tiles.portlet.context.PortletTilesRequestContextFactory'
> 15:53:20,727 - [thread:main] 
> ch.unine.sitel.bipemailing.jobs.QuartzStartContextListener.contextInitialized()
> INFO:'QuartzStartContextListener is starting Quartz jobs...'
> 14 ao¹t 2009 15:53:20 ch.unine.sitel.bipemailing.jobs.QuartzUtils getQuartz
> INFO: Starting the Quartz scheduler and save its instance
> 15:53:20,847 - [thread:main] 
> ch.unine.sitel.bipemailing.jobs.QuartzStartContextListener.startFonctionsMonitoringJob()
> INFO:'Scheduling FonctionsMonitoringJob using cron pattern '0 * * * * ?'...'
> 15:53:20,927 - [thread:main] 
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.debug()
> DEBUG:'Loading action configurations from: struts-default.xml'
> 14 ao¹t 2009 15:53:20 org.apache.catalina.core.StandardContext start
> GRAVE: Error filterStart
> 14 ao¹t 2009 15:53:20 org.apache.catalina.core.StandardContext start
> GRAVE: Erreur de d´┐¢marrage du contexte [/BIPE-Mailing] suite aux erreurs 
> pr´┐¢c´┐¢dentes
> 14 ao¹t 2009 15:53:21 org.apache.coyote.http11.Http11Protocol start
> INFO: D´┐¢marrage de Coyote HTTP/1.1 sur http-8080
> 14 ao¹t 2009 15:53:21 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 14 ao¹t 2009 15:53:21 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=1/27  config=null
> 14 ao¹t 2009 15:53:21 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 6390 ms
>
>
> Pierre Henry
> Software Engineer
> -------------------------------------------------
> pierre.he...@unine.ch
> +41 32 718 20 45
> -------------------------------------------------
> Université de Neuchâtel
> Service Informatique et Télématique
> Rue Emile-Argand 11
> Case postale 158
> CH-2009 Neuchâtel
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to