I got this exception
while connecting to open office from another application (PhpBridge custom servlet in my case).
Here’s the original code i was using
Here how I got around it.
List<String> oooOptions = OOoServer.getDefaultOOoOptions();
The -headless & -nofirststartwizard are important. In linux, the “headless” package must be separately installed.
Next, do the following
OOoServer oooServer = new OOoServer(installationPath, oooOptions);
BootstrapSocketConnector bootstrapSocketConnector = new BootstrapSocketConnector(oooServer);
XComponentContext context = bootstrapSocketConnector.connect();
Once you have a componentContext, you’re all set and good to go!
Their homes they built, walls high and strong,
Heavily armed guards to protect them along;
But, all stood helpless before death, you know!
And lost in their struggle to survive, you know!
Dragged into graves from those castles were they
Into narrow, dark depths where, unfortunate, they lay;
‘Gone is your glory, your splendour, O where?’
Cried a voice, ‘your throne, your crown, O where?’
Luxury and lust were certainly not new
Thick parlour curtains always hid them from view;
Defeated, despised, stinking corpses today
In graves of dust, were they left to decay;
The dust they spat on, now above them lay,
Those faces of lust, just buried away;
Their bellies they filled with rich sumptuous food,
Now graves they filled, recording nothing good;
Gluttonous they remained for years on end,
Now for their deeds, in the grave, they fend!