java.io.FileNotFoundException:(系统找不到指定的文件)

具体情况是 java.io.FileNotFoundException: \tynxxwd\pccreditFile\8a8565035da60e47015da613efa7000f (系统找不到指定的文件。)

在3.2 服务器上找另外一个服务器3.6 上的文件 已经Connected to 10.0.3.6.路径是对的 为啥找不到文件! 报错地址图片说明
我在服务器上可以按照该地址找到这张图片 图片说明
以下是具体代码

```//====== 下载全部图片
@ResponseBody
@RequestMapping(value = "downallpicture.json")
public JRadReturnMap downallpicture(HttpServletRequest request,HttpServletResponse response) {
JRadReturnMap returnMap = new JRadReturnMap();
String appId=request.getParameter("appId");
//找出全部照片
Listdetails= addIntoPiecesService.finddetailbyappId(appId);
/*for (int i = 0; i < details.size(); i++) {
this.downloadDh(response,details.get(i).getUrl(),
details.get(i).getFileName()==null?details.get(i).getOriginalName():details.get(i).getFileName());
}*/
this.downloadDh(response,request,details);
returnMap.put(JRadConstants.SUCCESS, true);
returnMap.addGlobalMessage(CHANGE_SUCCESS);
return returnMap;
}

    private void downloadDh(HttpServletResponse response,
            HttpServletRequest request,
            List<QzApplnAttachmentDetail> details) {
        // TODO Auto-generated method stub
        SFTPUtil.connect();
         //压缩文件初始设置
        ///usr/pccreditFile
        String path="F:/";
        String base_name = "abcd";
        String fileZip = base_name + ".zip"; // 拼接zip文件
        String filePath = path + fileZip;//之后用来生成zip文件
        //获取所有的图片
        File[]files = new File[details.size()];
        for (int i = 0; i < details.size(); i++) {
            String tppath=details.get(i).getUrl();
            try {
                SFTPUtil.sftp.cd(tppath.substring(0,54));
            } catch (SftpException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            //"C:/Users/zhengbo/Pictures/2000/b9ac916e-fbc8-404f-a752-0750fb5805a1_watermark.jpg"
            System.out.println(tppath);
            files[i]=new File(tppath);
            if(files[i].exists()){
                System.out.println(files[i]+"exists");
            }
        }

        BufferedOutputStream bos;
        try {
            bos = new BufferedOutputStream(new FileOutputStream(filePath));
            ZipOutputStream zos = new ZipOutputStream(bos);
            ZipEntry ze = null;
            for (int i = 0; i < files.length; i++) {//将所有需要下载的pdf文件都写入临时zip文件   files[i].getPath().substring(0, 54)
                System.out.println(files[i].getPath());
                BufferedInputStream bis = new BufferedInputStream(new FileInputStream(files[i].getPath()));
                ze = new ZipEntry(files[i].getName()+i);
                zos.putNextEntry(ze);
                int s = -1;
                while ((s = bis.read()) != -1) {
                    zos.write(s);
                }
                bis.close();
            }
            zos.flush();
            zos.close();
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }


    }

1个回答

调试下,看下拼接的绝对目录有没有问题

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java.io.FileNotFoundException: NUL: (系统找不到指定的文件。)
``` ![图片说明](https://img-ask.csdn.net/upload/201903/05/1551776620_308084.png)![图片说明](https://img-ask.csdn.net/upload/201903/05/1551776635_236944.png)![图片说明](https://img-ask.csdn.net/upload/201903/05/1551776645_134785.png) ```spring-boot-starter-undertow 其他电脑都没问题。就我自己笔记本不行,用内嵌的tomcat是可以的 org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.io.IOError: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:982) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) [undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-1.4.23.Final.jar:1.4.23.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_161] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_161] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_161] Caused by: java.io.IOError: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。) at org.xnio.channels.Channels$4.run(Channels.java:998) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] at org.xnio.channels.Channels$4.run(Channels.java:988) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_161] at org.xnio.channels.Channels.<clinit>(Channels.java:988) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] at io.undertow.servlet.spec.ServletOutputStreamImpl.flushInternal(ServletOutputStreamImpl.java:493) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.spec.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:475) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297) ~[na:1.8.0_161] at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) ~[na:1.8.0_161] at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) ~[na:1.8.0_161] at org.springframework.util.StreamUtils.copy(StreamUtils.java:119) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:106) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:41) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:226) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:247) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:174) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:81) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:113) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] ... 52 common frames omitted Caused by: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。) at java.io.FileOutputStream.open0(Native Method) ~[na:1.8.0_161] at java.io.FileOutputStream.open(FileOutputStream.java:270) ~[na:1.8.0_161] at java.io.FileOutputStream.<init>(FileOutputStream.java:213) ~[na:1.8.0_161] at java.io.FileOutputStream.<init>(FileOutputStream.java:101) ~[na:1.8.0_161] at org.xnio.channels.Channels$4.run(Channels.java:993) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] ... 72 common frames omitted 2019-03-05 17:04:58.620 ERROR 2260 --- [ XNIO-2 task-1] io.undertow.request : UT005071: Undertow request failed HttpServerExchange{ GET /A request {Connection=[keep-alive], Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8], Accept-Language=[zh-CN,zh;q=0.8], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate, br], User-Agent=[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36], Upgrade-Insecure-Requests=[1], Host=[localhost:6001]} response {Connection=[keep-alive], Content-Type=[text/html;charset=UTF-8], Content-Length=[1], Date=[Tue, 05 Mar 2019 09:04:58 GMT]}} java.lang.NoClassDefFoundError: Could not initialize class org.xnio.channels.Channels at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:615) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:479) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:568) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:339) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_161] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_161] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_161] 2019-03-05 17:04:58.729 ERROR 2260 --- [ XNIO-2 task-2] io.undertow.request : UT005023: Exception handling request to /favicon.ico org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.io.IOError: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:982) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) [undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-1.4.23.Final.jar:1.4.23.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_161] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_161] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_161] Caused by: java.io.IOError: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。) at org.xnio.conduits.Conduits$1.run(Conduits.java:237) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] at org.xnio.conduits.Conduits$1.run(Conduits.java:227) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_161] at org.xnio.conduits.Conduits.<clinit>(Conduits.java:227) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:195) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:2073) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:571) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:606) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.spec.ServletOutputStreamImpl.updateWritten(ServletOutputStreamImpl.java:370) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at io.undertow.servlet.spec.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:152) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final] at org.springframework.util.StreamUtils.copy(StreamUtils.java:138) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.http.converter.ResourceHttpMessageConverter.writeContent(ResourceHttpMessageConverter.java:110) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.http.converter.ResourceHttpMessageConverter.writeInternal(ResourceHttpMessageConverter.java:102) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.http.converter.ResourceHttpMessageConverter.writeInternal(ResourceHttpMessageConverter.java:45) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:226) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:480) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) ~[spring-webmvc-4.3.16.RELEASE.jar:4.3.16.RELEASE] ... 52 common frames omitted Caused by: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。) at java.io.FileOutputStream.open0(Native Method) ~[na:1.8.0_161] at java.io.FileOutputStream.open(FileOutputStream.java:270) ~[na:1.8.0_161] at java.io.FileOutputStream.<init>(FileOutputStream.java:213) ~[na:1.8.0_161] at java.io.FileOutputStream.<init>(FileOutputStream.java:101) ~[na:1.8.0_161] at org.xnio.conduits.Conduits$1.run(Conduits.java:232) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final] ... 71 common frames omitted
来大神看看java.io.FileNotFoundException:
java.io.FileNotFoundException: F:\Users\file\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\*****\static\files\temp\1509615179526.docx (系统找不到指定的路径。) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:221) at java.io.FileOutputStream.<init>(FileOutputStream.java:171) at com.word.***saveAs(MSWordTool.java:257) at com.org.controller.**.####Controller.get@@@season_report(@@@Controller.java:313) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.org.util.AccessFilter.doFilter(AccessFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2522) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2511) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 文件创建失败!
时刻等。java.io.FileNotFoundException: URL [bundleresource://21/] cannot be resolved
最近在搞web项目从tomcat迁移到WebSphere :cry: ,顾名思义 web项目在tomcat下是能正常运行的,说下环境MyEclipse6.0+tomcat6.0+imb的jdk5.0 struts2.1.8+hibernate3.6+spring3.0 怎么也迁移不了,网上的案例全搜遍了,一直看到搜索引擎的最后一页, 希望各位知道的大侠,帮助下小弟,小弟万分感谢 我知道肯定是WebSphere和tomcat的解析路径不同,但是 :oops: 偶被征服了 下面是异常信息 小弟在这等着 [code="java"]SRVE0180I: [lics_war#lics.war] [/lics] [Servlet.LOG]: Initializing Spring root WebApplicationContext [10-10-31 11:43:59:593 CST] 0000002a ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization started [10-10-31 11:43:59:703 CST] 0000002a XmlWebApplica I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing Root WebApplicationContext: startup date [Sun Oct 31 11:43:59 CST 2010]; root of context hierarchy [10-10-31 11:43:59:875 CST] 0000002a ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC 已打开附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_58605860_10.10.31_11.43.59_0.txt [10-10-31 11:43:59:890 CST] 0000002a ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC 已关闭附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_58605860_10.10.31_11.43.59_0.txt [10-10-31 11:43:59:953 CST] 0000002a PathMatchingR W org.springframework.core.io.support.PathMatchingResourcePatternResolver doFindPathMatchingFileResources Cannot search for matching files underneath URL [bundleresource://21/] because it does not correspond to a directory in the file system java.io.FileNotFoundException: URL [bundleresource://21/] cannot be resolved to absolute file path because it does not reside in the file system: bundleresource://21/ at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:204) at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:51) at org.springframework.core.io.UrlResource.getFile(UrlResource.java:168) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:529) at org.springframework.web.context.support.ServletContextResourcePatternResolver.doFindPathMatchingFileResources(ServletContextResourcePatternResolver.java:82) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:350) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:269) at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1156) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:177) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:458) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:605) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:265) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271) at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88) at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157) at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653) at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:606) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1295) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:567) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:948) at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1478) at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:3731) at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:3813) at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1483) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62) at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265) at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089) at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1055) at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118) at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:948) at com.ibm.ws.management.commands.AdminServiceCommands$InvokeCmd.execute(AdminServiceCommands.java:251) at com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:239) at com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.execute(ApplicationDeploymentCollectionAction.java:536) 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:118) 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.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1070) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:273) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:319) at com.ibm.isclite.container.controller.InformationController.processForwardConfig(InformationController.java:159) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) 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.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) 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) [10-10-31 11:44:00:093 CST] 0000002a DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2d342d34: defining beans []; root of factory hierarchy [10-10-31 11:44:00:140 CST] 0000002a ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization completed in 516 ms [10-10-31 11:44:00:140 CST] 0000002a VirtualHost I SRVE0250I: Web 模块 <null> 已绑定到 default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443]。 [10-10-31 11:44:00:140 CST] 0000002a ApplicationMg A WSVR0221I: 应用程序已启动:lics_war [10-10-31 11:44:00:421 CST] 00000029 ServletWrappe I SRVE0242I: [isclite] [/ibm/console] [/secure/javascriptToSession.jsp]: 初始化成功。 [10-10-31 11:44:00:421 CST] 00000029 WebContainer E SRVE0255E: 尚未定义要处理 /favicon.ico 的 Web 组/虚拟主机。 [10-10-31 11:44:10:796 CST] 00000029 ServletWrappe I SRVE0242I: [lics_war] [/lics] [FilterProxyServlet]: 初始化成功。 [10-10-31 11:44:11:734 CST] 00000029 ServletWrappe I SRVE0242I: [lics_war] [/lics] [/index.jsp]: 初始化成功。 [10-10-31 11:44:13:296 CST] 00000029 XmlConfigurat I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Parsing configuration file [struts-default.xml] [10-10-31 11:44:13:437 CST] 00000029 XmlConfigurat I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Parsing configuration file [struts-plugin.xml] [10-10-31 11:44:13:484 CST] 00000029 XmlConfigurat I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Parsing configuration file [struts.xml] [10-10-31 11:44:13:500 CST] 00000029 DefaultConfig I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Overriding property struts.i18n.reload - old value: false new value: true [10-10-31 11:44:13:500 CST] 00000029 DefaultConfig I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Overriding property struts.configuration.xml.reload - old value: false new value: true [10-10-31 11:44:13:515 CST] 00000029 BeanSelection I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Loading global messages from messageResource [10-10-31 11:44:13:750 CST] 00000029 StrutsSpringO I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Initializing Struts-Spring integration... [10-10-31 11:44:13:750 CST] 00000029 SpringObjectF I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Setting autowire strategy to name [10-10-31 11:44:13:765 CST] 00000029 StrutsSpringO I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info ... initialized Struts-Spring integration successfully [10-10-31 11:44:14:453 CST] 00000029 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC 已打开附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_30d230d2_10.10.31_11.44.14_0.txt [10-10-31 11:44:14:453 CST] 00000029 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC 已关闭附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_30d230d2_10.10.31_11.44.14_0.txt [10-10-31 11:44:14:468 CST] 00000029 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC 已打开附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_30d230d2_10.10.31_11.44.14_1.txt [10-10-31 11:44:14:484 CST] 00000029 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC 已关闭附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_30d230d2_10.10.31_11.44.14_1.txt [10-10-31 11:44:14:484 CST] 00000029 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC 已打开附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_30d230d2_10.10.31_11.44.14_2.txt [10-10-31 11:44:14:515 CST] 00000029 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC 已关闭附带的流文件 C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_30d230d2_10.10.31_11.44.14_2.txt [10-10-31 11:44:14:515 CST] 00000029 WebApp E [Servlet Error]-[Filter [hibernateFilter]: filter is unavailable.]: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:242) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:227) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:613) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:145) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:580) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:111) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) 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.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: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) [10-10-31 11:44:38:968 CST] 00000029 WebApp E [Servlet Error]-[Filter [hibernateFilter]: filter is unavailable.]: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:242) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:227) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:613) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:145) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:580) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:111) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) 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.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: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)[/code]
IO读写错误--at java.io.FileInputStream.open(Native Me
大家好: 本人在io读写时陷入了困境,希望各位能给予帮助,情况如下: 1,我有段程式要写文件,本来能程式也跑的很欢快的,写文件时,如没有该文件,就会自动创建一个(感觉很美好) 2,某天,程式忽然就罢工了,还提出以下请求 Exception in thread "main" java.io.FileNotFoundException: D:\PageCapture\index.html (系統找不到指定的路徑。) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:70) at java.io.FileWriter.<init>(FileWriter.java:46) at pagecapture.Page.SaveAsFile(Page.java:87) at pagecapture.Main.main(Main.java:12) 源码很简单但就是在没有该文件的时候不肯写文件了(如果有这个文件就不会报错) 3,想了想我改了改代码,在读写前加上了File.createNewFile()结果如下 java.io.IOException: 系統找不到指定的路徑。 at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:883) at pagecapture.Page.SaveAsFile(Page.java:87) at pagecapture.Main.main(Main.java:12) 心有所感,总觉得这个应该与操作系统或JVM有关(代码很标准规范) 不知道哪位前辈先人有遇到过这个问题,敬请指点,不胜感激
此处为啥一直报找不到文件的异常:java.io.FileNotFoundException: Template "contextxml.ftl" not found.
public class ExportToXmlUtil { private Configuration configuration = null; public ExportToXmlUtil(){ configuration = new Configuration(); // configuration.setDefaultEncoding("UTF-8"); } public static void main(String[] args) { ExportToXmlUtil test = new ExportToXmlUtil(); test.createContextXml(); } public void createContextXml(){ Map<String,String> dataMap=new HashMap<>(); getData(dataMap); configuration.setClassForTemplateLoading(this.getClass(), "classpath:/template"); //FTL文件所存在的位置,放在与java相同的包下 Template t=null; try { t = configuration.getTemplate("contextxml.ftl"); //文件名 } catch (IOException e) { e.printStackTrace(); } File outFile = new File("D:/forK8sOutFile/context.xml"); //生成文件的路径 Writer out = null; try { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile))); } catch (FileNotFoundException e1) { e1.printStackTrace(); } try { t.process(dataMap, out); } catch (TemplateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } //这里赋值的时候需要注意,xml中需要的数据你必须提供给它,不然会报找不到某元素错的. private Map<String,String> getData(Map<String, String> dataMap) { dataMap.put("name", "testName"); dataMap.put("auth", "testAuth"); return dataMap; } } 我的项目结构图随后附上
.\sdklog\sdkclient_error.log (系统找不到指定的路径。)
log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: .\sdklog\sdkclient_error.log (系统找不到指定的路径。) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:177) at java.io.FileOutputStream.<init>(FileOutputStream.java:102) at org.apache.log4j.FileAppender.setFile(FileAppender.java:272) 出现上面的异常该怎么处理?
ssm+cas+shiro+maven重定向问题,报错Caused by: java.io.FileNotFoundException
ssm+cas+shiro+maven多次重定向问题,报错Caused by: java.io.FileNotFoundException,追踪源码发现是conn.getInputStream()执行时报的错, this.getResponseCode()=410,410代表删除了文件.。怎么解决 重定向问题,加“/”不能解决该问题啊。loginUrl设置为http://127.0.0.1:9000/cas-shiro-ehcache2/login?service=http://127.0.0.1:9001/cas_shiro_redis_ssm/weblogin/,/weblogin=casFilter,加个“/”,只是跳过了casFilter,然后http://http://127.0.0.1:9001/cas_shiro_redis_ssm/weblogin?ticket=ST-21-rY7ndd2byXqAQ3fXdphO-cas01.example.org没有对应的页面肯定要调到错误页面的。问题我也遇到了解决不了,我的报错:Caused by: java.io.FileNotFoundException: http://127.0.0.1:9000/cas-shiro-ehcache2/login/serviceValidate?ticket=ST-45-2ucmZxknZmSIncboScar-cas01.example.org&service=http%3A%2F%2F127.0.0.1%3A9001%2Fcas_shiro_redis_ssm%2Fweblogin%2F ,我追踪源码查到in = new BufferedReader(new InputStreamReader(conn.getInputStream())); conn.getInputStream()执行时报的错,意思是从cas服务器查找不到生成的 ticket文件: http://127.0.0.1:9000/cas-shiro-ehcache2/login/serviceValidate?ticket=ST-45-2ucmZxknZmSIncboScar-cas01.example.org&service=http%3A%2F%2F127.0.0.1%3A9001%2Fcas_shiro_redis_ssm%2Fweblogin%2F,请求代码应该是var33 = this.getResponseCode()=410,410代表删除了文件。可是我下载的别人的源码和别人的cas服务器没问题,cas服务器我也和别人的调换试过,还是不行,说明我的代码写的有问题,不知道咋改,怎样才能不出现410.我下载的别人的demo运行正常。奇怪
readUTF()使用报 java.io.EOFException异常
今天在编程的时候,用到了DataInPutStream类的readUTF()方法时报了个异常,查了好多资料也不能解决,求大神指点啊.高分悬赏. ``` package IO流; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public class DataTest { /** * 数据输入输出流 * */ public static void main(String[] args) throws IOException { //向指定文件中写入数据 //打开文件输出流 FileOutputStream fos=new FileOutputStream("G://word.txt"); //将此输出流链接到指定基础输出流DataOutPutStream DataOutputStream dos=new DataOutputStream(fos); //写入数据: dos.writeBytes("我是大禹!");//用此方法写入的数据用记事本打开是乱码 dos.writeChars("我治水!");//用此方法写入的数据用记事本打开是乱码 dos.writeUTF("你智障吗?"); //关闭流 fos.close(); //从文件中读取数据 //首先打开文件输入流 FileInputStream fis=new FileInputStream("G://word.txt"); //将此输入流连接到基本数据输入流DataInPutStream DataInputStream dis=new DataInputStream(fis); //开始读取数据啦 // String s=dis.readUTF(); System.out.println(dis.readUTF()); dis.close(); } } ``` 异常信息: Exception in thread "main" java.io.EOFException at java.io.DataInputStream.readFully(DataInputStream.java:180) at java.io.DataInputStream.readUTF(DataInputStream.java:592) at java.io.DataInputStream.readUTF(DataInputStream.java:547) at IO流.DataTest.main(DataTest.java:35)
beans-config.xml (系统找不到指定的文件。)
2012-5-29 17:06:10 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@13115ab: display name [org.springframework.context.support.FileSystemXmlApplicationContext@13115ab]; startup date [Tue May 29 17:06:10 CST 2012]; root of context hierarchy 2012-5-29 17:06:10 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from file [C:\Program Files\eclipse\beans-config.xml] 2012-5-29 17:06:10 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1130 严重: >>org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\Program Files\eclipse\beans-config.xml]; nested exception is java.io.FileNotFoundException: beans-config.xml (系统找不到指定的文件。) >>java.io.FileNotFoundException: beans-config.xml (系统找不到指定的文件。) >> at java.io.FileInputStream.open(Native Method) >> at java.io.FileInputStream.<init>(FileInputStream.java:106) >> at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108) >> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) >> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) >> at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) >> at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) >> at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) >>... 我知道好像是指向的bean-config.xml找不到,但是bean-config.xml也不应该放到C:\Program Files\eclipse\beans-config.xml这里的啊。我的放在C:\Program Files\eclipse\workspace\talkie\src\config下面了,为什么会出错?求解答啊!
weblogic部署项目报错,急!!!
log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: \ccicall\Applog\shffsrv_axis_soap.log (系统找不到指定的路径。) at java.io.FileOutputStream.openAppend(Native Method) <2017-4-25 下午07时17分51秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/sinosoft/common/config/spring/spring-context.xml]: Cannot create inner bean 'com.sinosoft.common.util.DBManagerJndiNameResolver#12a801' of type [com.sinosoft.common.util.DBManagerJndiNameResolver] while setting bean property 'jndiNameResolver'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sinosoft.common.util.DBManagerJndiNameResolver#12a801' defined in class path resource [com/sinosoft/common/config/spring/spring-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sinosoft.common.util.DBManagerJndiNameResolver]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: C:\Oracle\Middleware\user_projects\domains\base_domain\null\config\dbmanager-config.xml (系统找不到指定的路径。). org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/sinosoft/common/config/spring/spring-context.xml]: Cannot create inner bean 'com.sinosoft.common.util.DBManagerJndiNameResolver#12a801' of type [com.sinosoft.common.util.DBManagerJndiNameResolver] while setting bean property 'jndiNameResolver'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sinosoft.common.util.DBManagerJndiNameResolver#12a801' defined in class path resource [com/sinosoft/common/config/spring/spring-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sinosoft.common.util.DBManagerJndiNameResolver]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: C:\Oracle\Middleware\user_projects\domains\base_domain\null\config\dbmanager-config.xml (系统找不到指定的路径。) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) Truncated. see log file for complete stacktrace Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sinosoft.common.util.DBManagerJndiNameResolver#12a801' defined in class path resource [com/sinosoft/common/config/spring/spring-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sinosoft.common.util.DBManagerJndiNameResolver]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: C:\Oracle\Middleware\user_projects\domains\base_domain\null\config\dbmanager-config.xml (系统找不到指定的路径。) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) Truncated. see log file for complete stacktrace Caused By: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sinosoft.common.util.DBManagerJndiNameResolver]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: C:\Oracle\Middleware\user_projects\domains\base_domain\null\config\dbmanager-config.xml (系统找不到指定的路径。) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) Truncated. see log file for complete stacktrace Caused By: java.lang.RuntimeException: java.io.FileNotFoundException: C:\Oracle\Middleware\user_projects\domains\base_domain\null\config\dbmanager-config.xml (系统找不到指定的路径。) at com.sinosoft.common.util.DBManagerJndiNameResolver.<init>(DBManagerJndiNameResolver.java:48) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) Truncated. see log file for complete stacktrace Caused By: java.io.FileNotFoundException: C:\Oracle\Middleware\user_projects\domains\base_domain\null\config\dbmanager-config.xml (系统找不到指定的路径。) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileInputStream.<init>(FileInputStream.java:66) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) Truncated. see log file for complete stacktrace > <2017-4-25 下午07时17分51秒 CST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'ddccallweb'. weblogic.application.ModuleException: at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1399) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) Truncated. see log file for complete stacktrace Caused By: java.io.FileNotFoundException: C:\Oracle\Middleware\user_projects\domains\base_domain\null\config\dbmanager-config.xml (系统找不到指定的路径。) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileInputStream.<init>(FileInputStream.java:66) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) Truncated. see log file for complete stacktrace >
java 引用src 下解析文件xml(系统找不到指定的文件。)
exception java.io.FileNotFoundException: E:\Java Web\eclipse-jee-neon-3-win32-x86_64\eclipse\.\..\scenery.xml (系统找不到指定的文件。) java.io.FileInputStream.open0(Native Method) java.io.FileInputStream.open(FileInputStream.java:195) java.io.FileInputStream.<init>(FileInputStream.java:138) java.io.FileInputStream.<init>(FileInputStream.java:93) sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) ![图片说明](https://img-ask.csdn.net/upload/201803/15/1521117271_839078.jpg) 报错的路径是我的eclipse存放的路径 我该怎么写路径。 public class SceneryXML extends HttpServlet{ File file = new File ("/appnews/src/scenery.xml"); protected void doGet (HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { DocumentBuilderFactory bdf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = null; try { db = bdf.newDocumentBuilder(); } catch (ParserConfigurationException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } Document document = null; try { document = db.parse(new File("/appnews/src/scenery.xml")); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); }
MAC下,openFire连不上服务器,Error 报log4j:ERROR setFile(null,true) call failed.
cat: 1294: No such file or directory cat: 1294: No such file or directory log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /logs/all.log (No such file or directory) log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /logs/debug.log (No such file or directory) log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /logs/info.log (No such file or directory) log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /logs/warn.log (No such file or directory) Sun Sep 23 10:38:48 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. 求怎么解决?这个目录也找不到
[No such file or directory]安卓FTP上传时提示找不到文件!
# 以下是异常代码,提示我找不到这个文件,明明是有的,权限也加了; com.example.test_617 E/AndroidRuntime: FATAL EXCEPTION: Thread-239 Process: com.example.test_617, PID: 4922 java.lang.RuntimeException: FTP客户端出错! at com.example.test_617.MainActivity.ftpUpload(MainActivity.java:70) at com.example.test_617.MainActivity$1.run(MainActivity.java:36) Caused by: java.io.FileNotFoundException: /storage/emulated/0/DCIM/imgSavePL2016-06-17_7455.png: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:409) at java.io.FileInputStream.<init>(FileInputStream.java:78) at java.io.FileInputStream.<init>(FileInputStream.java:105) at com.example.test_617.MainActivity.ftpUpload(MainActivity.java:59) at com.example.test_617.MainActivity$1.run(MainActivity.java:36)  Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory) ``` ```
tomcat启动报错。提示server.keystore (系统找不到指定的文件。)
2016-11-20 15:08:03 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:\app\Administrator\product\11.2.0\dbhome_2\bin;C:\Program Files\TortoiseSVN\bin;D:\My_Work\Java dpem\jdk1.7.0_13\bin\bin;D:\My_Work\Java dpem\jdk1.7.0_13\bin\jre\bin;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell ;D:\My_Work\Java dpem\jdk1.7.0_13\bin\bin;%CATALINA_HOME%\bin;C:\windows\system32\;F:\搜狐影音\5.0.3.21;. 2016-11-20 15:08:03 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8095 2016-11-20 15:08:03 org.apache.tomcat.util.net.jsse.JSSESocketFactory getStore 严重: Failed to load keystore type JKS with path server.keystore due to E:\Study\aaa\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\server.keystore (系统找不到指定的文件。) java.io.FileNotFoundException: E:\Study\aaa\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\server.keystore (系统找不到指定的文件。) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:347) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:269) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:482) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:419) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:130) at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538) at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176) at org.apache.catalina.connector.Connector.initialize(Connector.java:1014) at org.apache.catalina.core.StandardService.initialize(StandardService.java:680) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795) at org.apache.catalina.startup.Catalina.load(Catalina.java:524) at org.apache.catalina.startup.Catalina.load(Catalina.java:548) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2016-11-20 15:08:03 org.apache.coyote.http11.Http11Protocol init 严重: Error initializing endpoint java.io.FileNotFoundException: E:\Study\aaa\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\server.keystore (系统找不到指定的文件。) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:347) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:269) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:482) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:419) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:130) at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538) at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176) at org.apache.catalina.connector.Connector.initialize(Connector.java:1014) at org.apache.catalina.core.StandardService.initialize(StandardService.java:680) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795) at org.apache.catalina.startup.Catalina.load(Catalina.java:524) at org.apache.catalina.startup.Catalina.load(Catalina.java:548) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2016-11-20 15:08:03 org.apache.catalina.startup.Catalina load 这是我tomcat日志。后面还有四个错误。都是提示缺少那个文件大家帮帮忙。
java 远程连接hbase遇到问题,网上都是改本地host文件,有没有一种不需要改本地配置就可以连接到hbase然后可以用Admin的api方法,?
Configuration configuration = HBaseConfiguration.create(); configuration.set("hbase.rootdir", "hdfs://远程hbaseIP:9820/hbase"); configuration.set("hbase.zookeeper.quorum", "远程hbaseIP"); configuration.set("hbase.zookeeper.property.clientPort", "2181"); Connection conn = ConnectionFactory.createConnection(configuration); Admin admin = conn.getAdmin(); NamespaceDescriptor.Builder builder = NamespaceDescriptor.create("SpaceName"); 报错信息 WARN [org.apache.hadoop.util.Shell] - Did not find winutils.exe: java.io.FileNotFoundException: java.io.FileNotFoundException: HADOOP_HOME and hadoop.home.dir are unset. -see https://wiki.apache.org/hadoop/WindowsProblems WARN [org.apache.hadoop.util.NativeCodeLoader] - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.security.HadoopKerberosName.setRuleMechanism(Ljava/lang/String;)V
Error trying to export to file
net.sf.jasperreports.engine.JRException: Error trying to export to file : TransformXMLtoHTML\PDFReports\TransportLabel_3879017041.pdf at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:355) at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:126) at com.dhl.sop.label.LabelReportController.generateSOPLabel(LabelReportController.java:461) at com.dhl.sop.label.LabelReportHandler.generate(LabelReportHandler.java:82) at com.dhl.sop.label.LabelReportHandler.main(LabelReportHandler.java:68) Caused by: java.io.FileNotFoundException: TransformXMLtoHTML\PDFReports\TransportLabel_3879017041.pdf (系统找不到指定的路径。) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:349) ... 4 more
eclipse中tomcat运行JSP文件出现以下错误
java.io.FileNotFoundException: \conf\null\model2xsl.xml (系统找不到指定的路径。) 怎么解决?
运行项目时提示找不到指定文或者,文件拒绝访问,怎么办?
java.io.FileNotFoundException: E:\workspaceyuan\pos-front\etc (系统找不到指定的文件。) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at com.ratta.pos.controller.FirmwareUpdateController.<clinit>(FirmwareUpdateController.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1000) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745); # **首先,他会提示我系统找不到文件,我也不知道这个文件是干嘛的,所以我就去创建了一个,再次重新运行它提示,文件决绝访问,根本不会哪里出错了,但是错误归错误我的程序还是能够正常运转的,这是怎么回事?改如何处理?**
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
【JSON解析】浅谈JSONObject的使用
简介 在程序开发过程中,在参数传递,函数返回值等方面,越来越多的使用JSON。JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,同时也易于机器解析和生成、易于理解、阅读和撰写,而且Json采用完全独立于语言的文本格式,这使得Json成为理想的数据交换语言。 JSON建构于两种结构: “名称/值”对的集合(A Collection of name/va...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我...
只因接了一个电话,程序员被骗 30 万!
今天想给大家说一个刚刚发生在我身边的一起真实的诈骗经历,我的朋友因此被骗走30万。注:为了保护当事人隐私,部分情节进行了修改。1平安夜突来的电话开始以为就像普通的诈骗一样,想办法让你把钱...
我一个37岁的程序员朋友
周末了,人一旦没有点事情干,心里就瞎想,而且跟几个老男人坐在一起,更容易瞎想,我自己现在也是 30 岁了,也是无时无刻在担心自己的职业生涯,担心丢掉工作没有收入,担心身体机能下降,担心突...
python自动下载图片
近日闲来无事,总有一种无形的力量萦绕在朕身边,让朕精神涣散,昏昏欲睡。 可是,像朕这么有职业操守的社畜怎么能在上班期间睡瞌睡呢,我不禁陷入了沉思。。。。 突然旁边的IOS同事问:‘嘿,兄弟,我发现一个网站的图片很有意思啊,能不能帮我保存下来提升我的开发灵感?’ 作为一个坚强的社畜怎么能说自己不行呢,当时朕就不假思索的答应:‘oh, It’s simple. Wait for me for a ...
一名大专同学的四个问题
【前言】   收到一封来信,赶上各种事情拖了几日,利用今天要放下工作的时机,做个回复。   2020年到了,就以这一封信,作为开年标志吧。 【正文】   您好,我是一名现在有很多困惑的大二学生。有一些问题想要向您请教。   先说一下我的基本情况,高考失利,不想复读,来到广州一所大专读计算机应用技术专业。学校是偏艺术类的,计算机专业没有实验室更不用说工作室了。而且学校的学风也不好。但我很想在计算机领...
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
【程序人生】程序员接私活常用平台汇总
00. 目录 文章目录00. 目录01. 前言02. 程序员客栈03. 码市04. 猪八戒网05. 开源众包06. 智城外包网07. 实现网08. 猿急送09. 人人开发10. 开发邦11. 电鸭社区12. 快码13. 英选14. Upwork15. Freelancer16. Dribbble17. Remoteok18. Toptal19. AngelList20. Topcoder21. ...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
Idea 中最常用的10款插件(提高开发效率),一定要学会使用!
学习使用一些插件,可以提高开发效率。对于我们开发人员很有帮助。这篇博客介绍了开发中使用的插件。
立即提问