OpenOffice BootstrapException NoConnectException with Invisible (Hidden/Headless) Mode with Linux

May 1, 2011 1 comment

I got this exception

 com.sun.star.comp.helper.BootstrapException: com.sun.star.connection.NoConnectException

while connecting to open office from another application (PhpBridge custom servlet in my case).

Here’s the original code i was using

BootstrapSocketConnector.bootstrap(installationPath);

Here how I got around it.

List<String> oooOptions = OOoServer.getDefaultOOoOptions();
oooOptions.add(“-headless”);
oooOptions.add(“-nofirststartwizard”);

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!

Advertisements
Categories: Bootstrap, Open Office

Death, the Leveller (Poetry)

May 1, 2011 1 comment

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!

Categories: Death, God, Poetry, Spirituality

WinSCP console hangs while installing with yum

February 13, 2011 Leave a comment

This seemed very wierd to me.

Here’s what i used to get before it “hung”

[root@xxxx ~]# yum install mod_dav_svn
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.mirror.iweb.ca
* base: centos.mirror.iweb.ca
* epel: mirror.csclub.uwaterloo.ca
* extras: centos.mirror.iweb.ca
* updates: centos.mirror.iweb.ca
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mod_dav_svn.x86_64 0:1.4.2-4.el5_3.1 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mod_dav_svn x86_64 1.4.2-4.el5_3.1 base 70 k

Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 70 k

Host is not communicating for more than 15 seconds. Still waiting….

Warning: Aborting this operating will close the connection.

As it turned out, it was waiting for user input

“Is this ok[y/N]”

Solution: ? The “-y” flag of yum

yum-y install mod_dav_svn

Tradition 5 – Good Behavior

January 24, 2011 Leave a comment

Train yourself in good behavior with regards to what you dislike in others.

– Imam Ali (a.s)

Tradition 4 – The Most Superior Among Men According to Jesus

January 19, 2011 Leave a comment

Someone asked Jesus as to who was the most superior among men. He bent to the ground and taking two handfulls of the earth in both his hands said,

“Both are the earth but , i.e. all men are equally from the dust and shall return to it but the more superior one in the view of God is the one who is more pious”

Tradition 3 – The Best Charity

January 19, 2011 Leave a comment

The Sixth Holy Imam Jafar ibne Muhammed As-Sadiq said,

The charity which God loves the most, i.e. which is more readily accepted by God is the peace re-established between two quarreling men or groups.

Tradition 2

December 12, 2010 Leave a comment

Allah, the Exalted, does not look at your faces, but He looks at your hearts.

– Imam Ali ar-Ridha (Bihar al-Anwar, vol 67, p. 241)