Hi,
I have the problem to create put an instance of java object in session variable. The code is as follow, and the exception message is bellow it.
I hope that you can indicate what causes the problem here.
Thanks
Zoran
try{
$session->put("eventF", new Java("depths.moodle.EventFactory", $sesame));
if(is_null(java_values($session->get("eventF")))){
throw new Exception("Could not create EventFactory!");
}
}catch(Exception $e){
print_message("session EventF exception: ".$e->getTrace());
print_message("session EventF exception: ".$e->__toString());
}
session EventF exception: Array
session EventF exception: [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:HttpSessionFacade]]->put((o:Object)[o:String], (o:Object)[o:EventFactory]). Cause: java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute VM: 1.6.0_04@http://java.sun.com/" at:
#-13 org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1293)
#-12 org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1254)
#-11 org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
#0 http://localhost:8080/JavaBridge/java/Java.inc(259): java_ThrowExceptionProxyFactory->getProxy(12, 'depths.moodle.E...', true)
#1 http://localhost:8080/JavaBridge/java/Java.inc(411): java_Arg->getResult(true)
#2 http://localhost:8080/JavaBridge/java/Java.inc(417): java_Client->getWrappedResult(true)
#3 http://localhost:8080/JavaBridge/java/Java.inc(621): java_Client->getResult()
#4 http://localhost:8080/JavaBridge/java/Java.inc(1744): java_Client->invokeMethod(4, 'put', Array)
#5 http://localhost:8080/JavaBridge/java/Java.inc(1857): java_JavaProxy->__call('put', Array)
#6 http://localhost:8080/JavaBridge/java/Java.inc(2032): java_AbstractJava->__call('put', Array)
#7 [internal function]: Java->__call('put', Array)
#8 C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\moodleDEPTHS\depths\mapper\depths_insert.php(119): java_InternalJava->put('eventF', Object(Java))
#9 C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\moodleDEPTHS\depths\mapper\depths_insert.php(41): create_event_session_variable()
#10 C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\moodleDEPTHS\lib\dmllib.php(1513): depths_insert_record('user', Object(stdClass), '73', 'INSERT INTO mdl...')
#11 C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\moodleDEPTHS\user\editadvanced.php(85): insert_record('user', Object(stdClass))
#12 {main}]
---------------------------------
Never miss a thing. Make Yahoo your homepage.
|