Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BC15F200D57 for ; Mon, 11 Dec 2017 20:14:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B95DF160C13; Mon, 11 Dec 2017 19:14:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D877A160C03 for ; Mon, 11 Dec 2017 20:14:06 +0100 (CET) Received: (qmail 48991 invoked by uid 500); 11 Dec 2017 19:14:06 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 48981 invoked by uid 99); 11 Dec 2017 19:14:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2017 19:14:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6355D1806B7 for ; Mon, 11 Dec 2017 19:14:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id r4xm_VwCyLqZ for ; Mon, 11 Dec 2017 19:14:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C4110626F4 for ; Mon, 11 Dec 2017 19:14:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 305EDE257E for ; Mon, 11 Dec 2017 19:14:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9105821301 for ; Mon, 11 Dec 2017 19:14:00 +0000 (UTC) Date: Mon, 11 Dec 2017 19:14:00 +0000 (UTC) From: "Yasser Zamani (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4901) ClassCastException in JarEntryRevision MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 11 Dec 2017 19:14:07 -0000 [ https://issues.apache.org/jira/browse/WW-4901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16286422#comment-16286422 ] Yasser Zamani commented on WW-4901: ----------------------------------- That's mine. I should have cared more on casts. Sorry for the inconvenience caused to you :( I googled {{com.ibm.ws.classloader.Handler$ClassLoaderURLConnection}} and seems we're not alone suffering from this ;) I know a clear fix and will request it via a pull. It will be awesome if you can build that pull request and test it on your side because WebSphere is a commercial product and I'm not able to do this myself. Thank for your report! > 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)