From: <php...@li...> - 2010-04-01 06:40:04
|
Hi there, I have just installed Ubuntu Linux and then php/java bridge in our new development server. Here is a simple code. ========================================================== require_once("http://192.168.1.101:8080/JavaBridge/java/Java.inc"); $str = new java("java.lang.String", "hello world"); echo $str; echo java("java.lang.System")->getProperties(); ========================================================== The first echo line is working fine but the next one pop out AccessControlException error. Please see the output. ======================================================================================================================== hello world<br /> <b>Warning</b>: Unchecked exception detected: [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: [[c:System]]->getProperties. Cause: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write) VM: 1.6.0_0@http://java.sun.com/" at: #-40 java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) #-39 java.security.AccessController.checkPermission(AccessController.java:553) #-[...] http://192.168.1.101:8080/JavaBridge/java/Java.inc(1063): java_Client->invokeMethod(2, 'getProperties', Array) #5 http://192.168.1.101:8080/JavaBridge/java/Java.inc(1108): java_JavaProxy->__call('getProperties', Array) #6 http://192.168.1.101:8080/JavaBridge/java/Java.inc(1199): java_AbstractJava->__call('getProperties', Array) #7 [internal function]: Java->__call('getProperties', Array) #8 /var/www/vhosts/solo/httpdocs/test.php(9): JavaClass->getProperties() #9 {main}] in <b>http://192.168.1.101:8080/JavaBridge/java/Java.inc</b> on line <b>121</b><br /> [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: [[c:System]]->getProperties. Cause: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write) VM: 1.6.0_0@http://java.sun.com/" at: #-40 java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) #-39 java.security.AccessController.checkPermission(AccessController.java:553) #-38 java.lang.SecurityManager.checkPermission(SecurityManager.java:549) #-37 java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1269) #-36 java.lang.System.getProperties(System.java:599) #-35 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-34 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) #-33 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) #-32 java.lang.reflect.Method.invoke(Method.java:616) #-31 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1049) #-30 php.java.bridge.Request.handleRequest(Request.java:415) #-29 php.java.bridge.Request.handleRequests(Request.java:491) #-28 php.java.servlet.PhpJavaServlet.handleHttpConnection(PhpJavaServlet.java:318) #-27 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:340) #-26 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:349) #-25 javax.servlet.http.HttpServlet.service(HttpServlet.java:640) #-24 javax.servlet.http.HttpServlet.service(HttpServlet.java:717) #-23 sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) #-22 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) #-21 java.lang.reflect.Method.invoke(Method.java:616) #-20 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) #-19 java.security.AccessController.doPrivileged(Native Method) #-18 javax.security.auth.Subject.doAsPrivileged(Subject.java:537) #-17 org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) #-16 org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) #-15 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283) #-14 org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56) #-13 org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189) #-12 java.security.AccessController.doPrivileged(Native Method) #-11 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) #-10 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) #-9 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) #-8 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) #-7 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) #-6 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) #-5 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) #-4 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) #-3 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) #-2 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) #-1 java.lang.Thread.run(Thread.java:636) #0 http://192.168.1.101:8080/JavaBridge/java/Java.inc(136): java_ThrowExceptionProxyFactory->getProxy(3, 'java.lang.Syste...', 'F', true) #1 http://192.168.1.101:8080/JavaBridge/java/Java.inc(219): java_Arg->getResult(true) #2 http://192.168.1.101:8080/JavaBridge/java/Java.inc(221): java_Client->getWrappedResult(true) #3 http://192.168.1.101:8080/JavaBridge/java/Java.inc(337): java_Client->getResult() #4 http://192.168.1.101:8080/JavaBridge/java/Java.inc(1063): java_Client->invokeMethod(2, 'getProperties', Array) #5 http://192.168.1.101:8080/JavaBridge/java/Java.inc(1108): java_JavaProxy->__call('getProperties', Array) #6 http://192.168.1.101:8080/JavaBridge/java/Java.inc(1199): java_AbstractJava->__call('getProperties', Array) #7 [internal function]: Java->__call('getProperties', Array) #8 /var/www/vhosts/solo/httpdocs/test.php(9): JavaClass->getProperties() #9 {main}]<br /> <b>Fatal error</b>: An unchecked exception occured during script execution. Please check the server log files for details. in <b>http://192.168.1.101:8080/JavaBridge/java/Java.inc</b> on line <b>461</b><br /> ======================================================================================================================== Our previous development server was Windows 2003 where I did not get these errors. Also my experience with Linux us very less. Thanks a lot, Hameed |
From: <php...@li...> - 2010-04-01 15:47:35
|
Hi Hameed, > I have just installed Ubuntu Linux and then php/java bridge in our new > development server. please follow the install instructions at: http://php-java-bridge.sourceforge.net/pjb/installation.php > "FATAL: Undeclared > java.lang.RuntimeException detected. java.lang.Exception: Invoke > failed: [[c:System]]->getProperties. Cause: > java.security.AccessControlException: access denied > (java.util.PropertyPermission * read,write) VM: > 1.6.0_0@http://java.sun.com/" at: This error message means that the Debian/Ubuntu devs have denied access to System.getProperties(). Please see our FAQ entry "I want to use Tomcat's security manager, how do I install the bridge?" at http://php-java-bridge.sourceforge.net/pjb/FAQ.html > Our previous development server was Windows 2003 where I did not get these > errors. Also my experience with Linux us very less. You have probably picked the wrong Linux distribution. You won't get such error messages in Red Hat Enterprise- or Fedora Linux. It is a good idea to avoid debian packages. Debian maintainers apply patches without knowing what they do. The debian-patched tomcat runs as user root, with dropped privileges, so that user.home is not accessible. Other such examples are the debian PHP suoshin "patch" and the debian OpenSSL "patch", see http://www.heise.de/security/meldung/Querelen-um-PHP-Suhosin-Patch-942667.html Regards, Jost Bökemeier |
From: <php...@li...> - 2010-04-01 15:51:40
|
English version of the article: http://www.h-online.com/open/news/item/Spat-over-PHP-Suhosin-patch-943194.html http://www.h-online.com/newsticker/news/item/Fallout-from-the-OpenSSL-debacle-736175.html On 4/1/10, Jost Boekemeier <jos...@go...> wrote: > Hi Hameed, > >> I have just installed Ubuntu Linux and then php/java bridge in our new >> development server. > > please follow the install instructions at: > http://php-java-bridge.sourceforge.net/pjb/installation.php > > >> "FATAL: Undeclared >> java.lang.RuntimeException detected. java.lang.Exception: Invoke >> failed: [[c:System]]->getProperties. Cause: >> java.security.AccessControlException: access denied >> (java.util.PropertyPermission * read,write) VM: >> 1.6.0_0@http://java.sun.com/" at: > > This error message means that the Debian/Ubuntu devs have denied > access to System.getProperties(). > > Please see our FAQ entry "I want to use Tomcat's security manager, how > do I install the bridge?" at > http://php-java-bridge.sourceforge.net/pjb/FAQ.html > > >> Our previous development server was Windows 2003 where I did not get >> these >> errors. Also my experience with Linux us very less. > > You have probably picked the wrong Linux distribution. You won't get > such error messages in Red Hat Enterprise- or Fedora Linux. > > It is a good idea to avoid debian packages. Debian maintainers apply > patches without knowing what they do. The debian-patched tomcat runs > as user root, with dropped privileges, so that user.home is not > accessible. Other such examples are the debian PHP suoshin "patch" and > the debian OpenSSL "patch", see > http://www.heise.de/security/meldung/Querelen-um-PHP-Suhosin-Patch-942667.html > > > > Regards, > Jost Bökemeier > |