Re: Problem reloading Struts 2 app in Tomcat and Eclipse
>1) the correct JDK (think 5.5.28 runs with 1.5, doesn't it ?) Running with JDK 1.6.0_16 > 2) the correct xerces - libraries in your classpath I've got xercesImpl.jar (2.9.1) in my WEB-INF/lib folder and as far as I know that is the only SAXParser. > 3) not any other libraries in your classpath that provide a SaxParser. Not that I'm aware of but how would I know? I have Struts 2 and Hibernate and all there dependent jars but nothing else that looks like it's an XML parser. >regarding your reloading problem I have another idea. Look here, >if you have the next problem :) >http://tomcat.apache.org/tomcat-5.5-doc/config/context.html I not finding anything that looks like a problem off this link. Again, everything works when I launch Tomcat fresh or restart it from within Eclipse. I only get the error when Tomcat attempts to reload the application. Here seems to be the core issue: Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration Any ideas on how to figure out what is going on? On Thu, Feb 25, 2010 at 4:13 PM, Volker Karlmeier wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi again, > > regarding your reloading problem I have another idea. Look here, > if you have the next problem :) > http://tomcat.apache.org/tomcat-5.5-doc/config/context.html > > regards > > Volker > > > > Am 24.02.2010 16:33, schrieb Greg Lindholm: >> I decided to finally ask about this problem I've been seeing for >> several years. During development I will run my Struts 2 (2.1.8) >> apps in Tomcat (5.5.25) from Eclipse (3.5.1). I've included the >> current versions I'm using but this problem goes way back over many >> different versions over a couple years. >> >> Here's the problem, if I make any changes while the app is running >> like change a properties file of change a class, Eclipse will push >> the changes to the deploy area and Tomcat will see the change and >> attempt to reload the application (that's all good and expected). >> However the reload always fails with the exception stack below and >> I have to manually stop and restart Tomcat to get it to load >> successfully and see the updates. I never had this problem with >> Struts 1 or even JSF, Tomcat was always able to reload the apps >> automatically. >> >> Anyone have any idea why the reload is failing and how to fix? >> >> Here is the stack dump: >> >> Feb 24, 2010 10:15:44 AM >> org.apache.catalina.loader.WebappClassLoader findResourceInternal >> INFO: Illegal access: this web application instance has been >> stopped already. Could not load >> META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration. >> >> > The eventual following stack trace is caused by an error thrown for >> debugging purposes as well as to attempt to terminate the thread >> which caused the illegal access, and has no functional impact. >> 2010-02-24 10:15:44,081 ERROR >> org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher >> initialization failed 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:374) >> at >> org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) >> at >> org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) >> >> > at > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) >> at >> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221) >> >> > at > org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302) >> at >> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:78) >> >> > at > org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635) >> at >> org.apache.catalina.core.StandardContext.start(StandardContext.java:4222) >> >> > at > org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025) >> at >> org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432) >> >> > at > org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278) >> at >> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) >> >> > at > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) >> at >> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) >> >> > at > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) >> at java.lang.Thread.run(Thread.java:619) Caused by: Caught >> exception while loading file struts-default.xml - [unknown >> location] at >> com.op
Re: Problem reloading Struts 2 app in Tomcat and Eclipse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again, regarding your reloading problem I have another idea. Look here, if you have the next problem :) http://tomcat.apache.org/tomcat-5.5-doc/config/context.html regards Volker Am 24.02.2010 16:33, schrieb Greg Lindholm: > I decided to finally ask about this problem I've been seeing for > several years. During development I will run my Struts 2 (2.1.8) > apps in Tomcat (5.5.25) from Eclipse (3.5.1). I've included the > current versions I'm using but this problem goes way back over many > different versions over a couple years. > > Here's the problem, if I make any changes while the app is running > like change a properties file of change a class, Eclipse will push > the changes to the deploy area and Tomcat will see the change and > attempt to reload the application (that's all good and expected). > However the reload always fails with the exception stack below and > I have to manually stop and restart Tomcat to get it to load > successfully and see the updates. I never had this problem with > Struts 1 or even JSF, Tomcat was always able to reload the apps > automatically. > > Anyone have any idea why the reload is failing and how to fix? > > Here is the stack dump: > > Feb 24, 2010 10:15:44 AM > org.apache.catalina.loader.WebappClassLoader findResourceInternal > INFO: Illegal access: this web application instance has been > stopped already. Could not load > META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration. > > The eventual following stack trace is caused by an error thrown for > debugging purposes as well as to attempt to terminate the thread > which caused the illegal access, and has no functional impact. > 2010-02-24 10:15:44,081 ERROR > org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher > initialization failed 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:374) > at > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) > at > org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) > > at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) > at > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221) > > at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302) > at > org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:78) > > at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4222) > > at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025) > at > org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432) > > at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278) > at > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) > > at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) > at > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) > > at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) > at java.lang.Thread.run(Thread.java:619) Caused by: Caught > exception while loading file struts-default.xml - [unknown > location] at > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902) > > at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143) > at > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110) > > at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168) > at > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) > > ... 17 more > Caused by: java.lang.ClassCastException: > org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot > be cast to org.apache.xerces.xni.parser.XMLParserConfiguration at > org.apache.xerces.parsers.DOMParser.(Unknown Source) at > org.apache.xerces.parsers.DOMParser.(Unknown Source) at > org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source) > at > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown > > Source) > at > com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326) > > at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.(SAX2DOM.java:85) > at > com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSeri
Re: Problem reloading Struts 2 app in Tomcat and Eclipse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, that seems to me as if you have a problem with your sax-parser. You should have a look if you have 1) the correct JDK (think 5.5.28 runs with 1.5, doesn't it ?) 2) the correct xerces - libraries in your classpath 3) not any other libraries in your classpath that provide a SaxParser. Maybe this helps. regards Volker Am 24.02.2010 16:33, schrieb Greg Lindholm: > I decided to finally ask about this problem I've been seeing for > several years. During development I will run my Struts 2 (2.1.8) > apps in Tomcat (5.5.25) from Eclipse (3.5.1). I've included the > current versions I'm using but this problem goes way back over many > different versions over a couple years. > > Here's the problem, if I make any changes while the app is running > like change a properties file of change a class, Eclipse will push > the changes to the deploy area and Tomcat will see the change and > attempt to reload the application (that's all good and expected). > However the reload always fails with the exception stack below and > I have to manually stop and restart Tomcat to get it to load > successfully and see the updates. I never had this problem with > Struts 1 or even JSF, Tomcat was always able to reload the apps > automatically. > > Anyone have any idea why the reload is failing and how to fix? > > Here is the stack dump: > > Feb 24, 2010 10:15:44 AM > org.apache.catalina.loader.WebappClassLoader findResourceInternal > INFO: Illegal access: this web application instance has been > stopped already. Could not load > META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration. > > The eventual following stack trace is caused by an error thrown for > debugging purposes as well as to attempt to terminate the thread > which caused the illegal access, and has no functional impact. > 2010-02-24 10:15:44,081 ERROR > org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher > initialization failed 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:374) > at > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) > at > org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) > > at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) > at > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221) > > at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302) > at > org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:78) > > at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4222) > > at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025) > at > org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432) > > at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278) > at > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) > > at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) > at > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) > > at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) > at java.lang.Thread.run(Thread.java:619) Caused by: Caught > exception while loading file struts-default.xml - [unknown > location] at > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902) > > at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143) > at > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110) > > at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168) > at > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) > > ... 17 more > Caused by: java.lang.ClassCastException: > org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot > be cast to org.apache.xerces.xni.parser.XMLParserConfiguration at > org.apache.xerces.parsers.DOMParser.(Unknown Source) at > org.apache.xerces.parsers.DOMParser.(Unknown Source) at > org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source) > at > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown > > Source) > at > com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326) > > at com.sun.org.apache.xalan.int
Problem reloading Struts 2 app in Tomcat and Eclipse
I decided to finally ask about this problem I've been seeing for several years. During development I will run my Struts 2 (2.1.8) apps in Tomcat (5.5.25) from Eclipse (3.5.1). I've included the current versions I'm using but this problem goes way back over many different versions over a couple years. Here's the problem, if I make any changes while the app is running like change a properties file of change a class, Eclipse will push the changes to the deploy area and Tomcat will see the change and attempt to reload the application (that's all good and expected). However the reload always fails with the exception stack below and I have to manually stop and restart Tomcat to get it to load successfully and see the updates. I never had this problem with Struts 1 or even JSF, Tomcat was always able to reload the apps automatically. Anyone have any idea why the reload is failing and how to fix? Here is the stack dump: Feb 24, 2010 10:15:44 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. 2010-02-24 10:15:44,081 ERROR org.apache.struts2.dispatcher.Dispatcher:27 - Dispatcher initialization failed 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:374) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:78) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) at java.lang.Thread.run(Thread.java:619) Caused by: Caught exception while loading file struts-default.xml - [unknown location] at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) ... 17 more Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration at org.apache.xerces.parsers.DOMParser.(Unknown Source) at org.apache.xerces.parsers.DOMParser.(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326) at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.(SAX2DOM.java:85) 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