AppFuse JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile
  • AppFuse
  • APF-846

Exception when jetty tries to restart webapp after change in watched files

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 2.0-M5
  • Fix Version/s: 2.0 Final
  • Component/s: Web - Struts
  • Labels:
    None
  • Environment:
    Windows Vista, JDK 1.6.0_02

Description

When jetty attempts to restart the webapp (via jetty:run goal), an exception is thrown.
This bug does not occur under JDK 5.

[ERROR] Error reconfiguring/restarting webapp after change in watched files
Caught exception while loading file struts-default.xml - [unknown location]
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:795)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:132)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:95)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:545)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1137)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:420)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:461)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
        at org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:138)
        at org.mortbay.jetty.plugin.Jetty6RunWar$1.changesDetected(Jetty6RunWar.java:129)
        at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:158)
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.<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:213)
        at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:198)
        at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:189)
        at com.opensymphony.xwork2.util.DomHelper$DOMBuilder.<init>(DomHelper.java:175)
        at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:786)
        ... 17 more

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Source
Hide
Permalink
jlorusso@tlcdelivers.com added a comment - 13/Aug/07 8:38 AM
The exception suggests that this is related to the version of xerces used by the jdk.

When I added my own xerces.jar, xercesImpl.jar, xalan.jar, and xml-apis.jar to
$JAVA_HOME/jre/lib/endorsed, the problem was resolved.

Show
jlorusso@tlcdelivers.com added a comment - 13/Aug/07 8:38 AM The exception suggests that this is related to the version of xerces used by the jdk. When I added my own xerces.jar, xercesImpl.jar, xalan.jar, and xml-apis.jar to $JAVA_HOME/jre/lib/endorsed, the problem was resolved.
Hide
Permalink
Matt Raible added a comment - 17/Sep/07 12:30 PM
This seems to be caused by JDK 6 and is out of my control as far as fixing it.
Show
Matt Raible added a comment - 17/Sep/07 12:30 PM This seems to be caused by JDK 6 and is out of my control as far as fixing it.
Hide
Permalink
Jason Wood added a comment - 02/Dec/07 7:28 PM
Thanks for the suggestion above. An alternative if you are using Apache Tomcat is to put the JAR files in the $TOMCAT_HOME/shared/lib/ directory, then restart Tomcat.
Show
Jason Wood added a comment - 02/Dec/07 7:28 PM Thanks for the suggestion above. An alternative if you are using Apache Tomcat is to put the JAR files in the $TOMCAT_HOME/shared/lib/ directory, then restart Tomcat.
Hide
Permalink
Carlos Sanchez added a comment - 30/Oct/08 12:37 AM
I actually fixed it by adding xalan to WEB-INF/lib probably missing in some dependency' pom because it's definitely used

    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>2.7.1</version>
    </dependency>
Show
Carlos Sanchez added a comment - 30/Oct/08 12:37 AM I actually fixed it by adding xalan to WEB-INF/lib probably missing in some dependency' pom because it's definitely used     <dependency>       <groupId>xalan</groupId>       <artifactId>xalan</artifactId>       <version>2.7.1</version>     </dependency>
Hide
Permalink
Matt Raible added a comment - 30/Oct/08 11:35 AM
Xalan itself isn't excluded in any pom's:

$ grep -R -i 'xalan' . (== no results)

Xerces is excluded since it doesn't seem to be needed. From service/pom.xml:

        <dependency>
            <groupId>org.codehaus.xfire</groupId>
            <artifactId>xfire-java5</artifactId>
            <version>${xfire.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-attributes</groupId>
                    <artifactId>commons-attributes-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jaxen</groupId>
                    <artifactId>jaxen</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xmlParserAPIs</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ws.commons</groupId>
                    <artifactId>XmlSchema</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
Show
Matt Raible added a comment - 30/Oct/08 11:35 AM Xalan itself isn't excluded in any pom's: $ grep -R -i 'xalan' . (== no results) Xerces is excluded since it doesn't seem to be needed. From service/pom.xml:         <dependency>             <groupId>org.codehaus.xfire</groupId>             <artifactId>xfire-java5</artifactId>             <version>${xfire.version}</version>             <exclusions>                 <exclusion>                     <groupId>commons-attributes</groupId>                     <artifactId>commons-attributes-api</artifactId>                 </exclusion>                 <exclusion>                     <groupId>jaxen</groupId>                     <artifactId>jaxen</artifactId>                 </exclusion>                 <exclusion>                     <groupId>xerces</groupId>                     <artifactId>xmlParserAPIs</artifactId>                 </exclusion>                 <exclusion>                     <groupId>xerces</groupId>                     <artifactId>xercesImpl</artifactId>                 </exclusion>                 <exclusion>                     <groupId>org.apache.ws.commons</groupId>                     <artifactId>XmlSchema</artifactId>                 </exclusion>             </exclusions>         </dependency>
Hide
Permalink
Carlos Sanchez added a comment - 30/Oct/08 11:51 AM
it's probably missing from the xwork2 pom, as you can see from the stack trace it's used there and it's picking up the sun internal implementation that causes the problem
Show
Carlos Sanchez added a comment - 30/Oct/08 11:51 AM it's probably missing from the xwork2 pom, as you can see from the stack trace it's used there and it's picking up the sun internal implementation that causes the problem
Hide
Permalink
tibi added a comment - 09/Aug/11 1:04 PM
had the same problem. this part fixed it:
    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>2.7.1</version>
    </dependency>


don't know why only one of my many appfuse projects had this problem?
Show
tibi added a comment - 09/Aug/11 1:04 PM had the same problem. this part fixed it:     <dependency>       <groupId>xalan</groupId>       <artifactId>xalan</artifactId>       <version>2.7.1</version>     </dependency> don't know why only one of my many appfuse projects had this problem?

People

  • Assignee:
    Matt Raible
    Reporter:
    jlorusso@tlcdelivers.com
Vote (0)
Watch (1)

Dates

  • Created:
    13/Aug/07 8:37 AM
    Updated:
    09/Aug/11 1:04 PM
    Resolved:
    17/Sep/07 12:30 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for AppFuse. Try JIRA - bug tracking software for your team.