Issue 96279 - wiki sun publisher extension does not work on linux (oo2.4 and 3.0)
Summary: wiki sun publisher extension does not work on linux (oo2.4 and 3.0)
Status: CLOSED FIXED
Alias: None
Product: extensions
Classification: Extensions
Component: wikipublisher (show other issues)
Version: current
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: milestone 1
Assignee: mikhail.voytenko
QA Contact: eric.savary
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2008-11-17 14:20 UTC by sancelot
Modified: 2014-08-28 19:00 UTC (History)
7 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
this patch makes it work for me (2.46 KB, patch)
2008-11-18 16:42 UTC, caolanm
no flags Details | Diff
the extension from mav46 cws. This is no official release, use at your own risk! (1023.25 KB, application/vnd.openofficeorg.extension)
2009-02-25 14:08 UTC, mikhail.voytenko
no flags Details
modified xslt (47.52 KB, text/xml)
2009-02-27 08:03 UTC, sancelot
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description sancelot 2008-11-17 14:20:33 UTC
I tried running wiki sun publisher on my ubuntu 8.10 linux but has not worked.

I first tried with oo 2.4 , setting up was fine, but unable to connect to my 
mediawiki site URL : http://192.168.1.242/mediawiki 

the message is always can not create a connection to ... 

and in the console is displayed the following message :

 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: 
Connexion refusée
17-nov-08 3:16:13  org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: Retrying request
17-nov-08 3:16:13  org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: 
Connexion refusée
17-nov-08 3:16:13  org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: Retrying request
17-nov-08 3:16:13  org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: 
Connexion refusée
17-nov-08 3:16:13  org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: Retrying request
java.net.ConnectException: Connexion refusée
   at gnu.java.net.PlainSocketImpl.connect(libgcj.so.90)
   at java.net.Socket.connect(libgcj.so.90)
   at java.net.Socket.connect(libgcj.so.90)
   at java.net.Socket.<init>(libgcj.so.90)
   at java.net.Socket.<init>(libgcj.so.90)
   at 
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket
(Unknown Source)
   at 
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket
(Unknown Source)
   at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
   at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
$HttpConnectionAdapter.open(Unknown Source)
   at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown 
Source)
   at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown 
Source)
   at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
   at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
   at com.sun.star.wiki.Helper.ExecuteMethod(Unknown Source)
   at com.sun.star.wiki.WikiEditSettingDialog.DoLogin(Unknown Source)
   at com.sun.star.wiki.WikiEditSettingDialog$1.run(Unknown Source)
17-nov-08 3:17:12  org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: 
Connexion refusée

After some tries, I decied trying it in windows XP platform with oo3.0 : 
success, I can connect my mediawiki site !
!
so I upgraded my linux release from 2.4.1 to 3.0 

I setted up again the wiki sun publisher extension  in oo3.0 setting up was 
fine, but always unable connect to my mediawiki site !!!
Comment 1 sancelot 2008-11-17 14:27:29 UTC
I forgot to tell I am using openoffice in french
Comment 2 eric.savary 2008-11-17 15:37:11 UTC
I cannot reproduce it on Solaris SUNRay with OOo 3.0

@MAV: any comment about the console error message?
Comment 3 sancelot 2008-11-17 16:19:20 UTC
The message appears immediatley after clicking ok,  the access to my mediawiki 
or fr.mediawiki.org needs a few "visible" access time .

After looking at my webserver logs, it seems that it does not target my 
192.168.1.242 url at all , no trace of the requests ... either using the dns  
machine name is not targeted.
 
I made a dump on my net interface :
tcpdump -i eth1 80 : nothing goes out ....
Comment 4 mikhail.voytenko 2008-11-17 17:15:03 UTC
Do you use proxy for connection? If yes, could you please check which value is
set in "Tools/Options/Internet/Proxy" tab page.
Comment 5 sancelot 2008-11-18 08:35:57 UTC
I had already checked for proxy settings : None 

I have direct access to my machine,  THERE IS NO PROXY , my webserver and 
mediawiki are running on my machine, and ooffice also.

However, I set it up another way :
if I setup proxy to manual (http proxy fields left blank) and disable proxy for 
192.168.1.242; now I can use 
the extension to connect to http://192.168.1.242/mediawiki

THERE IS A PROBLEM WITH THE PROXY SETTINGS USAGE !!! I DO NOT HAVE ANY PROXY !
Comment 6 mikhail.voytenko 2008-11-18 09:22:20 UTC
I have already heard that there are problems on some linux installations.
Unfortunately there is still no known way to reproduce the problem. Anyway,
thanks a lot for the detailed explanation, it looks like setting the empty proxy
explicitly workarounds the system problem in your case.
Comment 7 eric.savary 2008-11-18 13:04:21 UTC
@MAV: so what do we do? Do I close as WFM or do you want to work on it?
Comment 8 sancelot 2008-11-18 13:22:22 UTC
unfortunately, it does not ... and I think this will not be a standalone case .

Because the proxy problems affect the Send to mediawiki function , below is the 
result.

There are some possible reasons :
1) The first time I am launching ooffice the http proxy port field is empty , 
if you convert an empty string to int, you have the  following mistake message :
com.sun.star.lang.IllegalArgumentException: The Argument did not hold the 
proper type 
2) If I set up a proxy field (http and port) and reset it later , unfortunately 
the port field does not get empty again, but filled with 0 value....(Do we need 
to fill another bug report for this issue?)
3) another issue with a xslt transformation to convert it to mediawiki has 
appeared 



com.sun.star.lang.IllegalArgumentException: The Argument did not hold the 
proper type
	at com.sun.star.uno.AnyConverter.convertSimple(AnyConverter.java:540)
	at com.sun.star.uno.AnyConverter.toInt(AnyConverter.java:224)
	at com.sun.star.wiki.Helper.SetConfigurationProxy(Unknown Source)
	at com.sun.star.wiki.Helper.ExecuteMethod(Unknown Source)
	at com.sun.star.wiki.Helper.Login(Unknown Source)
	at com.sun.star.wiki.WikiArticle.Login(Unknown Source)
	at com.sun.star.wiki.WikiArticle.<init>(Unknown Source)
	at com.sun.star.wiki.WikiEditorImpl.SendArticleImpl(Unknown Source)
	at com.sun.star.wiki.WikiPropDialog$1.run(Unknown Source)
Nov 18, 2008 2:12:01 PM org.apache.commons.httpclient.HttpMethodBase 
getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using 
getResponseBodyAsStream instead is recommended.
com.sun.star.lang.IllegalArgumentException: The Argument did not hold the 
proper type
	at com.sun.star.uno.AnyConverter.convertSimple(AnyConverter.java:540)
	at com.sun.star.uno.AnyConverter.toInt(AnyConverter.java:224)
	at com.sun.star.wiki.Helper.SetConfigurationProxy(Unknown Source)
	at com.sun.star.wiki.Helper.ExecuteMethod(Unknown Source)
	at com.sun.star.wiki.WikiEditSettingDialog.DoLogin(Unknown Source)
	at com.sun.star.wiki.WikiEditSettingDialog$1.run(Unknown Source)
Nov 18, 2008 2:12:22 PM org.apache.commons.httpclient.HttpMethodBase 
getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using 
getResponseBodyAsStream instead is recommended.
com.sun.star.lang.IllegalArgumentException: The Argument did not hold the 
proper type
	at com.sun.star.uno.AnyConverter.convertSimple(AnyConverter.java:540)
	at com.sun.star.uno.AnyConverter.toInt(AnyConverter.java:224)
	at com.sun.star.wiki.Helper.SetConfigurationProxy(Unknown Source)
	at com.sun.star.wiki.Helper.ExecuteMethod(Unknown Source)
	at com.sun.star.wiki.Helper.Login(Unknown Source)
	at com.sun.star.wiki.WikiEditSettingDialog.DoLogin(Unknown Source)
	at com.sun.star.wiki.WikiEditSettingDialog$1.run(Unknown Source)
Nov 18, 2008 2:12:24 PM org.apache.commons.httpclient.HttpMethodBase 
getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using 
getResponseBodyAsStream instead is recommended.
com.sun.star.lang.IllegalArgumentException: The Argument did not hold the 
proper type
	at com.sun.star.uno.AnyConverter.convertSimple(AnyConverter.java:540)
	at com.sun.star.uno.AnyConverter.toInt(AnyConverter.java:224)
	at com.sun.star.wiki.Helper.SetConfigurationProxy(Unknown Source)
	at com.sun.star.wiki.Helper.ExecuteMethod(Unknown Source)
	at com.sun.star.wiki.Helper.Login(Unknown Source)
	at com.sun.star.wiki.WikiArticle.Login(Unknown Source)
	at com.sun.star.wiki.WikiArticle.<init>(Unknown Source)
	at com.sun.star.wiki.WikiEditorImpl.SendArticleImpl(Unknown Source)
	at com.sun.star.wiki.WikiPropDialog$1.run(Unknown Source)
Nov 18, 2008 2:12:25 PM org.apache.commons.httpclient.HttpMethodBase 
getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using 
getResponseBodyAsStream instead is recommended.
Nov 18, 2008 2:12:26 PM org.apache.commons.httpclient.HttpMethodBase 
getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using 
getResponseBodyAsStream instead is recommended.
ERROR:  'file:///usr/lib/openoffice/basis3.0/share/xslt/wiki/odt2mediawiki.xsl: 
line 44: Circular variable/parameter reference in '[param
(CODE_TAB_REPLACEMENT), param(CODE_STYLES)]'.'
FATAL ERROR:  'Could not compile stylesheet'
com.sun.star.task.ErrorCodeIOException: 
	at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
	at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:178)
	at $Proxy52.storeToURL(Unknown Source)
	at com.sun.star.wiki.WikiEditorImpl.SendArticleImpl(Unknown Source)
	at com.sun.star.wiki.WikiPropDialog$1.run(Unknown Source)
Comment 9 mikhail.voytenko 2008-11-18 14:20:20 UTC
mav->es: I can not really investigate the problem until we can reproduce it. But
I have only now recognized that the stack refers to the GNU Java implementation.
That could be the explanation for the problem. Lets leave the bug open for a
while, I think.

mav->sancelot: The second stack looks indeed like a problem with export to the
wiki format. Please try to export the same document using Wiki export filter (
File/Export menu entry ).
Comment 10 mikhail.voytenko 2008-11-18 14:47:53 UTC
mav->cmc: Do you have an idea whether GNU Java could be the cause of the problem?
Comment 11 sancelot 2008-11-18 15:02:02 UTC
my java machine uses openjdk 6
you can not reproduce the problem, but if you can provide me with an debug 
release of wiki extension that prints some debugging things I can try it.
Or provide me a basic java program that implements the httpclient methods 
only , I will be able running it.

Best Regards
steph
Comment 12 eric.savary 2008-11-18 15:44:19 UTC
@MAV/CMC: as a see that the way of reproducing the problem slightly trespasses
my QA competence, may I dare to ask you to take over as owner? ;)
MAV? CMC?
Comment 13 caolanm 2008-11-18 15:57:34 UTC
I can see this (with openjdk), let me play around with it a bit
Comment 14 caolanm 2008-11-18 16:42:35 UTC
Created attachment 58088 [details]
this patch makes it work for me
Comment 15 caolanm 2008-11-18 16:50:31 UTC
cmc->mav: Does this patch keep it working in your environment. 

Afaics, 
a) A "", 0 as an empty proxy doesn't work for me. Sneaking a look at the
HostConfiguration.java from commons-httpclient gives me
aHostConfig.setProxyHost(null) as an alternative solution, and that does work
for me (http://wiki.services.openoffice.org/wiki/Cmc_wikipublisher_test)
b) If a manual proxy is set up, but proxy port left blank then I get a void Any
rather than an empty int Any, giving that "
"
com.sun.star.lang.IllegalArgumentException: The Argument did not hold the 
proper type
"
exception that sancelot mentions, so I worked around that as well
c) I kept entering the same url into the edit thing and got "duplicate entry"
stuff exceptions, so I decided to add in a fix for that as well at the end. But
the substantive bit is the first two sections of the patch.

The "system" proxy setting isn't sticking in the UI, but that's outside the
scope of this I guess.
Comment 16 mikhail.voytenko 2008-11-18 17:04:47 UTC
mav->cmc: Thanks a lot for the investigation and the patch. I will integrate it
in one of the next wiki-extension related childworkspaces.
Comment 17 sancelot 2008-11-19 09:30:10 UTC
 how can I try the modified version ?!!!
Comment 18 mikhail.voytenko 2008-11-19 09:40:44 UTC
mav->sancelot: You can either integrate the patch and build the extension
yourself ( it is in swext project ), or wait until the new version of the
extension is released.
Comment 19 sancelot 2008-11-20 07:40:38 UTC
??? Yes, I have already thinked about it, but unfortunately : 
There is no way downloading an archive of the cvs trunk throw web interface and 
I do not have a cvs access !!!
 
Best Regards
steph
Comment 20 mikhail.voytenko 2009-02-13 12:50:17 UTC
The patch is integrated.
Comment 21 mikhail.voytenko 2009-02-25 11:50:10 UTC
As I understood, there is no way to verify the scenario on our side currently. I
am setting the issue to verified by myself, since the fix is integrated in the cws. 
Comment 22 mikhail.voytenko 2009-02-25 14:08:18 UTC
Created attachment 60475 [details]
the extension from mav46 cws. This is no official release, use at your own risk!
Comment 23 mikhail.voytenko 2009-02-25 14:15:26 UTC
mav->cmc,sancelot: It would be nice if you had a chance to try the extension
with the GNU Java environment. It should work as expected, but please remember
that this is still an untested version and no official release. So close all the
important documents and be ready for all emergencies :)

By the way, the baseline of the extension has been changed in this cws to
OOo3.0, so please try it either in OOo3.0 or a later version.
Comment 24 eric.savary 2009-02-25 14:49:17 UTC
Resetting to Fixed. Not verified yet.
Comment 25 eric.savary 2009-02-25 14:50:27 UTC
.
Comment 26 caolanm 2009-02-26 09:05:01 UTC
That works for me at least
Comment 27 merriam 2009-02-26 16:42:51 UTC
It's still not working for me.   I'm using the unofficial Wiki Publisher 1.1
posted here by mav yesterday on OpenOffice.org 3.0.1 on Ubuntu Jaunty.

http://www.openoffice.org/issues/show_bug.cgi?id=96279#desc23

Feb 26, 2009 4:30:09 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using
getResponseBodyAsStream instead is recommended.
ERROR: 
'file:///home/merriam/.openoffice.org/3/user/uno_packages/cache/uno_packages/Kqal1c_/wiki-publisher.oxt/filter/odt2mediawiki.xsl:
line 44: Circular variable/parameter reference in '[param(CODE_TAB_REPLACEMENT),
param(CODE_STYLES), param(TABLE_CLASS), variable(USE_DEFAULT_TABLE_CLASS)]'.'
FATAL ERROR:  'Could not compile stylesheet'
com.sun.star.task.ErrorCodeIOException: 
    at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
    at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:178)
    at $Proxy47.storeToURL(Unknown Source)
    at com.sun.star.wiki.WikiEditorImpl.SendArticleImpl(Unknown Source)
    at com.sun.star.wiki.WikiPropDialog$1.run(Unknown Source)


Comment 28 sancelot 2009-02-27 07:20:56 UTC
same issue as merriam, I suppose the connection may work better, since I do not
have the first bad issues.But I can not confirm at the moment, because of the
following issue :

 as I stated in my comment Nov 18 13:22:22, there is another issue with xslt
transform, the File->export to mediawiki does not work and produces the same
mistake...:

ERROR: 
'file:///home/steph/.openoffice.org/3/user/uno_packages/cache/uno_packages/O2fDqh_/wiki-publisher.oxt/filter/odt2mediawiki.xsl:
line 44: Circular variable/parameter reference in '[param(CODE_TAB_REPLACEMENT),
param(CODE_STYLES), param(TABLE_CLASS), variable(USE_DEFAULT_TABLE_CLASS)]'.'
FATAL ERROR:  'Could not compile stylesheet'

Do we need to open another issue ? for this problem or fill it in here....
Regards
steph
Comment 29 mikhail.voytenko 2009-02-27 07:52:31 UTC
mav->merriam, sancelot:
The xslt transformation contains no circular reference. At least I see no.

The problem you mention looks to be a result of the bug in XALAN xslt parser
that is used in Ubuntu. The version 2.7.1 of XALAN has this bug, please see the
following link for details
http://mail-archives.apache.org/mod_mbox/xml-xalan-dev/200802.mbox/%3C7365434.1201876156390.JavaMail.jira@brutus%3E

The workaround for the bug is to define the temporary variables as global ones,
I will try to introduce it. I have opened a successor issue 99703 for this.
Comment 30 sancelot 2009-02-27 08:03:31 UTC
Created attachment 60534 [details]
modified xslt
Comment 31 sancelot 2009-02-27 08:06:11 UTC
with the attached xslt everything works.
Please check I did not break anything in the xslt !
Regards
S.Ancelot


Comment 32 eric.savary 2009-03-04 16:10:45 UTC
Can be mark as duplicate of issue 99703
Comment 33 eric.savary 2009-03-04 16:11:31 UTC
duplicate

*** This issue has been marked as a duplicate of 99703 ***
Comment 34 eric.savary 2009-03-04 16:13:26 UTC
Closed
Comment 35 mikhail.voytenko 2009-03-05 06:57:49 UTC
Sorry, I have to reopen the issue. It is no duplicate to issue 99703. cmc has
solved the problem related to GNU Java, the mentioned issue was just an
additional scenario that has affected some users.
Comment 36 mikhail.voytenko 2009-03-05 06:58:33 UTC
Setting back to fixed.
Comment 37 mikhail.voytenko 2009-03-05 06:59:45 UTC
cmc has verified the version with integrated patch, it can not be verified on
our side. Setting to verified myself.
Comment 38 caolanm 2009-05-01 20:43:03 UTC
integrated DEV300_m47
Comment 39 Meyer 2014-08-28 18:40:29 UTC
I have an issue with similar stacktraces running Windows while I try to run the **Sample Code** for converting a simple ODT to a PDF. I took the latest SDK released 8/21/2014 4.1.1. I've been struggling to find any information on how to solve this error and this thread has been the closest thing so far. 

Please help and ask for any additional information you may need!
Thank You

Here is the stack trace:

com.sun.star.task.ErrorCodeIOException:
at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:173)
	at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:139)
	at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:334)
	at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
	at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
	at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
	at com.sun.proxy.$Proxy5.storeToURL(Unknown Source)
	at com.example.DocumentConverter.traverse(DocumentConverter.java:129)
	at com.example.DocumentConverter.main(DocumentConverter.java:212)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.sun.star.lib.loader.Loader.main(Loader.java:134)
Comment 40 Ariel Constenla-Haile 2014-08-28 19:00:41 UTC
(In reply to Meyer from comment #39)
> I have an issue with similar stacktraces running Windows while I try to run
> the **Sample Code** for converting a simple ODT to a PDF. I took the latest
> SDK released 8/21/2014 4.1.1. I've been struggling to find any information
> on how to solve this error and this thread has been the closest thing so
> far. 
> 
> Please help and ask for any additional information you may need!
> Thank You

You can find support on the User Forum or the API Mailing list:
https://openoffice.apache.org/mailing-lists.html#api-mailing-list-public
https://forum.openoffice.org/