【WebLogic异常处理】Exception occured while download ...
在部署项目时抛出Exception occured while downloading files异常。以下是nohup日志:
<Apr 24, 2013 11:38:17 AM CST> <Warning> <DeploymentService> <BEA-290065> <Deployment service servlet encountered an Exception while handling the deployment datatransfer message for request id "1,366,774,688,013" from server "zykMServer-01". Exception is: "java.io.FileNotFoundException: /home/weblogic/project/special_card_sale/online/special_card_sale/WEB-INF/reportlets/sale_total锟斤拷锟桔伙拷锟斤拷统锟斤拷.cpt (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:120)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:116)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:116)
at weblogic.utils.jars.JarFileUtils.createJarFileFromDirectory(JarFileUtils.java:214)
at weblogic.utils.jars.JarFileUtils.createJarFileFromDirectory(JarFileUtils.java:190)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getTempSrcLocation(SourceCache.java:431)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getAppDataLocations(SourceCache.java:284)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getDataLocations(SourceCache.java:138)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager.createDeploymentStream(DataHandlerManager.java:186)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager.access$300(DataHandlerManager.java:31)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$LocalDataTransferHandler.getDataAsStream(DataHandlerManager.java:119)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.handleDataTransferRequest(DeploymentServiceServlet.java:864)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.internalDoPost(DeploymentServiceServlet.java:248)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.access$000(DeploymentServiceServlet.java:84)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet$1.run(DeploymentServiceServlet.java:220)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.doPost(DeploymentServiceServlet.java:217)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
".>
<Apr 24, 2013 11:38:17 AM CST> <Error> <HTTP> <BEA-101083> <Connection failure.
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)
at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1511)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1462)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
Truncated. see log file for complete stacktrace
>
<Apr 24, 2013 11:38:17 AM CST> <Error> <HTTP> <BEA-101104> <Servlet execution in servlet context "ServletContext@451818382[app:bea_wls_deployment_internal module:bea_wls_deployment_internal.war path:/bea_wls_deployment_internal spec-version:null]" failed, java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes..
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)
at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1511)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1462)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
Truncated. see log file for complete stacktrace
>
<Apr 24, 2013 11:38:25 AM CST> <Warning> <DeploymentService> <BEA-290065> <Deployment service servlet encountered an Exception while handling the deployment datatransfer message for request id "1,366,774,688,013" from server "zykMServer-02". Exception is: "java.io.FileNotFoundException: /home/weblogic/project/special_card_sale/online/special_card_sale/WEB-INF/reportlets/sale_total锟斤拷锟桔伙拷锟斤拷统锟斤拷.cpt (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:120)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:116)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:116)
at weblogic.utils.jars.JarFileUtils.createJarFileFromDirectory(JarFileUtils.java:214)
at weblogic.utils.jars.JarFileUtils.createJarFileFromDirectory(JarFileUtils.java:190)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getTempSrcLocation(SourceCache.java:431)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getAppDataLocations(SourceCache.java:284)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getDataLocations(SourceCache.java:138)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager.createDeploymentStream(DataHandlerManager.java:186)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager.access$300(DataHandlerManager.java:31)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$LocalDataTransferHandler.getDataAsStream(DataHandlerManager.java:119)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.handleDataTransferRequest(DeploymentServiceServlet.java:864)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.internalDoPost(DeploymentServiceServlet.java:248)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.access$000(DeploymentServiceServlet.java:84)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet$1.run(DeploymentServiceServlet.java:220)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.doPost(DeploymentServiceServlet.java:217)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
".>
<Apr 24, 2013 11:38:25 AM CST> <Error> <HTTP> <BEA-101083> <Connection failure.
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)
at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1511)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1462)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
Truncated. see log file for complete stacktrace
>
<Apr 24, 2013 11:38:25 AM CST> <Error> <HTTP> <BEA-101104> <Servlet execution in servlet context "ServletContext@451818382[app:bea_wls_deployment_internal module:bea_wls_deployment_internal.war path:/bea_wls_deployment_internal spec-version:null]" failed, java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes..
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)
at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1511)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1462)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
Truncated. see log file for complete stacktrace
>
<Apr 24, 2013 11:38:28 AM CST> <Warning> <DeploymentService> <BEA-290065> <Deployment service servlet encountered an Exception while handling the deployment datatransfer message for request id "1,366,774,688,013" from server "zykMServer-03". Exception is: "java.io.FileNotFoundException: /home/weblogic/project/special_card_sale/online/special_card_sale/WEB-INF/reportlets/sale_total锟斤拷锟桔伙拷锟斤拷统锟斤拷.cpt (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:120)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:116)
at weblogic.utils.jars.JarFileUtils.addFilesToJar(JarFileUtils.java:116)
at weblogic.utils.jars.JarFileUtils.createJarFileFromDirectory(JarFileUtils.java:214)
at weblogic.utils.jars.JarFileUtils.createJarFileFromDirectory(JarFileUtils.java:190)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getTempSrcLocation(SourceCache.java:431)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getAppDataLocations(SourceCache.java:284)
at weblogic.deploy.service.datatransferhandlers.SourceCache.getDataLocations(SourceCache.java:138)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager.createDeploymentStream(DataHandlerManager.java:186)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager.access$300(DataHandlerManager.java:31)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$LocalDataTransferHandler.getDataAsStream(DataHandlerManager.java:119)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.handleDataTransferRequest(DeploymentServiceServlet.java:864)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.internalDoPost(DeploymentServiceServlet.java:248)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.access$000(DeploymentServiceServlet.java:84)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet$1.run(DeploymentServiceServlet.java:220)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.deploy.service.internal.transport.http.DeploymentServiceServlet.doPost(DeploymentServiceServlet.java:217)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
".>
<Apr 24, 2013 11:38:28 AM CST> <Error> <HTTP> <BEA-101083> <Connection failure.
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)
at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1511)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1462)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
Truncated. see log file for complete stacktrace
>
<Apr 24, 2013 11:38:28 AM CST> <Error> <HTTP> <BEA-101104> <Servlet execution in servlet context "ServletContext@451818382[app:bea_wls_deployment_internal module:bea_wls_deployment_internal.war path:/bea_wls_deployment_internal spec-version:null]" failed, java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes..
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)
at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1432)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1511)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1462)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
Truncated. see log file for complete stacktrace
>
<Apr 24, 2013 11:38:28 AM CST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating distribute task for application 'special_card_sale'.>
<Apr 24, 2013 11:38:28 AM CST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException: Exception occured while downloading files
at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:43)
at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:56)
at weblogic.deploy.internal.targetserver.datamanagement.Data.prepareDataUpdate(Data.java:97)
at weblogic.deploy.internal.targetserver.BasicDeployment.prepareDataUpdate(BasicDeployment.java:683)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepareDataUpdate(AbstractOperation.java:899)
Truncated. see log file for complete stacktrace
Caused By: java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "1,366,774,688,013". Underlying error is: "null"
at weblogic.deploy.service.datatransferhandlers.HttpDataTransferHandler.getDataAsStream(HttpDataTransferHandler.java:86)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$RemoteDataTransferHandler.getDataAsStream(DataHandlerManager.java:153)
at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:39)
at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:57)
at weblogic.deploy.internal.targetserver.datamanagement.Data.prepareDataUpdate(Data.java:97)
Truncated. see log file for complete stacktrace
>
<Apr 24, 2013 11:38:28 AM CST> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.management.DeploymentException: Exception occured while downloading files
at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:43)
at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:56)
at weblogic.deploy.internal.targetserver.datamanagement.Data.prepareDataUpdate(Data.java:97)
at weblogic.deploy.internal.targetserver.BasicDeployment.prepareDataUpdate(BasicDeployment.java:683)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepareDataUpdate(AbstractOperation.java:899)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.stageFilesFromAdminServer(AbstractOperation.java:265)
at weblogic.deploy.internal.targetserver.DeploymentManager.createOperations(DeploymentManager.java:1409)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleUpdateDeploymentContext(DeploymentManager.java:162)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.updateDeploymentContext(DeploymentServiceDispatcher.java:156)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doUpdateDeploymentContextCallback(DeploymentReceiverCallbackDeliverer.java:147)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.updateDeploymentContext(DeploymentReceiverCallbackDeliverer.java:29)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.callDeploymentReceivers(ReceivedPrepare.java:203)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.handlePrepare(ReceivedPrepare.java:114)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.receivedPrepare(ReceivedPrepare.java:52)
at weblogic.deploy.service.internal.targetserver.TargetRequestImpl.run(TargetRequestImpl.java:211)
at weblogic.deploy.service.internal.transport.CommonMessageReceiver$1.run(CommonMessageReceiver.java:458)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "1,366,774,688,013". Underlying error is: "null"
at weblogic.deploy.service.datatransferhandlers.HttpDataTransferHandler.getDataAsStream(HttpDataTransferHandler.java:86)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$RemoteDataTransferHandler.getDataAsStream(DataHandlerManager.java:153)
at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:39)
at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:57)
异常分析:
通过分析nohup日志,发现首先报出的是zykMServer-01受管服务器无法从AdminServer上找到/home/weblogic/project/special_card_sale/online/special_card_sale/WEB-INF/reportlets/sale_total锟斤拷锟桔伙拷锟斤拷统锟斤拷.cpt这个文件。然后Didn't meet stated Content-Length, wrote: '365' bytes instead of stated: '347' bytes错误。最后Exception occured while downloading files。
部署项目到集群的过程(copy模式),首先项目会加载到AdminServer,然后受管服务器从AdminServer下载项目,最后进行项目的一致性校验。如果一致,那么部署成功。否则,部署失败。
因为 sale_total锟斤拷锟桔伙拷锟斤拷统锟斤拷.cpt这个文件名中存在中文,AdminServer在启动时没有指定中文语言解析,所以AdminServer无法解析含有中文的文件名称。
解决办法:
1. 将含有中文文件名称的文件删除或重命名(英文或数字)。
2. 更改AdminServer的启动参数,增加-Duser.language=zh。
--转自