一个WEB应用,框架spring+struts2+hibernate3.2
在tomcat下是好的,用myeclipse7.0打成WAR包,在部署到WAS6.1上,即上传应用WAR包时,提示错误:
EAR 文件可能是损坏的或不完整的
java.lang.IllegalArgumentException
后台报错为:
java.lang.IllegalArgumentException
at java.util.zip.ZipInputStream.getUTF8String(ZipInputStream.java:315)
at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:254)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:89)
at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.NestedArchiveLoadStrategyImpl.getFiles(NestedArchiveLoadStrategyImpl.java:131)
at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl.collectFiles(LoadStrategyImpl.java:281)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl.getFiles(ContainerImpl.java:238)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl.eGet(ArchiveImpl.java:215)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:483)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.copyReference(ArchiveCopySessionUtility.java:97)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyCurrentReferences(EtoolsCopyUtility.java:237)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.primCopy(EtoolsCopyUtility.java:564)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.primCopy(ArchiveCopySessionUtility.java:47)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.containmentCopy(EtoolsCopyUtility.java:107)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyManyReference(EtoolsCopyUtility.java:300)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.copyReference(ArchiveCopySessionUtility.java:99)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyCurrentReferences(EtoolsCopyUtility.java:237)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.primCopy(EtoolsCopyUtility.java:564)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopySessionUtility.primCopy(ArchiveCopySessionUtility.java:47)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.containmentCopy(EtoolsCopyUtility.java:107)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility.copyRefObjects(EtoolsCopyUtility.java:338)
at org.eclipse.wst.common.internal.emf.utilities.EtoolsCopySession.copy(EtoolsCopySession.java:52)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopyUtility.copy(ArchiveCopyUtility.java:135)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopyUtility.copy(ArchiveCopyUtility.java:90)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveCopyUtility.copy(ArchiveCopyUtility.java:121)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.copy(CommonarchiveFactoryImpl.java:211)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.primAddCopyRef(EARFileImpl.java:149)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.addCopyRef(EARFileImpl.java:166)
at com.ibm.ws.management.application.client.AppInstallHelper.createEarWrapper(AppInstallHelper.java:494)
at com.ibm.ws.management.application.client.AppInstallHelper.createEarWrapper(AppInstallHelper.java:317)
at com.ibm.ws.management.application.client.AppInstallHelper.createEarWrapper(AppInstallHelper.java:284)
at com.ibm.ws.console.appmanagement.action.UploadAction.formUpload(UploadAction.java:490)
at com.ibm.ws.console.appmanagement.action.UploadAction.execute(UploadAction.java:141)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:371)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:229)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
、at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:984)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:600)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1812)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
部署个空的,然后用替换的形式试一下看行不行。
用myeclipse 新建个web工程,然后打成war包部署上去就可以了。新年祝福网页
请检查下web.xml的格式,WebSphere发布时对web.xml的格式检查得比较严格,里面的filter,listener,sevlet等等有一定的顺序,你可以拿eclipse或其他编辑工具校验一下格式;若这个还不行的话还有个最大的可能,就是WebSphere6.1的JDK是1.4的,你项目的JDK不能高于1.4,否则,发布上去也可能有些语法通不过而报后台错!
经过排查,发现时一个JAR包引起的问题,如果去掉那个JAR包,则部署成功,后于此供应商联系后更换JAR包解决问题。
经过分析是因为发布的工程里有中文命名的文件导致的该问题。删除这个中文命名的文件后问题解决。