我已经使用 Tomcat 7 在 NetBeans 中实现了一个 Web 应用程序。该应用程序在 localhost 中正常工作。我正在尝试将此应用程序上传到 Web 托管站点上,并且似乎已正确上传。问题是,在某些时候,它会引发以下异常,我无法弄清楚问题所在。我已经阅读了一些具有相同问题的帖子,但问题仍然存在。
根本原因
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "ssl.TrustManagerFactory.algorithm" "read")
java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
java.security.AccessController.checkPermission(AccessController.java:555)
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
java.lang.System.getProperty(System.java:706)
org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:255)
org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:366)
org.apache.http.conn.ssl.SSLSocketFactory.getSystemSocketFactory(SSLSocketFactory.java:204)
org.apache.http.impl.conn.SchemeRegistryFactory.createSystemDefault(SchemeRegistryFactory.java:82)
org.apache.http.impl.client.SystemDefaultHttpClient.createClientConnectionManager(SystemDefaultHttpClient.java:118)
org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:466)
org.apache.http.impl.client.AbstractHttpClient.createHttpContext(AbstractHttpClient.java:286)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:851)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:148)
org.apache.jena.riot.stream.LocatorURL.open(LocatorURL.java:47)
org.apache.jena.riot.stream.StreamManager.openNoMapOrNull(StreamManager.java:124)
org.apache.jena.riot.stream.StreamManager.open(StreamManager.java:81)
org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:725)
org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:714)
org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:649)
org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:211)
org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:184)
org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:122)
org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:113)
org.apache.jena.riot.adapters.RDFReaderRIOT.read(RDFReaderRIOT.java:77)
com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:247)
com.hp.hpl.jena.util.FileManager.readModelWorker(FileManager.java:378)
com.hp.hpl.jena.util.FileManager.loadModelWorker(FileManager.java:309)
com.hp.hpl.jena.util.FileManager.loadModel(FileManager.java:261)
MyServlet.doPost(MyServlet.java:127)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:536)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:166)
只需提一下,在堆栈跟踪 (MyServlet.doPost(MyServlet.java:127)) 中显示的我的类的行中,只有一个页面的 url。
任何想法将不胜感激!