gpt4 book ai didi

java - 访问文件夹时出现 Apache Tomcat AccessDeniedException

转载 作者:太空宇宙 更新时间:2023-11-04 12:55:03 27 4
gpt4 key购买 nike

我目前正在尝试将 GWT 网络应用程序部署到 tomcat 实例,但该程序未正确运行。仔细检查 tomcat 日志后,Tomcat 似乎遇到了 AccessDeniedException。

SEVERE: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'java.nio.file.AccessDeniedException' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = java.nio.file.AccessDeniedException: /luceneIndex

但是我很困惑,因为 tomcat 应该可以轻松访问该文件夹。

drwxrwxrwx 4 tomcat tomcat 4096 Mar 14 20:32 SearchTest
-rwxrwxrwx 1 tomcat tomcat 602 Mar 12 20:14 SearchTest.css
-rwxrwxrwx 1 tomcat tomcat 3038 Mar 13 23:13 SearchTest.html
drwxrwxrwx 5 tomcat tomcat 4096 Mar 14 20:24 WEB-INF
-rwxrwxrwx 1 tomcat tomcat 1082 Mar 12 20:14 favicon.ico
drwxrwxrwx 2 tomcat tomcat 4096 Mar 14 20:24 luceneFiles
drwxrwxrwx 2 tomcat tomcat 4096 Mar 14 20:24 luceneIndex

可能导致此问题的原因是什么?

最佳答案

您是否在客户端代码中使用“java.nio.file.AccessDeniedException”? GWT 编译器将所有客户端 Java 代码翻译成 JavaScript。由于并非所有 Java 功能都可以在 Web 浏览器中使用,因此 GWT 仅支持 Java 运行时库的一个子集。

可以看看这两个页面JRE CompatablityJRE Emulation .

据我所知,java.nio 包中的所有类都没有被模拟。这可能是您出错的原因。

关于java - 访问文件夹时出现 Apache Tomcat AccessDeniedException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35996182/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com