Mantis - Quercus
Viewing Issue Advanced Details
3167 major always 12-12-08 18:54 12-14-08 15:10
koreth  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003167: NPE when calling Java class
WEB-INF/classes/test/MyClass.java:

package test;
public class MyClass {
        public String hi(String who) {
                return "hello " + who;
        }
}

(document root)/myclass.php:

<?php
import test.MyClass;
$x = new MyClass();
print $x->hi('there');

This runs fine in interpreted mode. In compiled mode, it throws NPE:

[18:51:28.110] {http--8080-6} java.lang.NullPointerException
[18:51:28.110] {http--8080-6} at _quercus._html._test._myclass__php.execute(_myclass__php.java:40)
[18:51:28.110] {http--8080-6} at com.caucho.quercus.page.QuercusPage.executeTop(QuercusPage.java:119)
[18:51:28.110] {http--8080-6} at com.caucho.quercus.servlet.ResinQuercusServlet.service(ResinQuercusServlet.java:152)
[18:51:28.110] {http--8080-6} at com.caucho.quercus.servlet.QuercusServlet.service(QuercusServlet.java:407)

Notes
(0003626)
ferg   
12-14-08 15:10   
php/3h16