struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Hum (JIRA)" <j...@apache.org>
Subject [jira] [Created] (WW-4901) ClassCastException in JarEntryRevision
Date Mon, 11 Dec 2017 14:36:00 GMT
Michael Hum created WW-4901:
-------------------------------

             Summary: ClassCastException in JarEntryRevision
                 Key: WW-4901
                 URL: https://issues.apache.org/jira/browse/WW-4901
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.5.14.1
         Environment: Websphere 8.5.5.12
            Reporter: Michael Hum
            Priority: Critical


After upgrading to struts 2.5.14.1 we are unable to startup the application on websphere.
The logs show class cast exceptions in the JarEntryRevision class:

{code}
[12/7/17 16:50:18:323 EST] 00000502 JarEntryRevis W com.opensymphony.xwork2.util.fs.JarEntryRevision
build Could not create JarEntryRevision for [wsjar:file:/icosdata/IBM/WebSphere/AppServer/profiles/CmpAppSrv01/installedApps/CMPDMDEVCell01/icos-dev.ear/icos-web.war/WEB-INF/lib/struts2-core-2.5.14.1.jar!/struts-default.xml]!
                                 java.lang.ClassCastException: com.ibm.ws.classloader.Handler$ClassLoaderURLConnection
incompatible with java.net.JarURLConnection
    at com.opensymphony.xwork2.util.fs.JarEntryRevision.build(JarEntryRevision.java:44)
    at com.opensymphony.xwork2.util.fs.DefaultFileManager.monitorFile(DefaultFileManager.java:94)
    at com.opensymphony.xwork2.util.fs.DefaultFileManager.loadFile(DefaultFileManager.java:73)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1054)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:198)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:165)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:166)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:957)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:463)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496)
    at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:73)
    at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:61)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:145)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:607)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:514)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:319)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:392)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:931)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3980)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1016)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
{code}

We took a look at tracked it down to WW-4869 which modified the code to cast to JarURLConnection:

{code:java}
 JarURLConnection conn = null;
        try {
            conn = (JarURLConnection) fileUrl.openConnection();
...
{code}

Unfortunately the URLConnection in websphere doesn't inherit from JarURLConnection:

{code:java}
static class ClassLoaderURLConnection extends URLConnection { ... }
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message