Re: [xwiki-devs] Problem in debugging xwiki using eclipse
Hi, I imported xwiki-debug-eclipse as an Eclipse project and not as a maven project. When I run xem-web-debug, Apache Tomcat Server console shows following errors. http://pastebin.com/Pc1g9JDf <http://pastebin.com/Pc1g9JDf>There is no newly logged lines in xwiki.log. May be xwiki isn't deploying when running xem-web-debug project in eclipse. Thank you.
On Tue, May 17, 2011 at 13:22, Chamika Weerasinghe <[email protected]> wrote:
Hi, I imported xwiki-debug-eclipse as an Eclipse project and not as a maven project.
When I run xem-web-debug, Apache Tomcat Server console shows following errors. http://pastebin.com/Pc1g9JDf
That happen sometime, in that case I do a clean on the server view and then it works well again.
<http://pastebin.com/Pc1g9JDf>There is no newly logged lines in xwiki.log. May be xwiki isn't deploying when running xem-web-debug project in eclipse.
Thank you. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Tue, May 17, 2011 at 17:15, Thomas Mortagne <[email protected]> wrote:
On Tue, May 17, 2011 at 13:22, Chamika Weerasinghe <[email protected]> wrote:
Hi, I imported xwiki-debug-eclipse as an Eclipse project and not as a maven project.
When I run xem-web-debug, Apache Tomcat Server console shows following errors. http://pastebin.com/Pc1g9JDf
That happen sometime, in that case I do a clean on the server view and then it works well again.
To be more precise in the Servers window right click on your server and then "Clean..."
<http://pastebin.com/Pc1g9JDf>There is no newly logged lines in xwiki.log. May be xwiki isn't deploying when running xem-web-debug project in eclipse.
Thank you. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
-- Thomas Mortagne
Hi all, Thank you Eduard Moraru for teaching me remote debugging. For now I'll use this method. I'm currently working on XWIKI-5970 jira issue and Thomas told me a java class which triggers when we try to search wikis. ( https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... ) But issue is occurring before that java class triggers. For identifying which causes the issue I will look for stack/trace of the eclipse and hope to find the correct class which converts "+" to " " (white space) in search keywords. Thank you.
On Wed, May 18, 2011 at 10:39, Chamika Weerasinghe <[email protected]> wrote:
Hi all, Thank you Eduard Moraru for teaching me remote debugging. For now I'll use this method.
I'm currently working on XWIKI-5970 jira issue and Thomas told me a java class which triggers when we try to search wikis. ( https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... )
But issue is occurring before that java class triggers. For identifying which causes the issue I will look for stack/trace of the eclipse and hope to find the correct class which converts "+" to " " (white space) in search keywords.
WikiSearchResource directly receive the REST request so you mean the generated REST request itself is wrong ?
Thank you. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 05/18/2011 10:43 AM, Thomas Mortagne wrote:
On Wed, May 18, 2011 at 10:39, Chamika Weerasinghe<[email protected]> wrote:
Hi all, Thank you Eduard Moraru for teaching me remote debugging. For now I'll use this method.
I'm currently working on XWIKI-5970 jira issue and Thomas told me a java class which triggers when we try to search wikis. ( https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... )
But issue is occurring before that java class triggers. For identifying which causes the issue I will look for stack/trace of the eclipse and hope to find the correct class which converts "+" to " " (white space) in search keywords.
WikiSearchResource directly receive the REST request so you mean the generated REST request itself is wrong ?
Yes. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Wed, May 18, 2011 at 12:24, Sergiu Dumitriu <[email protected]> wrote:
On 05/18/2011 10:43 AM, Thomas Mortagne wrote:
On Wed, May 18, 2011 at 10:39, Chamika Weerasinghe<[email protected]> wrote:
Hi all, Thank you Eduard Moraru for teaching me remote debugging. For now I'll use this method.
I'm currently working on XWIKI-5970 jira issue and Thomas told me a java class which triggers when we try to search wikis. ( https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... )
But issue is occurring before that java class triggers. For identifying which causes the issue I will look for stack/trace of the eclipse and hope to find the correct class which converts "+" to " " (white space) in search keywords.
WikiSearchResource directly receive the REST request so you mean the generated REST request itself is wrong ?
Yes.
Then there is no need to debug XWiki at all since it mean the issue is in velocity or javascript.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 05/18/2011 12:54 PM, Thomas Mortagne wrote:
On Wed, May 18, 2011 at 12:24, Sergiu Dumitriu<[email protected]> wrote:
On 05/18/2011 10:43 AM, Thomas Mortagne wrote:
On Wed, May 18, 2011 at 10:39, Chamika Weerasinghe<[email protected]> wrote:
Hi all, Thank you Eduard Moraru for teaching me remote debugging. For now I'll use this method.
I'm currently working on XWIKI-5970 jira issue and Thomas told me a java class which triggers when we try to search wikis. ( https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... )
But issue is occurring before that java class triggers. For identifying which causes the issue I will look for stack/trace of the eclipse and hope to find the correct class which converts "+" to " " (white space) in search keywords.
WikiSearchResource directly receive the REST request so you mean the generated REST request itself is wrong ?
Yes.
Then there is no need to debug XWiki at all since it mean the issue is in velocity or javascript.
It's probably in the JAX library, or in the way we configure the resources. One possibility is that the MIME type is the one triggering this double decoding. If the request is processed as URL-encoded form data, then it's normal to do double decoding. One quick way around it is to do double encoding on our end as well. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi, I'm not familiar with velocity. So should I look into it for fixing issue? or can't we modify JAX library as Sergiu suggested?
Hi, I did a lot to find a cause but I cannot find proper classes in JAX library, I would either like to move into a different issue or have some expert look into this, can you guys help? Thank you.
On Fri, May 20, 2011 at 12:32, Chamika Weerasinghe <[email protected]> wrote:
Hi, I did a lot to find a cause but I cannot find proper classes in JAX library, I would either like to move into a different issue or have some expert look into this, can you guys help?
Sure if it's too complex or too deep for what was supposed to be just training you should put in the jira issue everything you found so far and switch to another one. Will try to find something else less complex this time ;) Sorry about that when just seemed at the jira issue it looked pretty easy to fix.
Thank you. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 05/20/2011 12:32 PM, Chamika Weerasinghe wrote:
Hi, I did a lot to find a cause but I cannot find proper classes in JAX library, I would either like to move into a different issue or have some expert look into this, can you guys help?
Thank you.
I debugged this further, and I found the problem. It's a bug in the com.noelios.restlet jar (or the org.restlet one, depending on how the bug is seen), and there's little we can do about it. The problem is in com.noelios.restlet.application.TunnelFilter.processQuery(Request) at line 292, where the request is changed to reference a modified query string. The query string is obtained from the original query string, by removing some special parameters (result media type, character set and encoding, language), and then re-encoding the values using a specific character set. The code progresses further to org.restlet.data.Reference.encode(String, CharacterSet) where it returns an URL-encoded string only if the passed CharacterSet is not null. Unfortunately, the TunnelFilter passes null, causing the query to be re-composed without encoding. A proper fix require to patch the restlet jar (or upgrade to 2.0 if the problem is fixed in that version). A quick fix for the JumpToPage dialog is to not use the media=json query parameter, which triggers the query string processing. The suggest.js widget already sends the expected media type in an HTTP header. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (3)
-
Chamika Weerasinghe -
Sergiu Dumitriu -
Thomas Mortagne