Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: connection failed while connecting to OpenOffice .org

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Thanked 0 Times in 0 Posts

    Default connection failed while connecting to OpenOffice .org

    File file = new File((new StringBuilder()).append(s2).append(File.separator) .append(s1).toString());
    file.renameTo(new File((new StringBuilder()).append(s2).append(File.separator) .append("$$tsjoof$$.xls").toString()));
    // SocketOpenOfficeConnection socketopenofficeconnection = new SocketOpenOfficeConnection();
    OpenOfficeConnection socketopenofficeconnection = new SocketOpenOfficeConnection(8100);

    String s3 = (new StringBuilder()).append(s2).append(File.separator) .append("$$tsjoof$$.xls").append(".ods").toString( );
    DefaultDocumentFormatRegistry defaultdocumentformatregistry = new DefaultDocumentFormatRegistry();
    File file4 = new File((new StringBuilder()).append(s2).append(File.separator) .append("$$tsjoof$$.xls").toString());
    File file6 = new File(s3);
    OpenOfficeDocumentConverter openofficedocumentconverter = new OpenOfficeDocumentConverter(socketopenofficeconnec tion);
    openofficedocumentconverter.convert(file4, defaultdocumentformatregistry.getFormatByFileExten sion("xls"), file6, defaultdocumentformatregistry.getFormatByFileExten sion("ods"));
    } else
    File file7 = new File((new StringBuilder()).append(s2).append(File.separator) .append("$$tsjoof$$.xls").toString());
    file7.renameTo(new File((new StringBuilder()).append(s2).append(File.separator) .append(s1).toString()));
    throw new OpenOfficeConnectException("Unable to connect to OpenOffice.org to convert Excel Document.");
    It is giving an exception as

    connection failed: socket,host=localhost,port=1234,tcpNoDelay=1: java.net.ConnectException: Connection refused: connect Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.artofsolving.jodconverter.openoffice.connectio n.AbstractOpenOfficeConnection.disconnect(Abstract OpenOfficeConnection.java:88) at fileToXliff.ExcelImporter.convert(ExcelImporter.ja va:90) at fileToXliff.MainGui.jbtnConvertActionPerformed(Mai nGui.java:667) at fileToXliff.MainGui.access$800(MainGui.java:55) at fileToXliff.MainGui$9.actionPerformed(MainGui.java :179) What should I need to do .

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 891 Times in 874 Posts

    Default Re: connection failed while connecting to OpenOffice .org

    Please read the Announcement topic at the top of the sub-forum to learn how to post code in code or highlight tags and other useful info for newcomers.

Similar Threads

  1. Replies: 0
    Last Post: July 21st, 2013, 02:25 PM
  2. Shared connection or individual connection?
    By newbie14 in forum Java Networking
    Replies: 6
    Last Post: January 12th, 2013, 03:10 AM
  3. [SOLVED] failed install jwsdp??
    By hertom.lear in forum What's Wrong With My Code?
    Replies: 0
    Last Post: December 4th, 2012, 09:49 PM
  4. Replies: 12
    Last Post: September 3rd, 2011, 07:07 AM
  5. Replies: 0
    Last Post: March 26th, 2011, 11:07 AM

Tags for this Thread