JCIFS SmbException

发布于 2025-01-06 12:16:41 字数 1005 浏览 0 评论 0 原文

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

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 但我必须做什么才能解决此问题。共享文件夹只有我自己可以访问。我使用了以下 url 格式。

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

感谢您的帮助。

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 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>

Appreciate your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一口甜 2025-01-13 12:16:41

我在使用 JCIFS 开发文件上传到 Windows 共享时遇到了同样的错误。

事实证明,目标 Windows 机器在系统日志中有一个错误条目:

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 prooflink) 连接到现代(Vista 和以上)Windows 版本。

本文包含解决方法对于这个问题。它需要编辑目标计算机的注册表值,因此我不能称其为完整的解决方案。

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

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文