You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Franz Amador <fg...@yahoo.com> on 2009/07/21 19:55:13 UTC

Return type org.apache.tapestry5.json.JSONObject can not be handled

Our Tapestry5/Dojo web app works just fine everywhere except on one
customer's laptop.  There he gets this error:

Return type org.apache.tapestry5.json.JSONObject can not be handled. 
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
org.apache.tapestry5.runtime.Component.

We're using Tapestry 5.1.0.5 on Java 6, the laptop runs the Japanese version
of Windows (XP, I assume), and the whole system (our webapp running on
Tomcat with Oracle) is installed there.  This configuration works great on
our laptops (which aren't Japanese, though I don't know if that's relevant).

I'm baffled.  What could possibly have caused the
AjaxComponentEventResultProcessor not to be available there (which I assume
is the problem)?  Any suggestions very much appreciated.
-- 
View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3295186.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Return type org.apache.tapestry5.json.JSONObject can not be handled

Posted by Franz Amador <fg...@yahoo.com>.
>> I wondered that also, and I'm waiting on an answer.
>> Does disabling JavaScript make the Ajax stuff invisible to Tapestry?  If  
>> so, it'd be great to have a better error message.

>AJAX is all about using Javascript to update a part of a page without  
>refreshing it. ;) Thus, no Javascript, no AJAX.

Yes, I realize that.  What I meant was, rather than just saying "I don't
know what to do with a JSONObject," it would be more helpful to the
developer if it said "You can't return a JSONObject to a non-AJAX request." 
The former message leaves me wondering if I've somehow misconfigured
Tapestry.  The latter message gives me a much better clue as to where to
start looking for the problem.

-- 
View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3311089.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Return type org.apache.tapestry5.json.JSONObject can not be handled

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 22 Jul 2009 13:05:09 -0300, Franz Amador <fg...@yahoo.com>  
escreveu:

> I wondered that also, and I'm waiting on an answer.
> Does disabling JavaScript make the Ajax stuff invisible to Tapestry?  If  
> so, it'd be great to have a better error message.

AJAX is all about using Javascript to update a part of a page without  
refreshing it. ;) Thus, no Javascript, no AJAX.

You can detect if a request is made through AJAX @Injecting Request is  
then invoking request.ixXHR(). Then, all you need is to return a block or  
component or some JSON object if the request is AJAX and return null, a  
page instance, a page class instance or a page name otherwise.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Return type org.apache.tapestry5.json.JSONObject can not be handled

Posted by Franz Amador <fg...@yahoo.com>.
I wondered that also, and I'm waiting on an answer.

Does disabling JavaScript make the Ajax stuff invisible to Tapestry?  If so, it'd be great to have a better error message.



________________________________
From: Howard Lewis Ship (via Nabble) <ml...@n2.nabble.com>
To: Franz Amador <fg...@yahoo.com>
Sent: Tuesday, July 21, 2009 11:04:05 PM
Subject: Re: Return type org.apache.tapestry5.json.JSONObject can not be  handled

Is JavaScript disabled for that client's laptop? 

On Tue, Jul 21, 2009 at 10:55 AM, Franz Amador<fg...@...> wrote: 

> 
> Our Tapestry5/Dojo web app works just fine everywhere except on one 
> customer's laptop.  There he gets this error: 
> 
> Return type org.apache.tapestry5.json.JSONObject can not be handled. 
> Configured return types are java.lang.Class, java.lang.String, java.net.URL, 
> org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse, 
> org.apache.tapestry5.runtime.Component. 
> 
> We're using Tapestry 5.1.0.5 on Java 6, the laptop runs the Japanese version 
> of Windows (XP, I assume), and the whole system (our webapp running on 
> Tomcat with Oracle) is installed there.  This configuration works great on 
> our laptops (which aren't Japanese, though I don't know if that's relevant). 
> 
> I'm baffled.  What could possibly have caused the 
> AjaxComponentEventResultProcessor not to be available there (which I assume 
> is the problem)?  Any suggestions very much appreciated. 
> -- 
> View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3295186.html
> Sent from the Tapestry Users mailing list archive at Nabble.com. 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: users-unsubscribe@... 
> For additional commands, e-mail: users-help@... 
> 
> 


-- 
Howard M. Lewis Ship 

Creator of Apache Tapestry 
Director of Open Source Technology at Formos 

--------------------------------------------------------------------- 
To unsubscribe, e-mail: users-unsubscribe@... 
For additional commands, e-mail: users-help@... 



________________________________
 
View message @ http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3300097.html 
To unsubscribe from Return type org.apache.tapestry5.json.JSONObject can not be handled, click here. 

-- 
View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3304209.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

Re: Return type org.apache.tapestry5.json.JSONObject can not be handled

Posted by Franz Amador <fg...@yahoo.com>.
Okay, I've heard, indirectly, from the customer.  The laptop does have
JavaScript enabled.  However, it does not have networking fully configured
and is never used on the Internet.  They say "This laptop has no IP
address."  (They are very security-conscious; perhaps this is to to make
unauthorized access more difficult.)  I believe they are using FireFox 3.0. 
Dojo is generating the should-be-AJAX requests.  Perhaps this is ultimately
a Dojo problem, that the laptop's configuration is causing Dojo to omit the
XHR header.  If you have any other ideas, I'd love to hear them, but
otherwise, thanks for your time.


Howard Lewis Ship wrote:
> 
> To expand: that error is associated with an event handler method
> returning a value (JSONObject) that is appropriate for an Ajax
> response, but doing so during a traditional (i.e., non-Ajax) request.
> So for some reason, either it was a traditional request, or something
> on the browser side prevented Tapestry from recognizing the request as
> Ajax (it looks for an XHR header).
> 

-- 
View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3311186.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Return type org.apache.tapestry5.json.JSONObject can not be handled

Posted by Howard Lewis Ship <hl...@gmail.com>.
To expand: that error is associated with an event handler method
returning a value (JSONObject) that is appropriate for an Ajax
response, but doing so during a traditional (i.e., non-Ajax) request.
So for some reason, either it was a traditional request, or something
on the browser side prevented Tapestry from recognizing he request as
Ajax (it looks for an XHR header).

On Tue, Jul 21, 2009 at 11:06 AM, Howard Lewis Ship<hl...@gmail.com> wrote:
> Is JavaScript disabled for that client's laptop?
>
> On Tue, Jul 21, 2009 at 10:55 AM, Franz Amador<fg...@yahoo.com> wrote:
>>
>> Our Tapestry5/Dojo web app works just fine everywhere except on one
>> customer's laptop.  There he gets this error:
>>
>> Return type org.apache.tapestry5.json.JSONObject can not be handled.
>> Configured return types are java.lang.Class, java.lang.String, java.net.URL,
>> org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
>> org.apache.tapestry5.runtime.Component.
>>
>> We're using Tapestry 5.1.0.5 on Java 6, the laptop runs the Japanese version
>> of Windows (XP, I assume), and the whole system (our webapp running on
>> Tomcat with Oracle) is installed there.  This configuration works great on
>> our laptops (which aren't Japanese, though I don't know if that's relevant).
>>
>> I'm baffled.  What could possibly have caused the
>> AjaxComponentEventResultProcessor not to be available there (which I assume
>> is the problem)?  Any suggestions very much appreciated.
>> --
>> View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3295186.html
>> Sent from the Tapestry Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
> Director of Open Source Technology at Formos
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Return type org.apache.tapestry5.json.JSONObject can not be handled

Posted by Howard Lewis Ship <hl...@gmail.com>.
Is JavaScript disabled for that client's laptop?

On Tue, Jul 21, 2009 at 10:55 AM, Franz Amador<fg...@yahoo.com> wrote:
>
> Our Tapestry5/Dojo web app works just fine everywhere except on one
> customer's laptop.  There he gets this error:
>
> Return type org.apache.tapestry5.json.JSONObject can not be handled.
> Configured return types are java.lang.Class, java.lang.String, java.net.URL,
> org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
> org.apache.tapestry5.runtime.Component.
>
> We're using Tapestry 5.1.0.5 on Java 6, the laptop runs the Japanese version
> of Windows (XP, I assume), and the whole system (our webapp running on
> Tomcat with Oracle) is installed there.  This configuration works great on
> our laptops (which aren't Japanese, though I don't know if that's relevant).
>
> I'm baffled.  What could possibly have caused the
> AjaxComponentEventResultProcessor not to be available there (which I assume
> is the problem)?  Any suggestions very much appreciated.
> --
> View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3295186.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org