I use latest tomcat7 and LO 5 in Ubuntu 14.04. I use PHP/JavaBridge for my PHP script to open/edit a LO document.
$Bootstrap = new Java(“com.sun.star.comp.helper.Bootstrap”);
$UnoRuntime = new Java(“com.sun.star.uno.UnoRuntime”);
$Context=$Bootstrap->bootstrap();
$Service=$Context->getServiceManager();
$Desktop=$Service->createInstanceWithContext(“com.sun.star.frame.Desktop”,$Context);
$Loader=$UnoRuntime->queryInterface(Java(“com.sun.star.frame.XDesktop”)->class,$Desktop);
The problem is that when calling to queryInterface(), it always generates the following error (i.e. DisposedException):-
PHP Warning: Unchecked exception detected: [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: [[o:UnoRuntime]]->queryInterface((c:Class)[c:Class], (o:Object)[o:$Proxy2]). Cause: com.sun.star.lang.DisposedException
I took “ps -aux | grep office” and it showed LO was running (invoked by bootstrap()).
tomcat7 4698 0.0 0.1 33944 4092 ? Sl 17:53 0:00 /usr/lib/libreoffice/program/oosplash --nologo --nodefault --norestore --nolockcheck --accept=pipe,name=uno6899141817323784468;urp;
tomcat7 4713 0.0 1.3 208040 42084 ? Sl 17:53 0:00 /usr/lib/libreoffice/program/soffice.bin --nologo --nodefault --norestore --nolockcheck --accept=pipe,name=uno6899141817323784468;urp;
Does anyone know how to solve the DisposedException error?
Brooke