To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=103570
                 Issue #|103570
                 Summary|Unable to start openoffice through servlet in weblogic
                        | in solaris server
               Component|tools
                 Version|OOo 3.1
                Platform|Sun
                     URL|https://sourceforge.net/community/forum/topic.php?id=6
                        |113
              OS/Version|Solaris
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P1
            Subcomponent|code
             Assigned to|mh
             Reported by|isingh





------- Additional comments from [email protected] Wed Jul 15 12:33:48 
+0000 2009 -------
Hi guys,

Can anybody help me to start openoffice i.e "ooffice" installed in solaris 
through a servlet to create word documents from template.

I have used the following code to start openoffice

String oooAcceptOption = "-accept=socket,host=localhost,port=9999;urp;";

String sOffice = System.getProperty("os.name").startsWith
("Windows") ? "soffice.exe" : "soffice";

URL[] oooExecFolderURL = new URL[] { new File(oooExecFolder).toURI().toURL() };

URLClassLoader loader = new URLClassLoader(oooExecFolderURL);

File fOffice = NativeLibraryLoader.getResource(loader, sOffice);

if (fOffice == null)
throw new BootstrapException("no office executable found!");

// create call with arguments
int arguments = (oooOptions != null) ? oooOptions.size() + 1 : 1;

if (oooAcceptOption != null)
arguments++;

String[] oooCommand = new String[arguments];

oooCommand[0] = fOffice.getPath();

for (int i = 0; i < oooOptions.size(); i++) {
oooCommand[i + 1] = (String) oooOptions.get(i);
}

if (oooAcceptOption != null)
oooCommand[arguments - 1] = oooAcceptOption;

// start office process
oooProcess = Runtime.getRuntime().exec(oooCommand);

pipe(oooProcess.getInputStream(), System.out, "CO> ");
pipe(oooProcess.getErrorStream(), System.err, "CE> ");

This code doesn't work and throws an exception as follows,

CE> /opt/openoffice.org3/program/soffice.bin X11 error: Can't open display: 
jnbpi77023.investec.co.za:0
CE> Set DISPLAY environment variable, use -display option
CE> or check permissions of your X-Server
CE> (See "man X" resp. "man xhost" for details)

Environment details are as folllows,
Solaris version 5.10, Weblogic 8.1.5 and openoffice version 3.1.

Surprisingly this same code starts working if I login to the same solaris box 
through a Xwindows using userid/password through which I start the weblogic or 
any other user id.

I am using Exceed tool to login to solaris XWindows.

Please help me to start openoffice without using a XWindows client session at 
solaris. 

Regards,
Inderjit Singh
[email protected]

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to