hello, I'm trying to use php-java bridge, I prove some simple examples and there was no problem.

Now I want to connect php to mysql using java. I have this java code (wich works)

Java Code:
public class database {
	private static Connection conexion;
	private static Logger log = Logger.getLogger("log");;
    
    public void connectDB(){
    	
    	try {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
    	    
            conexion = DriverManager.getConnection("jdbc:mysql://localhost/db", "root", "password");
    	    log.info("conectado a la base de datos");
    	    
        } catch (Exception e){
        	log.severe("no se ha conectado al driver de mysql");
        }
    }
}

I try to invocate it with php:
PHP Code:
<?php

     require_once('./JavaBridge/java/Java.inc');
     java_require('/var/www/bridge/java/bridge.jar');

     try{
         $database = new Java('database');
         $database -> connectDB();
         echo "db open";   
     } catch (JavaException $e){
         echo "ERROR". "<br>". $e;
     }
?>
I have a JavaException, this is the mistake:

Java Code:
ERROR
[[o:Exception]:"java.lang.Exception: Invoke failed: [[o:database]]->connectDB. Cause: java.lang.NullPointerException VM: 1.6.0_20@http://java.sun.com/" at: #-10 database.connectDB(database.java:33) #-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) #0 /var/lib/tomcat6/webapps/JavaBridge/java/Java.inc(267): java_ThrowExceptionProxyFactory->getProxy(2, 'database', true) #1 /var/lib/tomcat6/webapps/JavaBridge/java/Java.inc(419): java_Arg->getResult(true) #2 /var/lib/tomcat6/webapps/JavaBridge/java/Java.inc(425): java_Client->getWrappedResult(true) #3 /var/lib/tomcat6/webapps/JavaBridge/java/Java.inc(629): java_Client->getResult() #4 /var/lib/tomcat6/webapps/JavaBridge/java/Java.inc(1755): java_Client->invokeMethod(1, 'connectDB', Array) #5 /var/lib/tomcat6/webapps/JavaBridge/java/Java.inc(1868): java_JavaProxy->__call('connectDB', Array) #6 /var/lib/tomcat6/webapps/JavaBridge/java/Java.inc(2043): java_AbstractJava->__call('connectDB', Array) #7 /var/www/bridge/baseDatos.php(8): Java->__call('connectDB', Array) #8 /var/www/bridge/baseDatos.php(8): Java->connectDB() #9 {main}]
I cant understand where my problem is, do you have any idea?
Thank you in advance!