黑莓文件连接非法状态异常

发布于 2024-11-05 14:17:17 字数 715 浏览 0 评论 0原文

我正在开发一个使用 FileConnection 接口写入文件系统的 Blackberry 应用程序。

当我尝试对某个文件调用 delete() 时,出现 IllegalStateException。堆栈跟踪如下

IllegalStateException
    No detail message
    net_rim_os
     FileImpl
     remove
     0x373D
    net_rim_os-6
     ContentStoreConnection
     delete
     0x12DA
    com_companyName_blackberryClient-7
     FileUtility
     <private>
     0x14C6

堆栈跟踪显示异常发生在 FileImpl 中的remove() 中,但我在任何地方都找不到有关此方法的任何信息(看起来它是一个内部黑莓类)

该文件位于

file:///store/home/user/appName

有谁知道为什么删除该目录中的文件会导致非法状态异常吗?

我们只见过这个问题一次,而且事实证明很难重现。如果确实发生这种情况,则可能是在同一目录中创建并访问了其他几个文件。这会是异常发生的一个因素吗?

Blackberry OS版本是4.5.0.180,api版本是4.5.0

I am working on a Blackberry application that writes to the file system using the FileConnection interface.

I am getting a IllegalStateException when I try to call delete() on a certain file. The stack trace is as follows

IllegalStateException
    No detail message
    net_rim_os
     FileImpl
     remove
     0x373D
    net_rim_os-6
     ContentStoreConnection
     delete
     0x12DA
    com_companyName_blackberryClient-7
     FileUtility
     <private>
     0x14C6

The stack trace shows the exception occurs in remove() in FileImpl but I cannot find any information about this method anywhere (looks like it is a internal blackberry class)

The file is located in

file:///store/home/user/appName

Does anyone know why deleting a file from that directory would cause an illegalStateException?

We have only seen this problem once and it is proving hard to reproduce. The one occasion it did occur it is possible that there were other several other files being created and accessed in the same directory. Would this be a factor in the exception occurring?

The Blackberry OS version is 4.5.0.180 and the api version is 4.5.0

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

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

发布评论

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

评论(1

甜味超标? 2024-11-12 14:17:17

检查您尝试删除的文件是否未被其他线程打开。我过去在忘记正确 close() FileConnection 或 InputStream 时遇到过这个问题。

Check that the file you are trying to delete is not open by another Thread. I've had this problem when forgetting to properly close() a FileConnection or InputStream in the past.

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