You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/10/02 11:40:05 UTC
[Bug 61581] New: SecurityException trying to access JNI classes in
Drawboard example when running with SecurityManager
https://bz.apache.org/bugzilla/show_bug.cgi?id=61581
Bug ID: 61581
Summary: SecurityException trying to access JNI classes in
Drawboard example when running with SecurityManager
Product: Tomcat 7
Version: trunk
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: WebSocket
Assignee: dev@tomcat.apache.org
Reporter: knst.kolinko@gmail.com
Target Milestone: ---
Created attachment 35393
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35393&action=edit
catalina.2017-10-02.log
Smoke-testing release candidate of Tomcat 7.0.82.
Java 8u144, Windows, running with APR connector
Steps to reproduce:
1. Start Tomcat
2. Access
http://localhost:8080/examples/websocket/drawboard.xhtml
3. Actual result:
- At client: the page fails to complete loading. It displays some parts of the
page, but no drawboard area.
- At server: java.security.AccessControlException is logged
[[[
SEVERE: Unexpected exception: java.security.AccessControlException: access
denied ("java.lang.RuntimePermission"
"accessClassInPackage.org.apache.tomcat.jni")
java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "accessClassInPackage.org.apache.tomcat.jni")
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at
java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:315)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at
org.apache.coyote.http11.upgrade.AprServletOutputStream.doWriteInternal(AprServletOutputStream.java:135)
]]]
I am attaching catalina.2017-10-02.log file.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 61581] SecurityException trying to access JNI classes in
Drawboard example when running with SecurityManager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61581
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Fixed in 7.0.x for 7.0.83 onwards.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 61581] SecurityException trying to access JNI classes in
Drawboard example when running with SecurityManager
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61581
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
Version|trunk |7.0.82
--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
AprServletOutputStream.java:135 is
if (Status.APR_STATUS_IS_EAGAIN(-written)) {
APR_STATUS_IS_EAGAIN is a method, not a constant, and thus Java tries to load
the class.
If I preload the Status class the issue does not happen.
This is: to work-around this issue, add the following attribute to
JreMemoryLeakPreventionListener configured in conf/server.xml:
[[[
classesToInitialize="org.apache.tomcat.jni.Status"
]]]
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org