JCIFS SmbException [英] JCIFS SmbException

查看:506
本文介绍了JCIFS SmbException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过JCIFS访问公司网络中的共享文件夹.但是,当我尝试列出共享文件夹下的文件时,它会引发如下SmbException,

I am trying to access a shared folder in my company network via JCIFS. But when i try to list the files under the shared folder, it throws an SmbException as below,

jcifs.smb.SmbException: 0xC000009A
    at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
    at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
    at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:316)
    at jcifs.smb.SmbSession.send(SmbSession.java:218)
    at jcifs.smb.SmbTree.treeConnect(SmbTree.java:176)
    at jcifs.smb.SmbFile.doConnect(SmbFile.java:911)
    at jcifs.smb.SmbFile.connect(SmbFile.java:954)
    at jcifs.smb.SmbFile.connect0(SmbFile.java:880)
    at jcifs.smb.SmbFile.getType(SmbFile.java:1282)
    at jcifs.smb.SmbFile.doEnum(SmbFile.java:1733)
    at jcifs.smb.SmbFile.listFiles(SmbFile.java:1715)
    at jcifs.smb.SmbFile.listFiles(SmbFile.java:1648)

0xC000009A说它是一个NT_STATUS_INSUFFICIENT_RESOURCES,但是我必须怎么做才能解决此问题.共享文件夹只能由我自己访问.我使用了以下网址格式.

0xC000009A says it is a NT_STATUS_INSUFFICIENT_RESOURCES but what do i have to do to fix this. The shared folder is only accessible by myself. I used the follwoing url format.

smb://domain;username:password@ip-address/<foldername>

感谢您的帮助.

推荐答案

在使用JCIFS将文件上传到Windows共享库时,我遇到了同样的错误.

I faced same error developing file upload to windows shares using JCIFS.

原来,目标Windows计算机在系统日志中有一个错误条目:

It turned out, target windows machine had an error entry in system log:

Source:        srv
Event ID:      2017
Task Category: None
Level:     Error 
Keywords:      Classic
User:          N/A
Computer:     SERVER01
Description:   The server was unable to allocate from the
system nonpaged pool because the server reached the configured limit
for nonpaged pool allocations.

(可能)由于使用较旧的(SMB1,例如Windows XP

This error is (possibly) caused by using an older (SMB1, e.g. Windows XP prooflink) version of the protocol when connecting to modern (Vista and above) versions of Windows.

本文包含该问题的解决方法.它需要编辑目标计算机的注册表值,所以我不能称其为完整解决方案.

This article contains a workaround for the problem. It requires editing the target machine's registry values, so I can't call it a full solution.

这篇关于JCIFS SmbException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆