You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Stephen Dahl <da...@goshawk.com> on 2008/02/06 21:29:30 UTC

Transclude plugin

Is the Ceryle Transclude plugin known to work or not work with  
JSPWiki 2.6.0?

This plugin invocation:

	[{TranscludePlugin page='JSPWiki:Main'}]

...worked OK on JSPWiki 2.4.102, but on 2.6.0, I get this error message

	Error, failed to reach: http://www.jspwiki.org/wiki/RPC2/ Exception:  
org.apache.xmlrpc.XmlRpcClientException: Error decoding XML-RPC  
response Message: Error decoding XML-RPC response

I removed the comment brackets around XML-RPC in the web.xml and  
restarted the wiki, but this didn't change the error message.

By hacking around, I got Transclude to give me a stack trace:

--------
org.apache.xmlrpc.XmlRpcClientException: Error decoding XML-RPC response
	at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse 
(XmlRpcClientResponseProcessor.java:80)
	at org.apache.xmlrpc.XmlRpcClientWorker.execute 
(XmlRpcClientWorker.java:73)
	at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
	at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
	at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
	at org.ceryle.wiki.plugin.transclude.CachedPage.refreshPage 
(CachedPage.java:119)
	at org.ceryle.wiki.plugin.transclude.CachedPage.getHtml 
(CachedPage.java:79)
	at org.ceryle.wiki.plugin.transclude.TranscludePlugin.transclude 
(TranscludePlugin.java:133)
	at org.ceryle.wiki.plugin.transclude.TranscludePlugin.execute 
(TranscludePlugin.java:96)
	at com.ecyrd.jspwiki.plugin.PluginManager.execute(PluginManager.java: 
383)
	at com.ecyrd.jspwiki.parser.PluginContent.getText(PluginContent.java: 
158)
	... more
Caused by: java.lang.StringIndexOutOfBoundsException: String index  
out of range: 255
	at java.lang.String.charAt(String.java:558)
	at uk.co.wilson.xml.MinML.parse(MinML.java:371)
	at uk.co.wilson.xml.MinML.parse(MinML.java:487)
	at org.apache.xmlrpc.XmlRpc.parse(XmlRpc.java:472)
	at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse 
(XmlRpcClientResponseProcessor.java:68)
	... 104 more
--------

Unfortunately, I don't know Throwable well enough to find out what's  
hidden in that "... 104 more".


Re: Transclude plugin

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> Is there someone on this already or do you want me to tackle it?

Go ahead :-)

/Janne

Re: Transclude plugin

Posted by Murray Altheim <mu...@altheim.com>.
Janne Jalkanen wrote:
>> I have to say that I don't understand why the heck the XML-RPC
>> code feels the need to use little hacks like MinML when Java
>> itself provides a reliable XML parser, where this kind of thing
> 
> I think the XML-RPC code predates JAXP.

Yes, I believe you're right. What I meant was that there were
compliant XML parsers available outside of Java at that time.

>> We are using an older version of Apache XML-RPC and the current
>> version (3.1) doesn't use MinML. We haven't upgraded because of
>> time constraints and not wanting to break something that isn't
>> broken. This does sound a bit broken though.
> 
> Yup, it sounds like a very good reason for an upgrade.  Could someone 
> please open up a task in the JIRA tracker?

Is there someone on this already or do you want me to tackle it?

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: Transclude plugin

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> I have to say that I don't understand why the heck the XML-RPC
> code feels the need to use little hacks like MinML when Java
> itself provides a reliable XML parser, where this kind of thing
>

I think the XML-RPC code predates JAXP.

> We are using an older version of Apache XML-RPC and the current
> version (3.1) doesn't use MinML. We haven't upgraded because of
> time constraints and not wanting to break something that isn't
> broken. This does sound a bit broken though.

Yup, it sounds like a very good reason for an upgrade.  Could someone  
please open up a task in the JIRA tracker?

/Janne

Re: Transclude plugin

Posted by Murray Altheim <mu...@altheim.com>.
Stephen Dahl wrote:
> Is the Ceryle Transclude plugin known to work or not work with JSPWiki 
> 2.6.0?
> 
> This plugin invocation:
> 
>     [{TranscludePlugin page='JSPWiki:Main'}]
> 
> ...worked OK on JSPWiki 2.4.102, but on 2.6.0, I get this error message
> 
>     Error, failed to reach: http://www.jspwiki.org/wiki/RPC2/ Exception: 
> org.apache.xmlrpc.XmlRpcClientException: Error decoding XML-RPC response 
> Message: Error decoding XML-RPC response

I'm not sure, but my guess is that jspwiki.org doesn't have XML-RPC
enabled, so you'd get an error. But obviously this isn't a very
friendly error, so I added a stack trace as well to the code and
received this:

  Fatal error parsing XML: org.xml.sax.SAXParseException: invalid Character Entitiy

Given the misspelling of "Entitiy" I tracked that down to the
MinML code (trust misspellings to act as truffles to pigs). In
looking at problem there it's a matter of some poor programming,
since the string out of bounds exception is just poor parser
design.

I have to say that I don't understand why the heck the XML-RPC
code feels the need to use little hacks like MinML when Java
itself provides a reliable XML parser, where this kind of thing
wouldn't have provoked so low a level an exception (i.e., been
handled better than that). If Java didn't provide an XML parser
when the current version of XML-RPC was written they could have
at least used one of the more solid parsers (I say this having
seen problems like this arise before due to trying to use
noncompliant parsers).

We are using an older version of Apache XML-RPC and the current
version (3.1) doesn't use MinML. We haven't upgraded because of
time constraints and not wanting to break something that isn't
broken. This does sound a bit broken though.

[...]
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out 
> of range: 255
>     at java.lang.String.charAt(String.java:558)
>     at uk.co.wilson.xml.MinML.parse(MinML.java:371)
>     at uk.co.wilson.xml.MinML.parse(MinML.java:487)
>     at org.apache.xmlrpc.XmlRpc.parse(XmlRpc.java:472)
>     at 
> org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse(XmlRpcClientResponseProcessor.java:68) 
> 
>     ... 104 more
> --------
> 
> Unfortunately, I don't know Throwable well enough to find out what's 
> hidden in that "... 104 more".

That wouldn't have provided any more help -- the problem was found to
be in the XML-RPC code to an invalid character entity occurring
in the response to wiki.getPageHTML. This is a bug either in the
Apache XML-RPC code (which is out of date) or in MinML's handling of
invalid content, not in TranscludePlugin per se. You should probably
file a bug against that.

The response from the plugin:

    Error, failed to reach: http://www.jspwiki.org/wiki/RPC2/ Exception:
    org.apache.xmlrpc.XmlRpcClientException: Error decoding XML-RPC
    response Message: Error decoding XML-RPC response

could possibly be friendlier but is reasonably appropriate to the
problem. I'll look into modifying TranscludePlugin to provide a
more helpful response, perhaps in the logs or something to permit
easier debugging.

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record