struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4901) ClassCastException in JarEntryRevision
Date Thu, 14 Dec 2017 08:19:03 GMT

    [ https://issues.apache.org/jira/browse/WW-4901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290523#comment-16290523
] 

ASF subversion and git services commented on WW-4901:
-----------------------------------------------------

Commit 278a2112b961cacc53a001afe54ab33b8d98d922 in struts's branch refs/heads/master from
[~lukaszlenart]
[ https://gitbox.apache.org/repos/asf?p=struts.git;h=278a211 ]

Merge pull request #190 from yasserzamani/WW-4901

WW-4901 Decouples from URL.openConnection implementation of container

> 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
>            Assignee: Yasser Zamani
>            Priority: Critical
>             Fix For: 2.5.15
>
>
> 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