OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Libre Office Getting socket Disposed exception on connecting

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
kaushalc
General User
General User


Joined: 12 Jul 2009
Posts: 31

PostPosted: Thu May 17, 2012 4:50 am    Post subject: Libre Office Getting socket Disposed exception on connecting Reply with quote

I have been using OO for almost 3 years now as the backend of my application. Now since I need the ability to export to DocX I am forced to look at Libre Office as OO still doesnt support export to DocX format.

The problem is the connection code that I was using to connect to OO doesnt seem to be working for Libre Office.

Code:

String connectionString = "socket,host=127.0.0.1,port=8100,tcpNoDelay=1";
           XComponentContext localContext = Bootstrap.createInitialComponentContext(null);
           XMultiComponentFactory localServiceManager = localContext.getServiceManager();
           XConnector connector = (XConnector) UnoRuntime.queryInterface(com.sun.star.connection.XConnector.class,
                   localServiceManager.createInstanceWithContext("com.sun.star.connection.Connector", localContext));
           XConnection connection = connector.connect(connectionString);
           connection.flush();
          
           XBridgeFactory bridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(
                   com.sun.star.bridge.XBridgeFactory.class, localServiceManager.createInstanceWithContext(
                         "com.sun.star.bridge.BridgeFactory", localContext));
           XBridge bridge = bridgeFactory.createBridge("KC", "urp", connection, null);
           XComponent bridgeComponent = (XComponent) UnoRuntime.queryInterface(com.sun.star.lang.XComponent.class, bridge);
          
   
           Object serviceManagerObject = bridge.getInstance("StarOffice.ServiceManager");




I get the following exception in the last linke "bridge.getInstance()".

Code:
com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge@9980d5 is disposed
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.checkDisposed(java_remote_bridge.java:913)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:828)


The command I am using to start LO is this


soffice -headless -server "-accept=socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;"


I have tried LO 3.5 on CentOS and on Windows. Same issue in both places.
Code:
Back to top
View user's profile Send private message Send e-mail
kaushalc
General User
General User


Joined: 12 Jul 2009
Posts: 31

PostPosted: Mon May 21, 2012 9:52 pm    Post subject: Happening on OO 3.4 on Centos Reply with quote

I see this same issue happening on OO 3.4 (latest release) on Cent OS 6
Back to top
View user's profile Send private message Send e-mail
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4791
Location: Netherlands

PostPosted: Mon May 21, 2012 10:14 pm    Post subject: Reply with quote

Contact the developers of LibreOffice. Please find suggestions at http://www.libreoffice.org/developers-2/
_________________
LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group