Ask Your Question

Does anyone know how to bootstrap from tomcat?

asked 2015-10-15 12:34:40 +0200

Brooke gravatar image

updated 2015-10-15 22:44:55 +0200

Alex Kemp gravatar image

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(""); $UnoRuntime = new Java(""); $Context=$Bootstrap->bootstrap(); $Service=$Context->getServiceManager(); $Desktop=$Service->createInstanceWithContext("",$Context); $Loader=$UnoRuntime->queryInterface(Java("")->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:

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?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-04-10 21:29:35 +0200

juliosmax gravatar image

did you tell the bootstrap the path of your libreoffice installation?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-10-15 12:34:40 +0200

Seen: 207 times

Last updated: Apr 10