当前位置:编程学习 > JAVA >>

weblogic问题,求助。。。

程序运行的时候报下面错误,提示D:\tp\2008031701344040.jpg not exists。这个文件是存在的。请大家帮助找下原因。谢谢

2012/10/18-18:07:19 >> ERROR >> ExecuteThread: '13' for queue: 'weblogic.kernel.Default' >> seas.service.SeasHttp.request(SeasHttp.java:656) >> IOException: D:\
tp\2008031701344040.jpg not exists.
java.io.FileNotFoundException: D:\tp\2008031701344040.jpg not exists.
        at seas.service.SeasHttp.getHttpMethod(SeasHttp.java:707)
        at seas.service.SeasHttp.request(SeasHttp.java:642)
        at seas.service.SeasHttp.request(SeasHttp.java:631)
        at seas.service.SeasHttp.upload(SeasHttp.java:1497)
        at seas.service.SeasHttp.saveObjectBlob(SeasHttp.java:436)
        at seas.service.SeasHttp.save(SeasHttp.java:304)
        at seas.service.Archive.arhicveObject(Archive.java:413)
        at seas.service.Archive.archive(Archive.java:231)
        at seas.service.Archive.archive(Archive.java:204)
        at seas.service.Archive.archiveXml(Archive.java:87)
        at seas.SeasUtil.archiveXml(SeasUtil.java:99)
        at com.neusoft.si.simis.archive.seas.SISeasUtil.archiveFile(SISeasUtil.java:73)
        at com.neusoft.si.simis.archive.seas.SISeasApplogicImpl.executeSeasArchive(SISeasApplogicImpl.java:594)
        at com.neusoft.si.simis.archive.seas.SISeasInteractionImpl.executeSeasArchive(SISeasInteractionImpl.java:89)
        at com.neusoft.si.simis.archive.seas.SISeasAction.seasArchive(SISeasAction.java:58)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
        at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
        at com.neusoft.unieap.action.EAPDispatchAction.execute(EAPDispatchAction.java:107)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:480)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at com.neusoft.unieap.action.EAPActionServlet.process(EAPActionServlet.java:451)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
2012/10/18-18:07:19 >> ERROR >> ExecuteThread: '13' for queue: 'weblogic.kernel.Default' >> seas.service.Archive.arhicveObject(Archive.java:435) >> Exception: F
ailed to upload file:D:\tp\2008031701344040.jpg
java.io.IOException: Failed to upload file:D:\tp\2008031701344040.jpg
        at seas.service.SeasHttp.saveObjectBlob(SeasHttp.java:475)
        at seas.service.SeasHttp.save(SeasHttp.java:304)
        at seas.service.Archive.arhicveObject(Archive.java:413)
        at seas.service.Archive.archive(Archive.java:231)
        at seas.service.Archive.archive(Archive.java:204)
        at seas.service.Archive.archiveXml(Archive.java:87)
        at seas.SeasUtil.archiveXml(SeasUtil.java:99)
        at com.neusoft.si.simis.archive.seas.SISeasUtil.archiveFile(SISeasUtil.java:73)
        at com.neusoft.si.simis.archive.seas.SISeasApplogicImpl.executeSeasArchive(SISeasApplogicImpl.java:594)
        at com.neusoft.si.simis.archive.seas.SISeasInteractionImpl.executeSeasArchive(SISeasInteractionImpl.java:89)
        at com.neusoft.si.simis.archive.seas.SISeasAction.seasArchive(SISeasAction.java:58)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
        at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
        at com.neusoft.unieap.action.EAPDispatchAction.execute(EAPDispatchAction.java:107)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:480)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at com.neusoft.unieap.action.EAPActionServlet.process(EAPActionServlet.java:451)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) --------------------编程问答-------------------- 用:
D:/tp/2008031701344040.jpg

或者
D:\\tp\\2008031701344040.jpg --------------------编程问答--------------------
引用 1 楼  的回复:
用:
D:/tp/2008031701344040.jpg

或者
D:\\tp\\2008031701344040.jpg

这个路径不是我写死的,是在前台选择的图片位置。并且D:\tp\2008031701344040.jpg这个路径是没问题的。还请分析下什么原因可能导致出现这种情况。  --------------------编程问答-------------------- 客户端上传图片? --------------------编程问答--------------------
引用 3 楼  的回复:
客户端上传图片?

只是找到图片的位置,把路径传进来,可是明明已经传进来了,还报not exists。 --------------------编程问答-------------------- 前台传进来的路径没有错,D:\tp\2008031701344040.jpg 。
但是weblogic下,jdk处理解析文件的时候‘\’认为是无效字符,不认。所有你获取地址以后,做一个字符转换。
转换为:D:/tp/2008031701344040.jpg 。这样IO去读文件就能找到路径了。 --------------------编程问答-------------------- D:\tp\2008031701344040.jpg 。 路径\字符要转义 你加个\\就可以了
补充:Java ,  Java EE
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,