
|
Re: Java.lang.String ClassCastException
OK, I'll keep investigating by your comments. thx On Thu, Jun 25, 2009 at 2:41 AM, David Marginian <david@...> wrote:
I would be surprised if this is not working. If I were you I would ensure that you changed the deployed file and restarted your container. I would double check everything and take a look at the server logs (internal dwr errors shoudl be logged without the filter).
On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu <rioliu@...> wrote:
Oh, yes, now I corrected it. but got the same result from server.
On Thu, Jun 25, 2009 at 2:34 AM, David Marginian <david@...> wrote:
You have the incorrect path to TestClass in your signature (which is why I originally told you to send us your configuration, but you insisted it was correct - this would have saved us a lot of time).
In your signature:
import org.rio.test.bean.TestClass;
In your creator:
org.rio.test.TestClass
Your signature should read org.rio.test.TestClass
-David
On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu <rioliu@...> wrote:
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr//dwr30.dtd">
<dwr> <allow> <create creator="new" javascript="TestManager"> <param name="class" value="org.rio.test.TestManager"/> </create>
<create creator="new" javascript="TestClass"> <param name="class" value="org.rio.test.TestClass"/> </create> <convert converter="exception" match="java.lang.Exception"/>
<convert converter="bean" match="org.rio.test.bean.Message"/> <convert converter="bean" match="org.rio.test.bean.Note"/> </allow>
<signatures>
<![CDATA[ import java.util.List; import java.util.Map;
import org.rio.test.bean.TestClass;
TestClass.removeError(Map<String, Boolean>); ]]>
</signatures> </dwr>
On Thu, Jun 25, 2009 at 2:06 AM, David Marginian <david@...> wrote:
Sending us your dwr.xml would help us ensure you have everything set-up correctly.
On Wed, Jun 24, 2009 at 12:05 PM, David Marginian <david@...> wrote:
What version of dwr are you using? Pre 3.x the AuditLogAjaxFilter does not exist.
On Wed, Jun 24, 2009 at 11:59 AM, Rio Liu <rioliu@...> wrote:
I try to user <filter class="org.directwebremoting.filter.AuditLogAjaxFilter"/> under allow tag to trace the log, but I got a NPE :(, It doesn't work for me. and my creator="new".
On Thu, Jun 25, 2009 at 1:42 AM, David Marginian <david@...> wrote:
Do you see anything in the server logs? The reason I am asking is that it appears that DWR is not using the signature you specified. If not you will see a message that indicated DWR is assuming a Map containing a String key and a String value. I also noticed your method is static. What creator are you using?
On Wed, Jun 24, 2009 at 11:34 AM, Rio Liu <rioliu@...> wrote:
- public static void removeError(Map<String, Boolean> errorMap) {
- if(errorMap == null)
- return;
- Iterator<Entry<String, Boolean>> it = errorMap.entrySet().iterator();
- while(it.hasNext()) {
- Entry<String, Boolean> entry = it.next();
- if(entry.getValue()) { //error here
- // do something
- }
- }
- }
On Thu, Jun 25, 2009 at 1:31 AM, Jose Noheda <jose.noheda@...> wrote:
What's the Java counterpart?
On Wed, Jun 24, 2009 at 7:29 PM, Rio Liu <rioliu@...> wrote:
It is very simple js object {2009625010703182:true}
On Thu, Jun 25, 2009 at 1:14 AM, David Marginian <david@...> wrote:
I meant send us the JavaScript object you are building, not the request.
On Wed, Jun 24, 2009 at 11:11 AM, Rio Liu <rioliu@...> wrote:
callCount=1 windowName= c0-scriptName=TestClass c0-methodName=removeError
c0-id=0 c0-e1=boolean:true c0-param0=Object_Object:{20090625010703185:reference:c0-e1} batchId=11 This is the content of the request, I have checked my dwr.xml , I think it's OK, for this case, I don't need to add a converter for it. java.lang.* are imported by default.
Thanks Rio
On Thu, Jun 25, 2009 at 12:20 AM, David Marginian <david@...> wrote:
Have you checked the server log? Are you sure that your dwr configuration is correct (you only posted a snippet)? What does the JavaScript object you are passing the remote method look like?
On Wed, Jun 24, 2009 at 10:12 AM, Rio Liu <rioliu@...> wrote:
Hi guys
I hava a problem. I have a signature config like <![CDATA[ import java.util.List;
import java.util.Map; import com.test.TestClass; TestClass.removeError(Map<String, Boolean>); ]]>
but I always got a Java.lang.String classcastexception cannot be conveted to Java.lang.Boolean
Who can help me ?
Thanks very much
Rio
|

|
Re: Java.lang.String ClassCastException
Let us know the results please.
On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu <rioliu@...> wrote:
OK, I'll keep investigating by your comments. thx
On Thu, Jun 25, 2009 at 2:41 AM, David Marginian <david@...> wrote:
I would be surprised if this is not working. If I were you I would ensure that you changed the deployed file and restarted your container. I would double check everything and take a look at the server logs (internal dwr errors shoudl be logged without the filter).
On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu <rioliu@...> wrote:
Oh, yes, now I corrected it. but got the same result from server.
On Thu, Jun 25, 2009 at 2:34 AM, David Marginian <david@...> wrote:
You have the incorrect path to TestClass in your signature (which is why I originally told you to send us your configuration, but you insisted it was correct - this would have saved us a lot of time).
In your signature:
import org.rio.test.bean.TestClass;
In your creator:
org.rio.test.TestClass
Your signature should read org.rio.test.TestClass
-David
On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu <rioliu@...> wrote:
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr//dwr30.dtd">
<dwr> <allow> <create creator="new" javascript="TestManager"> <param name="class" value="org.rio.test.TestManager"/> </create>
<create creator="new" javascript="TestClass"> <param name="class" value="org.rio.test.TestClass"/> </create> <convert converter="exception" match="java.lang.Exception"/>
<convert converter="bean" match="org.rio.test.bean.Message"/> <convert converter="bean" match="org.rio.test.bean.Note"/> </allow> <signatures>
<![CDATA[ import java.util.List; import java.util.Map;
import org.rio.test.bean.TestClass;
TestClass.removeError(Map<String, Boolean>); ]]>
</signatures> </dwr>
On Thu, Jun 25, 2009 at 2:06 AM, David Marginian <david@...> wrote:
Sending us your dwr.xml would help us ensure you have everything set-up correctly.
On Wed, Jun 24, 2009 at 12:05 PM, David Marginian <david@...> wrote:
What version of dwr are you using? Pre 3.x the AuditLogAjaxFilter does not exist.
On Wed, Jun 24, 2009 at 11:59 AM, Rio Liu <rioliu@...> wrote:
I try to user <filter class="org.directwebremoting.filter.AuditLogAjaxFilter"/> under allow tag to trace the log, but I got a NPE :(, It doesn't work for me. and my creator="new".
On Thu, Jun 25, 2009 at 1:42 AM, David Marginian <david@...> wrote:
Do you see anything in the server logs? The reason I am asking is that it appears that DWR is not using the signature you specified. If not you will see a message that indicated DWR is assuming a Map containing a String key and a String value. I also noticed your method is static. What creator are you using?
On Wed, Jun 24, 2009 at 11:34 AM, Rio Liu <rioliu@...> wrote:
- public static void removeError(Map<String, Boolean> errorMap) {
- if(errorMap == null)
- return;
- Iterator<Entry<String, Boolean>> it = errorMap.entrySet().iterator();
- while(it.hasNext()) {
- Entry<String, Boolean> entry = it.next();
- if(entry.getValue()) { //error here
- // do something
- }
- }
- }
On Thu, Jun 25, 2009 at 1:31 AM, Jose Noheda <jose.noheda@...> wrote:
What's the Java counterpart?
On Wed, Jun 24, 2009 at 7:29 PM, Rio Liu <rioliu@...> wrote:
It is very simple js object {2009625010703182:true}
On Thu, Jun 25, 2009 at 1:14 AM, David Marginian <david@...> wrote:
I meant send us the JavaScript object you are building, not the request.
On Wed, Jun 24, 2009 at 11:11 AM, Rio Liu <rioliu@...> wrote:
callCount=1 windowName= c0-scriptName=TestClass c0-methodName=removeError
c0-id=0 c0-e1=boolean:true c0-param0=Object_Object:{20090625010703185:reference:c0-e1} batchId=11 This is the content of the request, I have checked my dwr.xml , I think it's OK, for this case, I don't need to add a converter for it. java.lang.* are imported by default.
Thanks Rio
On Thu, Jun 25, 2009 at 12:20 AM, David Marginian <david@...> wrote:
Have you checked the server log? Are you sure that your dwr configuration is correct (you only posted a snippet)? What does the JavaScript object you are passing the remote method look like?
On Wed, Jun 24, 2009 at 10:12 AM, Rio Liu <rioliu@...> wrote:
Hi guys
I hava a problem. I have a signature config like <![CDATA[ import java.util.List;
import java.util.Map; import com.test.TestClass; TestClass.removeError(Map<String, Boolean>); ]]>
but I always got a Java.lang.String classcastexception cannot be conveted to Java.lang.Boolean
Who can help me ?
Thanks very much
Rio
|

|
Re: Java.lang.String ClassCastException
Hi I tried another way like <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
<dwr> <allow> <create creator="new" javascript="TestManager"> <param name="class" value="org.rio.test.
TestManager"/> </create>
<create creator="new" javascript="TestClass"> <param name="class" value="org.rio.test.TestClass"/> </create> <convert converter="exception" match="java.lang.Exception"/>
<convert converter="bean" match="org.rio.test.bean.Message"/> <convert converter="bean" match="org.rio.test.bean.Note"/> <convert converter="bean" match="org.rio.test.bean.Criterion"/>
</allow> <signatures>
<![CDATA[ import java.util.List; import java.util.Map;
import org.rio.test.TestClass;
import org.rio.test.TestManager;
import org.rio.test.bean.Criterion; TestManager.search(List<Criterion>);
TestClass.removeError(Map<String, Boolean>); ]]>
</signatures> </dwr>
added a TestManager.search(List<Criterion>); , this guy works well. On Thu, Jun 25, 2009 at 3:50 AM, David Marginian <david@...> wrote:
Let us know the results please.
On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu <rioliu@...> wrote:
OK, I'll keep investigating by your comments. thx
On Thu, Jun 25, 2009 at 2:41 AM, David Marginian <david@...> wrote:
I would be surprised if this is not working. If I were you I would ensure that you changed the deployed file and restarted your container. I would double check everything and take a look at the server logs (internal dwr errors shoudl be logged without the filter).
On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu <rioliu@...> wrote:
Oh, yes, now I corrected it. but got the same result from server.
On Thu, Jun 25, 2009 at 2:34 AM, David Marginian <david@...> wrote:
You have the incorrect path to TestClass in your signature (which is why I originally told you to send us your configuration, but you insisted it was correct - this would have saved us a lot of time).
In your signature:
import org.rio.test.bean.TestClass;
In your creator:
org.rio.test.TestClass
Your signature should read org.rio.test.TestClass
-David
On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu <rioliu@...> wrote:
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr//dwr30.dtd">
<dwr> <allow> <create creator="new" javascript="TestManager"> <param name="class" value="org.rio.test.TestManager"/> </create>
<create creator="new" javascript="TestClass"> <param name="class" value="org.rio.test.TestClass"/> </create> <convert converter="exception" match="java.lang.Exception"/>
<convert converter="bean" match="org.rio.test.bean.Message"/> <convert converter="bean" match="org.rio.test.bean.Note"/> </allow>
<signatures>
<![CDATA[ import java.util.List; import java.util.Map;
import org.rio.test.bean.TestClass;
TestClass.removeError(Map<String, Boolean>); ]]>
</signatures> </dwr>
On Thu, Jun 25, 2009 at 2:06 AM, David Marginian <david@...> wrote:
Sending us your dwr.xml would help us ensure you have everything set-up correctly.
On Wed, Jun 24, 2009 at 12:05 PM, David Marginian <david@...> wrote:
What version of dwr are you using? Pre 3.x the AuditLogAjaxFilter does not exist.
On Wed, Jun 24, 2009 at 11:59 AM, Rio Liu <rioliu@...> wrote:
I try to user <filter class="org.directwebremoting.filter.AuditLogAjaxFilter"/> under allow tag to trace the log, but I got a NPE :(, It doesn't work for me. and my creator="new".
On Thu, Jun 25, 2009 at 1:42 AM, David Marginian <david@...> wrote:
Do you see anything in the server logs? The reason I am asking is that it appears that DWR is not using the signature you specified. If not you will see a message that indicated DWR is assuming a Map containing a String key and a String value. I also noticed your method is static. What creator are you using?
On Wed, Jun 24, 2009 at 11:34 AM, Rio Liu <rioliu@...> wrote:
- public static void removeError(Map<String, Boolean> errorMap) {
- if(errorMap == null)
- return;
- Iterator<Entry<String, Boolean>> it = errorMap.entrySet().iterator();
- while(it.hasNext()) {
- Entry<String, Boolean> entry = it.next();
- if(entry.getValue()) { //error here
- // do something
- }
- }
- }
On Thu, Jun 25, 2009 at 1:31 AM, Jose Noheda <jose.noheda@...> wrote:
What's the Java counterpart?
On Wed, Jun 24, 2009 at 7:29 PM, Rio Liu <rioliu@...> wrote:
It is very simple js object {2009625010703182:true}
On Thu, Jun 25, 2009 at 1:14 AM, David Marginian <david@...> wrote:
I meant send us the JavaScript object you are building, not the request.
On Wed, Jun 24, 2009 at 11:11 AM, Rio Liu <rioliu@...> wrote:
callCount=1 windowName= c0-scriptName=TestClass c0-methodName=removeError
c0-id=0 c0-e1=boolean:true c0-param0=Object_Object:{20090625010703185:reference:c0-e1} batchId=11 This is the content of the request, I have checked my dwr.xml , I think it's OK, for this case, I don't need to add a converter for it. java.lang.* are imported by default.
Thanks Rio
On Thu, Jun 25, 2009 at 12:20 AM, David Marginian <david@...> wrote:
Have you checked the server log? Are you sure that your dwr configuration is correct (you only posted a snippet)? What does the JavaScript object you are passing the remote method look like?
On Wed, Jun 24, 2009 at 10:12 AM, Rio Liu <rioliu@...> wrote:
Hi guys
I hava a problem. I have a signature config like <![CDATA[ import java.util.List;
import java.util.Map; import com.test.TestClass; TestClass.removeError(Map<String, Boolean>); ]]>
but I always got a Java.lang.String classcastexception cannot be conveted to Java.lang.Boolean
Who can help me ?
Thanks very much
Rio
|

|
Re: Java.lang.String ClassCastException
Found this ref http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu <rioliu@...> wrote:
Hi I tried another way like
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
<dwr> <allow> <create creator="new" javascript="TestManager"> <param name="class" value="org.rio.test.
TestManager"/> </create>
<create creator="new" javascript="TestClass"> <param name="class" value="org.rio.test.TestClass"/> </create> <convert converter="exception" match="java.lang.Exception"/>
<convert converter="bean" match="org.rio.test.bean.Message"/> <convert converter="bean" match="org.rio.test.bean.Note"/> <convert converter="bean" match="org.rio.test.bean.Criterion"/>
</allow> <signatures>
<![CDATA[ import java.util.List; import java.util.Map;
import org.rio.test.TestClass;
import org.rio.test.TestManager;
import org.rio.test.bean.Criterion; TestManager.search(List<Criterion>);
TestClass.removeError(Map<String, Boolean>); ]]>
</signatures> </dwr>
added a TestManager.search(List<Criterion>); , this guy works well.
On Thu, Jun 25, 2009 at 3:50 AM, David Marginian <david@...> wrote:
Let us know the results please.
On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu <rioliu@...> wrote:
OK, I'll keep investigating by your comments. thx
On Thu, Jun 25, 2009 at 2:41 AM, David Marginian <david@...> wrote:
I would be surprised if this is not working. If I were you I would ensure that you changed the deployed file and restarted your container. I would double check everything and take a look at the server logs (internal dwr errors shoudl be logged without the filter).
On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu <rioliu@...> wrote:
Oh, yes, now I corrected it. but got the same result from server.
On Thu, Jun 25, 2009 at 2:34 AM, David Marginian <david@...> wrote:
You have the incorrect path to TestClass in your signature (which is why I originally told you to send us your configuration, but you insisted it was correct - this would have saved us a lot of time).
In your signature:
import org.rio.test.bean.TestClass;
In your creator:
org.rio.test.TestClass
Your signature should read org.rio.test.TestClass
-David
On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu <rioliu@...> wrote:
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr//dwr30.dtd">
<dwr> <allow> <create creator="new" javascript="TestManager"> <param name="class" value="org.rio.test.TestManager"/> </create>
<create creator="new" javascript="TestClass"> <param name="class" value="org.rio.test.TestClass"/> </create> <convert converter="exception" match="java.lang.Exception"/>
<convert converter="bean" match="org.rio.test.bean.Message"/> <convert converter="bean" match="org.rio.test.bean.Note"/> </allow>
<signatures>
<![CDATA[ import java.util.List; import java.util.Map;
import org.rio.test.bean.TestClass;
TestClass.removeError(Map<String, Boolean>); ]]>
</signatures> </dwr>
On Thu, Jun 25, 2009 at 2:06 AM, David Marginian <david@...> wrote:
Sending us your dwr.xml would help us ensure you have everything set-up correctly.
On Wed, Jun 24, 2009 at 12:05 PM, David Marginian <david@...> wrote:
What version of dwr are you using? Pre 3.x the AuditLogAjaxFilter does not exist.
On Wed, Jun 24, 2009 at 11:59 AM, Rio Liu <rioliu@...> wrote:
I try to user <filter class="org.directwebremoting.filter.AuditLogAjaxFilter"/> under allow tag to trace the log, but I got a NPE :(, It doesn't work for me. and my creator="new".
On Thu, Jun 25, 2009 at 1:42 AM, David Marginian <david@...> wrote:
Do you see anything in the server logs? The reason I am asking is that it appears that DWR is not using the signature you specified. If not you will see a message that indicated DWR is assuming a Map containing a String key and a String value. I also noticed your method is static. What creator are you using?
On Wed, Jun 24, 2009 at 11:34 AM, Rio Liu <rioliu@...> wrote:
- public static void removeError(Map<String, Boolean> errorMap) {
- if(errorMap == null)
- return;
- Iterator<Entry<String, Boolean>> it = errorMap.entrySet().iterator();
- while(it.hasNext()) {
- Entry<String, Boolean> entry = it.next();
- if(entry.getValue()) { //error here
- // do something
- }
- }
- }
On Thu, Jun 25, 2009 at 1:31 AM, Jose Noheda <jose.noheda@...> wrote:
What's the Java counterpart?
On Wed, Jun 24, 2009 at 7:29 PM, Rio Liu <rioliu@...> wrote:
It is very simple js object {2009625010703182:true}
On Thu, Jun 25, 2009 at 1:14 AM, David Marginian <david@...> wrote:
I meant send us the JavaScript object you are building, not the request.
On Wed, Jun 24, 2009 at 11:11 AM, Rio Liu <rioliu@...> wrote:
callCount=1 windowName= c0-scriptName=TestClass c0-methodName=removeError
c0-id=0 c0-e1=boolean:true c0-param0=Object_Object:{20090625010703185:reference:c0-e1} batchId=11 This is the content of the request, I have checked my dwr.xml , I think it's OK, for this case, I don't need to add a converter for it. java.lang.* are imported by default.
Thanks Rio
On Thu, Jun 25, 2009 at 12:20 AM, David Marginian <david@...> wrote:
Have you checked the server log? Are you sure that your dwr configuration is correct (you only posted a snippet)? What does the JavaScript object you are passing the remote method look like?
On Wed, Jun 24, 2009 at 10:12 AM, Rio Liu <rioliu@...> wrote:
Hi guys
I hava a problem. I have a signature config like <![CDATA[ import java.util.List;
import java.util.Map; import com.test.TestClass; TestClass.removeError(Map<String, Boolean>); ]]>
but I always got a Java.lang.String classcastexception cannot be conveted to Java.lang.Boolean
Who can help me ?
Thanks very much
Rio
|

|
Re: Java.lang.String ClassCastException
I don't see how this is related to your issue. You are passing a type -
Boolean. This thread is someone trying to pass Object.
Rio Liu wrote:
> Found this ref
> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html>
> On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu < rioliu@...
> <mailto: rioliu@...>> wrote:
>
> Hi I tried another way like
> <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting
> 3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new" javascript="TestManager">
> <param name="class" value="org.rio.test.
>
> TestManager"/>
> </create>
> <create creator="new" javascript="TestClass">
> <param name="class" value="org.rio.test.TestClass"/>
> </create>
>
> <convert converter="exception" match="java.lang.Exception"/>
> <convert converter="bean"
> match="org.rio.test.bean.Message"/>
> <convert converter="bean" match="org.rio.test.bean.Note"/>
>
> <convert converter="bean"
> match="org.rio.test.bean.Criterion"/>
>
>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import org.rio.test.TestClass;
> import org.rio.test.TestManager;
>
> import org.rio.test.bean.Criterion;
> TestManager.search(List<Criterion>);
>
> TestClass.removeError(Map<String, Boolean>);
> ]]>
> </signatures>
> </dwr>
>
> added a TestManager.search(List<Criterion>); , this guy works well.
>
> On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
> < david@... <mailto: david@...>> wrote:
>
> Let us know the results please.
>
> On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu < rioliu@...
> <mailto: rioliu@...>> wrote:
>
> OK, I'll keep investigating by your comments. thx
>
>
> On Thu, Jun 25, 2009 at 2:41 AM, David Marginian
> < david@... <mailto: david@...>> wrote:
>
> I would be surprised if this is not working. If I
> were you I would ensure that you changed the deployed
> file and restarted your container. I would double
> check everything and take a look at the server logs
> (internal dwr errors shoudl be logged without the
> filter).
>
>
> On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
> < rioliu@... <mailto: rioliu@...>> wrote:
>
> Oh, yes, now I corrected it. but got the same
> result from server.
>
>
> On Thu, Jun 25, 2009 at 2:34 AM, David Marginian
> < david@... <mailto: david@...>>
> wrote:
>
> You have the incorrect path to TestClass in
> your signature (which is why I originally told
> you to send us your configuration, but you
> insisted it was correct - this would have
> saved us a lot of time).
>
> In your signature:
> import org.rio.test.bean.TestClass;
> In your creator:
> org.rio.test.TestClass
>
> Your signature should read org.rio.test.TestClass
>
> -David
>
>
> On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu
> < rioliu@... <mailto: rioliu@...>>
> wrote:
>
> <!DOCTYPE dwr PUBLIC "-//GetAhead
> Limited//DTD Direct Web Remoting 3.0//EN"
> " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new"
> javascript="TestManager">
> <param name="class"
> value="org.rio.test.TestManager"/>
> </create>
> <create creator="new"
> javascript="TestClass">
> <param name="class"
> value="org.rio.test.TestClass"/>
> </create>
>
> <convert converter="exception"
> match="java.lang.Exception"/>
> <convert converter="bean"
> match="org.rio.test.bean.Message"/>
> <convert converter="bean"
> match="org.rio.test.bean.Note"/>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import org.rio.test.bean.TestClass;
>
> TestClass.removeError(Map<String,
> Boolean>);
> ]]>
> </signatures>
> </dwr>
>
>
> On Thu, Jun 25, 2009 at 2:06 AM, David
> Marginian < david@...
> <mailto: david@...>> wrote:
>
> Sending us your dwr.xml would help us
> ensure you have everything set-up
> correctly.
>
> On Wed, Jun 24, 2009 at 12:05 PM,
> David Marginian < david@...
> <mailto: david@...>> wrote:
>
> What version of dwr are you
> using? Pre 3.x the
> AuditLogAjaxFilter does not exist.
>
>
> On Wed, Jun 24, 2009 at 11:59 AM,
> Rio Liu < rioliu@...
> <mailto: rioliu@...>> wrote:
>
> I try to user <filter
> class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
> under allow tag to trace the
> log, but I got a NPE :(, It
> doesn't work for me. and my
> creator="new".
>
>
> On Thu, Jun 25, 2009 at 1:42
> AM, David Marginian
> < david@...
> <mailto: david@...>>
> wrote:
>
> Do you see anything in the
> server logs? The reason I
> am asking is that it
> appears that DWR is not
> using the signature you
> specified. If not you
> will see a message that
> indicated DWR is assuming
> a Map containing a String
> key and a String value. I
> also noticed your method
> is static. What creator
> are you using?
>
>
> On Wed, Jun 24, 2009 at
> 11:34 AM, Rio Liu
> < rioliu@...
> <mailto: rioliu@...>>
> wrote:
>
> 1. public static void removeError(Map<String, Boolean> errorMap) {
> 2. if(errorMap == null)
> 3. return;
> 4. Iterator<Entry<String, Boolean>> it = errorMap.entrySet().iterator();
> 5. while(it.hasNext()) {
> 6. Entry<String, Boolean> entry = it.next();
> 7. if(entry.getValue()) {
> //error here
> 8. // do something
> 9. }
> 10. }
> 11. }
>
>
>
> On Thu, Jun 25, 2009
> at 1:31 AM, Jose
> Noheda
> < jose.noheda@...
> <mailto: jose.noheda@...>>
> wrote:
>
> What's the Java
> counterpart?
>
>
> On Wed, Jun 24,
> 2009 at 7:29 PM,
> Rio Liu
> < rioliu@...
> <mailto: rioliu@...>>
> wrote:
>
> It is very
> simple js
> object
> {2009625010703182:true}
>
>
> On Thu, Jun
> 25, 2009 at
> 1:14 AM, David
> Marginian
> < david@...
> <mailto: david@...>>
> wrote:
>
> I meant
> send us
> the
> JavaScript
> object you
> are
> building,
> not the
> request.
>
>
> On Wed,
> Jun 24,
> 2009 at
> 11:11 AM,
> Rio Liu
> < rioliu@...
> <mailto: rioliu@...>>
> wrote:
>
> callCount=1
> windowName=
> c0-scriptName=TestClass
> c0-methodName=removeError
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> c0-id=0
> c0-e1=boolean:true
> c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
> batchId=11
>
> This
> is the
> content
> of the
> request,
> I have
> checked
> my
> dwr.xml
> , I
> think
> it's
> OK,
> for
> this
> case,
> I
> don't
> need
> to add
> a
> converter
> for
> it.
> java.lang.*
> are
> imported
> by
> default.
>
> Thanks
> Rio
>
>
> On
> Thu,
> Jun
> 25,
> 2009
> at
> 12:20
> AM,
> David
> Marginian
> < david@...
> <mailto: david@...>>
> wrote:
>
> Have
> you
> checked
> the
> server
> log?
> Are
> you
> sure
> that
> your
> dwr
> configuration
> is
> correct
> (you
> only
> posted
> a
> snippet)?
> What
> does
> the
> JavaScript
> object
> you
> are
> passing
> the
> remote
> method
> look
> like?
>
>
> On
> Wed,
> Jun
> 24,
> 2009
> at
> 10:12
> AM,
> Rio
> Liu
> < rioliu@...
> <mailto: rioliu@...>>
> wrote:
>
> Hi
> guys
>
> I
> hava
> a
> problem.
> I
> have
> a
> signature
> config
> like
>
> <![CDATA[
>
>
> import
> java.util.List;
>
>
> import
> java.util.Map;
>
> import
> com.test.TestClass;
>
>
> TestClass.removeError(Map<String,
> Boolean>);
>
> ]]>
>
> but
> I
> always
> got
> a
> Java.lang.String
> classcastexception
> cannot
> be
> conveted
> to
> Java.lang.Boolean
> Who
> can
> help
> me
> ?
>
> Thanks
> very
> much
>
> Rio
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
But try using a primitive boolean. I am curious.
David Marginian wrote:
> I don't see how this is related to your issue. You are passing a type
> - Boolean. This thread is someone trying to pass Object.
>
> Rio Liu wrote:
>> Found this ref
>> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
>>
>>
>> On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu < rioliu@...
>> <mailto: rioliu@...>> wrote:
>>
>> Hi I tried another way like
>> <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting
>> 3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
>> <dwr>
>> <allow>
>> <create creator="new" javascript="TestManager">
>> <param name="class" value="org.rio.test.
>>
>> TestManager"/>
>> </create>
>> <create creator="new" javascript="TestClass">
>> <param name="class" value="org.rio.test.TestClass"/>
>> </create>
>> <convert converter="exception"
>> match="java.lang.Exception"/>
>> <convert converter="bean"
>> match="org.rio.test.bean.Message"/>
>> <convert converter="bean" match="org.rio.test.bean.Note"/>
>>
>> <convert converter="bean"
>> match="org.rio.test.bean.Criterion"/>
>>
>>
>> </allow>
>> <signatures>
>>
>> <![CDATA[
>> import java.util.List;
>> import java.util.Map;
>> import org.rio.test.TestClass;
>> import org.rio.test.TestManager;
>>
>> import org.rio.test.bean.Criterion;
>> TestManager.search(List<Criterion>);
>>
>> TestClass.removeError(Map<String, Boolean>);
>> ]]>
>> </signatures>
>> </dwr>
>> added a TestManager.search(List<Criterion>); , this guy works well.
>>
>> On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
>> < david@... <mailto: david@...>> wrote:
>>
>> Let us know the results please.
>> On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu < rioliu@...
>> <mailto: rioliu@...>> wrote:
>>
>> OK, I'll keep investigating by your comments. thx
>>
>>
>> On Thu, Jun 25, 2009 at 2:41 AM, David Marginian
>> < david@... <mailto: david@...>> wrote:
>>
>> I would be surprised if this is not working. If I
>> were you I would ensure that you changed the deployed
>> file and restarted your container. I would double
>> check everything and take a look at the server logs
>> (internal dwr errors shoudl be logged without the
>> filter).
>>
>>
>> On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
>> < rioliu@... <mailto: rioliu@...>> wrote:
>>
>> Oh, yes, now I corrected it. but got the same
>> result from server.
>>
>>
>> On Thu, Jun 25, 2009 at 2:34 AM, David Marginian
>> < david@... <mailto: david@...>>
>> wrote:
>>
>> You have the incorrect path to TestClass in
>> your signature (which is why I originally told
>> you to send us your configuration, but you
>> insisted it was correct - this would have
>> saved us a lot of time).
>> In your signature:
>> import org.rio.test.bean.TestClass;
>> In your creator:
>> org.rio.test.TestClass
>> Your signature
>> should read org.rio.test.TestClass
>> -David
>>
>>
>> On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu
>> < rioliu@... <mailto: rioliu@...>>
>> wrote:
>>
>> <!DOCTYPE dwr PUBLIC "-//GetAhead
>> Limited//DTD Direct Web Remoting 3.0//EN"
>> " http://getahead.org/dwr//dwr30.dtd">
>> <dwr>
>> <allow>
>> <create creator="new"
>> javascript="TestManager">
>> <param name="class"
>> value="org.rio.test.TestManager"/>
>> </create>
>> <create creator="new"
>> javascript="TestClass">
>> <param name="class"
>> value="org.rio.test.TestClass"/>
>> </create>
>>
>> <convert converter="exception"
>> match="java.lang.Exception"/>
>> <convert converter="bean"
>> match="org.rio.test.bean.Message"/>
>> <convert converter="bean"
>> match="org.rio.test.bean.Note"/>
>> </allow>
>> <signatures>
>>
>> <![CDATA[
>> import java.util.List;
>> import java.util.Map;
>> import org.rio.test.bean.TestClass;
>>
>> TestClass.removeError(Map<String,
>> Boolean>);
>> ]]>
>> </signatures>
>> </dwr>
>>
>>
>> On Thu, Jun 25, 2009 at 2:06 AM, David
>> Marginian < david@...
>> <mailto: david@...>> wrote:
>>
>> Sending us your dwr.xml would help us
>> ensure you have everything set-up
>> correctly.
>> On Wed, Jun 24, 2009 at 12:05 PM,
>> David Marginian < david@...
>> <mailto: david@...>> wrote:
>>
>> What version of dwr are you
>> using? Pre 3.x the
>> AuditLogAjaxFilter does not exist.
>>
>> On Wed, Jun 24, 2009 at 11:59 AM,
>> Rio Liu < rioliu@...
>> <mailto: rioliu@...>> wrote:
>>
>> I try to user <filter
>>
>> class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
>> under allow tag to trace the
>> log, but I got a NPE :(, It
>> doesn't work for me. and my
>> creator="new".
>>
>>
>> On Thu, Jun 25, 2009 at 1:42
>> AM, David Marginian
>> < david@...
>> <mailto: david@...>>
>> wrote:
>>
>> Do you see anything in the
>> server logs? The reason I
>> am asking is that it
>> appears that DWR is not
>> using the signature you
>> specified. If not you
>> will see a message that
>> indicated DWR is assuming
>> a Map containing a String
>> key and a String value. I
>> also noticed your method
>> is static. What creator
>> are you using?
>>
>>
>> On Wed, Jun 24, 2009 at
>> 11:34 AM, Rio Liu
>> < rioliu@...
>> <mailto: rioliu@...>>
>> wrote:
>>
>> 1. public static
>> void removeError(Map<String, Boolean> errorMap) {
>> 2. if(errorMap
>> == null) 3.
>> return; 4.
>> Iterator<Entry<String, Boolean>> it =
>> errorMap.entrySet().iterator();
>> 5.
>> while(it.hasNext()) {
>> 6.
>> Entry<String, Boolean> entry = it.next();
>> 7.
>> if(entry.getValue()) {
>> //error here
>> 8. // do
>> something
>> 9. } 10.
>> } 11. }
>>
>>
>> On Thu, Jun 25, 2009
>> at 1:31 AM, Jose
>> Noheda
>> < jose.noheda@...
>>
>> <mailto: jose.noheda@...>>
>> wrote:
>>
>> What's the Java
>> counterpart?
>>
>>
>> On Wed, Jun 24,
>> 2009 at 7:29 PM,
>> Rio Liu
>> < rioliu@...
>>
>> <mailto: rioliu@...>>
>> wrote:
>>
>> It is very
>> simple js
>> object
>>
>> {2009625010703182:true}
>>
>>
>> On Thu, Jun
>> 25, 2009 at
>> 1:14 AM, David
>> Marginian
>>
>> < david@...
>>
>> <mailto: david@...>>
>> wrote:
>>
>> I meant
>> send us
>> the
>> JavaScript
>> object you
>> are
>> building,
>> not the
>> request.
>>
>>
>> On Wed,
>> Jun 24,
>> 2009 at
>> 11:11 AM,
>> Rio Liu
>>
>> < rioliu@...
>>
>> <mailto: rioliu@...>>
>> wrote:
>>
>>
>> callCount=1
>>
>> windowName=
>>
>> c0-scriptName=TestClass
>>
>> c0-methodName=removeError
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> c0-id=0
>>
>> c0-e1=boolean:true
>>
>> c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
>>
>> batchId=11
>>
>> This
>> is the
>> content
>> of the
>> request,
>> I have
>> checked
>> my
>> dwr.xml
>> , I
>> think
>> it's
>> OK,
>> for
>> this
>> case,
>> I
>> don't
>> need
>> to add
>> a
>>
>> converter
>> for
>> it.
>>
>> java.lang.*
>> are
>> imported
>> by
>> default.
>>
>> Thanks
>> Rio
>>
>>
>> On
>> Thu,
>> Jun
>> 25,
>> 2009
>> at
>> 12:20
>> AM,
>> David
>>
>> Marginian
>>
>> < david@...
>>
>> <mailto: david@...>>
>> wrote:
>>
>> Have
>> you
>>
>> checked
>> the
>>
>> server
>>
>> log?
>> Are
>> you
>> sure
>> that
>> your
>> dwr
>>
>> configuration
>> is
>>
>> correct
>> (you
>> only
>>
>> posted
>> a
>>
>> snippet)?
>> What
>> does
>> the
>>
>> JavaScript
>>
>> object
>> you
>> are
>>
>> passing
>> the
>>
>> remote
>>
>> method
>> look
>>
>> like?
>>
>>
>> On
>> Wed,
>> Jun
>> 24,
>> 2009
>> at
>>
>> 10:12
>> AM,
>> Rio
>> Liu
>>
>> < rioliu@...
>>
>> <mailto: rioliu@...>>
>>
>> wrote:
>>
>>
>> Hi
>>
>> guys
>>
>>
>> I
>>
>> hava
>>
>> a
>>
>> problem.
>>
>> I
>>
>> have
>>
>> a
>>
>> signature
>>
>> config
>>
>> like
>>
>>
>> <![CDATA[
>>
>>
>>
>> import
>>
>> java.util.List;
>>
>>
>>
>> import
>>
>> java.util.Map;
>>
>>
>> import
>>
>> com.test.TestClass;
>>
>>
>>
>> TestClass.removeError(Map<String,
>>
>> Boolean>);
>>
>>
>> ]]>
>>
>>
>> but
>>
>> I
>>
>> always
>>
>> got
>>
>> a
>>
>> Java.lang.String
>>
>> classcastexception
>>
>> cannot
>>
>> be
>>
>> conveted
>>
>> to
>>
>> Java.lang.Boolean
>>
>> Who
>>
>> can
>>
>> help
>>
>> me
>>
>> ?
>>
>>
>> Thanks
>>
>> very
>>
>> much
>>
>>
>> Rio
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
I think I should resolve the log trace issue first, it would be helpful On Thu, Jun 25, 2009 at 9:05 AM, David Marginian <david@...> wrote:
I don't see how this is related to your issue. You are passing a type - Boolean. This thread is someone trying to pass Object.
Rio Liu wrote:
On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu < rioliu@... <mailto: rioliu@...>> wrote:
Hi I tried another way like
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting
3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
<dwr>
<allow>
<create creator="new" javascript="TestManager">
<param name="class" value="org.rio.test.
TestManager"/>
</create>
<create creator="new" javascript="TestClass">
<param name="class" value="org.rio.test.TestClass"/>
</create>
<convert converter="exception" match="java.lang.Exception"/>
<convert converter="bean"
match="org.rio.test.bean.Message"/>
<convert converter="bean" match="org.rio.test.bean.Note"/>
<convert converter="bean"
match="org.rio.test.bean.Criterion"/>
</allow>
<signatures>
<![CDATA[
import java.util.List;
import java.util.Map;
import org.rio.test.TestClass;
import org.rio.test.TestManager;
import org.rio.test.bean.Criterion;
TestManager.search(List<Criterion>);
TestClass.removeError(Map<String, Boolean>);
]]>
</signatures>
</dwr>
added a TestManager.search(List<Criterion>); , this guy works well.
On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
<mailto: rioliu@...>> wrote:
OK, I'll keep investigating by your comments. thx
On Thu, Jun 25, 2009 at 2:41 AM, David Marginian
< david@... <mailto: david@...>> wrote:
I would be surprised if this is not working. If I
were you I would ensure that you changed the deployed
file and restarted your container. I would double
check everything and take a look at the server logs
(internal dwr errors shoudl be logged without the
filter).
On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
< rioliu@... <mailto: rioliu@...>> wrote:
Oh, yes, now I corrected it. but got the same
result from server.
On Thu, Jun 25, 2009 at 2:34 AM, David Marginian
<david@... <mailto:david@...>>
wrote:
You have the incorrect path to TestClass in
your signature (which is why I originally told
you to send us your configuration, but you
insisted it was correct - this would have
saved us a lot of time).
In your signature:
import org.rio.test.bean.TestClass;
In your creator:
org.rio.test.TestClass
Your signature should read org.rio.test.TestClass
-David
On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu
<rioliu@... <mailto:rioliu@...>>
wrote:
<!DOCTYPE dwr PUBLIC "-//GetAhead
Limited//DTD Direct Web Remoting 3.0//EN"
" http://getahead.org/dwr//dwr30.dtd">
<dwr>
<allow>
<create creator="new"
javascript="TestManager">
<param name="class"
value="org.rio.test.TestManager"/>
</create>
<create creator="new"
javascript="TestClass">
<param name="class"
value="org.rio.test.TestClass"/>
</create>
<convert converter="exception"
match="java.lang.Exception"/>
<convert converter="bean"
match="org.rio.test.bean.Message"/>
<convert converter="bean"
match="org.rio.test.bean.Note"/>
</allow>
<signatures>
<![CDATA[
import java.util.List;
import java.util.Map;
import org.rio.test.bean.TestClass;
TestClass.removeError(Map<String,
Boolean>);
]]>
</signatures>
</dwr>
On Thu, Jun 25, 2009 at 2:06 AM, David
Marginian < david@...
<mailto: david@...>> wrote:
Sending us your dwr.xml would help us
ensure you have everything set-up
correctly.
On Wed, Jun 24, 2009 at 12:05 PM,
David Marginian < david@...
<mailto: david@...>> wrote:
What version of dwr are you
using? Pre 3.x the
AuditLogAjaxFilter does not exist.
On Wed, Jun 24, 2009 at 11:59 AM,
Rio Liu < rioliu@...
<mailto: rioliu@...>> wrote:
I try to user <filter
class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
under allow tag to trace the
log, but I got a NPE :(, It
doesn't work for me. and my
creator="new".
On Thu, Jun 25, 2009 at 1:42
AM, David Marginian
< david@...
<mailto:david@...>>
wrote:
Do you see anything in the
server logs? The reason I
am asking is that it
appears that DWR is not
using the signature you
specified. If not you
will see a message that
indicated DWR is assuming
a Map containing a String
key and a String value. I
also noticed your method
is static. What creator
are you using?
On Wed, Jun 24, 2009 at
11:34 AM, Rio Liu
< rioliu@...
<mailto:rioliu@...>>
wrote:
1. public static void removeError(Map<String, Boolean> errorMap) { 2. if(errorMap == null) 3. return; 4. Iterator<Entry<String, Boolean>> it = errorMap.entrySet().iterator(); 5. while(it.hasNext()) { 6. Entry<String, Boolean> entry = it.next(); 7. if(entry.getValue()) { //error here
8. // do something 9. } 10. } 11. }
<mailto:jose.noheda@...>>
wrote:
What's the Java
counterpart?
On Wed, Jun 24,
2009 at 7:29 PM,
Rio Liu
< rioliu@...
<mailto:rioliu@...>>
wrote:
It is very
simple js
object
{2009625010703182:true}
On Thu, Jun
25, 2009 at
1:14 AM, David
Marginian
< david@...
<mailto:david@...>>
wrote:
I meant
send us
the
JavaScript
object you
are
building,
not the
request.
On Wed,
Jun 24,
2009 at
11:11 AM,
Rio Liu
< rioliu@...
<mailto:rioliu@...>>
wrote:
callCount=1
windowName=
c0-scriptName=TestClass
c0-methodName=removeError
c0-id=0
c0-e1=boolean:true
c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
batchId=11
This
is the
content
of the
request,
I have
checked
my
dwr.xml
, I
think
it's
OK,
for
this
case,
I
don't
need
to add
a
converter
for
it.
java.lang.*
are
imported
by
default.
Thanks
Rio
On
Thu,
Jun
25,
2009
at
12:20
AM,
David
Marginian
< david@...
<mailto:david@...>>
wrote:
Have
you
checked
the
server
log? Are
you
sure
that
your
dwr
configuration
is
correct
(you
only
posted
a
snippet)? What
does
the
JavaScript
object
you
are
passing
the
remote
method
look
like?
On
Wed,
Jun
24,
2009
at
10:12
AM,
Rio
Liu
< rioliu@...
<mailto:rioliu@...>>
wrote:
Hi
guys
I
hava
a
problem.
I
have
a
signature
config
like
<![CDATA[
import
java.util.List;
import
java.util.Map;
import
com.test.TestClass;
TestClass.removeError(Map<String,
Boolean>);
]]>
but
I
always
got
a
Java.lang.String
classcastexception
cannot
be
conveted
to
Java.lang.Boolean
Who
can
help
me
?
Thanks
very
much
Rio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
Log trace issue? What are you talking about?
Rio Liu wrote:
> I think I should resolve the log trace issue first, it would be helpful
>
> On Thu, Jun 25, 2009 at 9:05 AM, David Marginian < david@...
> <mailto: david@...>> wrote:
>
> I don't see how this is related to your issue. You are passing a
> type - Boolean. This thread is someone trying to pass Object.
>
> Rio Liu wrote:
>
> Found this ref
> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html>
> On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu < rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>> wrote:
>
> Hi I tried another way like
> <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web
> Remoting
> 3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new" javascript="TestManager">
> <param name="class" value="org.rio.test.
>
> TestManager"/>
> </create>
> <create creator="new" javascript="TestClass">
> <param name="class" value="org.rio.test.TestClass"/>
> </create>
> <convert converter="exception"
> match="java.lang.Exception"/>
> <convert converter="bean"
> match="org.rio.test.bean.Message"/>
> <convert converter="bean"
> match="org.rio.test.bean.Note"/>
>
> <convert converter="bean"
> match="org.rio.test.bean.Criterion"/>
>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import org.rio.test.TestClass;
> import org.rio.test.TestManager;
>
> import org.rio.test.bean.Criterion;
> TestManager.search(List<Criterion>);
>
> TestClass.removeError(Map<String, Boolean>);
> ]]>
> </signatures>
> </dwr>
> added a TestManager.search(List<Criterion>); , this guy
> works well.
>
> On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>> wrote:
>
> Let us know the results please.
> On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>> wrote:
>
> OK, I'll keep investigating by your comments. thx
>
>
> On Thu, Jun 25, 2009 at 2:41 AM, David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>> wrote:
>
> I would be surprised if this is not working. If I
> were you I would ensure that you changed the
> deployed
> file and restarted your container. I would double
> check everything and take a look at the server logs
> (internal dwr errors shoudl be logged without the
> filter).
>
>
> On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>> wrote:
>
> Oh, yes, now I corrected it. but got the same
> result from server.
>
>
> On Thu, Jun 25, 2009 at 2:34 AM, David
> Marginian
> < david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>>
>
> wrote:
>
> You have the incorrect path to TestClass in
> your signature (which is why I
> originally told
> you to send us your configuration, but you
> insisted it was correct - this would have
> saved us a lot of time).
> In your signature:
> import org.rio.test.bean.TestClass;
> In your creator:
> org.rio.test.TestClass
> Your signature
> should read org.rio.test.TestClass
> -David
>
>
> On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu
> < rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>>
>
> wrote:
>
> <!DOCTYPE dwr PUBLIC "-//GetAhead
> Limited//DTD Direct Web Remoting
> 3.0//EN"
> " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new"
> javascript="TestManager">
> <param name="class"
> value="org.rio.test.TestManager"/>
> </create>
> <create creator="new"
> javascript="TestClass">
> <param name="class"
> value="org.rio.test.TestClass"/>
> </create>
>
> <convert converter="exception"
> match="java.lang.Exception"/>
> <convert converter="bean"
> match="org.rio.test.bean.Message"/>
> <convert converter="bean"
> match="org.rio.test.bean.Note"/>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import
> org.rio.test.bean.TestClass;
>
>
> TestClass.removeError(Map<String,
> Boolean>);
> ]]>
> </signatures>
> </dwr>
>
>
> On Thu, Jun 25, 2009 at 2:06 AM, David
> Marginian < david@...
> <mailto: david@...>
> <mailto: david@...
> <mailto: david@...>>> wrote:
>
> Sending us your dwr.xml would
> help us
> ensure you have everything set-up
> correctly.
> On Wed, Jun 24, 2009 at 12:05 PM,
> David Marginian
> < david@... <mailto: david@...>
> <mailto: david@...
> <mailto: david@...>>> wrote:
>
> What version of dwr are you
> using? Pre 3.x the
> AuditLogAjaxFilter does not
> exist.
>
> On Wed, Jun 24, 2009 at 11:59 AM,
> Rio Liu < rioliu@...
> <mailto: rioliu@...>
> <mailto: rioliu@...
> <mailto: rioliu@...>>> wrote:
>
> I try to user <filter
>
> class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
> under allow tag to
> trace the
> log, but I got a NPE :(, It
> doesn't work for me. and my
> creator="new".
>
>
> On Thu, Jun 25, 2009 at
> 1:42
> AM, David Marginian
> < david@...
> <mailto: david@...>
>
> <mailto: david@... <mailto: david@...>>>
>
> wrote:
>
> Do you see anything
> in the
> server logs? The
> reason I
> am asking is that it
> appears that DWR is not
> using the signature you
> specified. If not you
> will see a message that
> indicated DWR is
> assuming
> a Map containing a
> String
> key and a String
> value. I
> also noticed your
> method
> is static. What
> creator
> are you using?
>
>
> On Wed, Jun 24, 2009 at
> 11:34 AM, Rio Liu
> < rioliu@...
> <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>
> wrote:
>
> 1. public
> static void removeError(Map<String, Boolean> errorMap) {
> 2.
> if(errorMap == null)
> 3. return;
> 4. Iterator<Entry<String, Boolean>> it =
> errorMap.entrySet().iterator();
> 5. while(it.hasNext()) {
> 6. Entry<String,
> Boolean> entry = it.next();
> 7. if(entry.getValue()) {
> //error here
> 8.
> // do something
> 9. }
> 10. }
> 11. }
>
>
> On Thu, Jun 25,
> 2009
> at 1:31 AM, Jose
> Noheda
>
> < jose.noheda@... <mailto: jose.noheda@...>
>
> <mailto: jose.noheda@... <mailto: jose.noheda@...>>>
>
> wrote:
>
> What's the Java
> counterpart?
>
>
> On Wed, Jun 24,
> 2009 at
> 7:29 PM,
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>
>
> wrote:
>
> It is very
> simple js
> object
>
> {2009625010703182:true}
>
>
> On Thu, Jun
> 25, 2009 at
> 1:14
> AM, David
> Marginian
>
> < david@... <mailto: david@...>
>
> <mailto: david@... <mailto: david@...>>>
>
> wrote:
>
> I meant
> send us
> the
>
> JavaScript
>
> object you
> are
>
> building,
> not the
>
> request.
>
>
> On Wed,
> Jun 24,
> 2009 at
>
> 11:11 AM,
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>
>
> wrote:
>
>
> callCount=1
>
> windowName=
>
> c0-scriptName=TestClass
>
> c0-methodName=removeError
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> c0-id=0
>
> c0-e1=boolean:true
>
> c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
>
> batchId=11
>
>
> This
>
> is the
>
> content
>
> of the
>
> request,
>
> I have
>
> checked
> my
>
> dwr.xml
> , I
>
> think
>
> it's
> OK,
> for
>
> this
>
> case,
> I
>
> don't
>
> need
>
> to add
> a
>
> converter
> for
> it.
>
> java.lang.*
> are
>
> imported
> by
>
> default.
>
>
> Thanks
> Rio
>
>
> On
>
> Thu,
> Jun
> 25,
>
> 2009
> at
>
> 12:20
> AM,
>
> David
>
> Marginian
>
> < david@... <mailto: david@...>
>
> <mailto: david@... <mailto: david@...>>>
>
>
> wrote:
>
>
> Have
>
> you
>
> checked
>
> the
>
> server
>
> log?
> Are
>
> you
>
> sure
>
> that
>
> your
>
> dwr
>
> configuration
>
> is
>
> correct
>
> (you
>
> only
>
> posted
>
> a
>
> snippet)?
> What
>
> does
>
> the
>
> JavaScript
>
> object
>
> you
>
> are
>
> passing
>
> the
>
> remote
>
> method
>
> look
>
> like?
>
>
>
> On
>
> Wed,
>
> Jun
>
> 24,
>
> 2009
>
> at
>
> 10:12
>
> AM,
>
> Rio
>
> Liu
>
> < rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>
>
>
> wrote:
>
>
> Hi
>
> guys
>
>
> I
>
> hava
>
> a
>
> problem.
>
> I
>
> have
>
> a
>
> signature
>
> config
>
> like
>
>
> <![CDATA[
>
>
>
> import
>
> java.util.List;
>
>
>
> import
>
> java.util.Map;
>
>
> import
>
> com.test.TestClass;
>
>
>
> TestClass.removeError(Map<String,
>
> Boolean>);
>
>
> ]]>
>
>
> but
>
> I
>
> always
>
> got
>
> a
>
> Java.lang.String
>
> classcastexception
>
> cannot
>
> be
>
> conveted
>
> to
>
> Java.lang.Boolean
>
> Who
>
> can
>
> help
>
> me
>
> ?
>
>
> Thanks
>
> very
>
> much
>
>
> Rio
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> For additional commands, e-mail: users-help@...
> <mailto: users-help@...>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
I mean the AuditLogAjaxFilter NPE , so I can't get the trace log from dwr runtime now. On Thu, Jun 25, 2009 at 9:58 AM, David Marginian <david@...> wrote:
Log trace issue? What are you talking about?
Rio Liu wrote:
I think I should resolve the log trace issue first, it would be helpful
<mailto:rioliu@...> <mailto:rioliu@...
<mailto: rioliu@...>>> wrote:
Hi I tried another way like
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web
Remoting
3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
<dwr>
<allow>
<create creator="new" javascript="TestManager">
<param name="class" value="org.rio.test.
TestManager"/>
</create>
<create creator="new" javascript="TestClass">
<param name="class" value="org.rio.test.TestClass"/>
</create>
<convert converter="exception"
match="java.lang.Exception"/>
<convert converter="bean"
match="org.rio.test.bean.Message"/>
<convert converter="bean"
match="org.rio.test.bean.Note"/>
<convert converter="bean"
match="org.rio.test.bean.Criterion"/>
</allow>
<signatures>
<![CDATA[
import java.util.List;
import java.util.Map;
import org.rio.test.TestClass;
import org.rio.test.TestManager;
import org.rio.test.bean.Criterion;
TestManager.search(List<Criterion>);
TestClass.removeError(Map<String, Boolean>);
]]>
</signatures>
</dwr>
added a TestManager.search(List<Criterion>); , this guy
works well.
On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
< david@... <mailto: david@...>
<mailto: david@... <mailto: david@...>>> wrote:
I would be surprised if this is not working. If I
were you I would ensure that you changed the
deployed
file and restarted your container. I would double
check everything and take a look at the server logs
(internal dwr errors shoudl be logged without the
filter).
On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
< rioliu@... <mailto: rioliu@...>
<mailto: rioliu@... <mailto: rioliu@...>>> wrote:
Oh, yes, now I corrected it. but got the same
result from server.
On Thu, Jun 25, 2009 at 2:34 AM, David
Marginian
< david@...
<mailto:david@...> <mailto:david@...
<mailto: david@...>>>
wrote:
You have the incorrect path to TestClass in
your signature (which is why I
originally told
you to send us your configuration, but you
insisted it was correct - this would have
saved us a lot of time).
In your signature:
import org.rio.test.bean.TestClass;
In your creator:
org.rio.test.TestClass
Your signature
should read org.rio.test.TestClass
-David
On Wed, Jun 24, 2009 at 12:21 PM, Rio Liu
< rioliu@...
<mailto:rioliu@...> <mailto:rioliu@...
<mailto: rioliu@...>>>
wrote:
<!DOCTYPE dwr PUBLIC "-//GetAhead
Limited//DTD Direct Web Remoting
3.0//EN"
" http://getahead.org/dwr//dwr30.dtd">
<dwr>
<allow>
<create creator="new"
javascript="TestManager">
<param name="class"
value="org.rio.test.TestManager"/>
</create>
<create creator="new"
javascript="TestClass">
<param name="class"
value="org.rio.test.TestClass"/>
</create>
<convert converter="exception"
match="java.lang.Exception"/>
<convert converter="bean"
match="org.rio.test.bean.Message"/>
<convert converter="bean"
match="org.rio.test.bean.Note"/>
</allow>
<signatures>
<![CDATA[
import java.util.List;
import java.util.Map;
import
org.rio.test.bean.TestClass;
TestClass.removeError(Map<String,
Boolean>);
]]>
</signatures>
</dwr>
On Thu, Jun 25, 2009 at 2:06 AM, David
Marginian < david@...
<mailto: david@...>
<mailto:david@...
<mailto: david@...>>> wrote:
Sending us your dwr.xml would
help us
ensure you have everything set-up
correctly.
On Wed, Jun 24, 2009 at 12:05 PM,
David Marginian
< david@... <mailto: david@...>
<mailto:david@...
<mailto: david@...>>> wrote:
What version of dwr are you
using? Pre 3.x the
AuditLogAjaxFilter does not
exist.
On Wed, Jun 24, 2009 at 11:59 AM,
Rio Liu < rioliu@...
<mailto: rioliu@...>
<mailto:rioliu@...
<mailto: rioliu@...>>> wrote:
I try to user <filter
class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
under allow tag to
trace the
log, but I got a NPE :(, It
doesn't work for me. and my
creator="new".
On Thu, Jun 25, 2009 at
1:42
AM, David Marginian
< david@...
<mailto: david@...>
<mailto:david@... <mailto:david@...>>>
wrote:
Do you see anything
in the
server logs? The
reason I
am asking is that it
appears that DWR is not
using the signature you
specified. If not you
will see a message that
indicated DWR is
assuming
a Map containing a
String
key and a String
value. I
also noticed your
method
is static. What
creator
are you using?
On Wed, Jun 24, 2009 at
11:34 AM, Rio Liu
< rioliu@...
<mailto: rioliu@...>
<mailto:rioliu@... <mailto:rioliu@...>>>
wrote:
1. public
static void removeError(Map<String, Boolean> errorMap) { 2. if(errorMap == null) 3. return; 4. Iterator<Entry<String, Boolean>> it =
errorMap.entrySet().iterator(); 5. while(it.hasNext()) { 6. Entry<String,
Boolean> entry = it.next(); 7. if(entry.getValue()) { //error here
8. // do something 9. } 10. } 11. }
On Thu, Jun 25,
2009
at 1:31 AM, Jose
Noheda
< jose.noheda@... <mailto: jose.noheda@...>
<mailto:jose.noheda@... <mailto:jose.noheda@...>>>
wrote:
What's the Java
counterpart?
On Wed, Jun 24,
2009 at
7:29 PM,
Rio Liu
< rioliu@... <mailto: rioliu@...>
<mailto:rioliu@... <mailto:rioliu@...>>>
wrote:
It is very
simple js
object
{2009625010703182:true}
On Thu, Jun
25, 2009 at
1:14
AM, David
Marginian
< david@... <mailto: david@...>
<mailto:david@... <mailto:david@...>>>
wrote:
I meant
send us
the
JavaScript
object you
are
building,
not the
request.
On Wed,
Jun 24,
2009 at
11:11 AM,
Rio Liu
< rioliu@... <mailto: rioliu@...>
<mailto:rioliu@... <mailto:rioliu@...>>>
wrote:
callCount=1
windowName=
c0-scriptName=TestClass
c0-methodName=removeError
c0-id=0
c0-e1=boolean:true
c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
batchId=11
This
is the
content
of the
request,
I have
checked
my
dwr.xml
, I
think
it's
OK,
for
this
case,
I
don't
need
to add
a
converter
for
it.
java.lang.*
are
imported
by
default.
Thanks
Rio
On
Thu,
Jun
25,
2009
at
12:20
AM,
David
Marginian
< david@... <mailto: david@...>
<mailto:david@... <mailto:david@...>>>
wrote:
Have
you
checked
the
server
log? Are
you
sure
that
your
dwr
configuration
is
correct
(you
only
posted
a
snippet)? What
does
the
JavaScript
object
you
are
passing
the
remote
method
look
like?
On
Wed,
Jun
24,
2009
at
10:12
AM,
Rio
Liu
< rioliu@... <mailto: rioliu@...>
<mailto:rioliu@... <mailto:rioliu@...>>>
wrote:
Hi
guys
I
hava
a
problem.
I
have
a
signature
config
like
<![CDATA[
import
java.util.List;
import
java.util.Map;
import
com.test.TestClass;
TestClass.removeError(Map<String,
Boolean>);
]]>
but
I
always
got
a
Java.lang.String
classcastexception
cannot
be
conveted
to
Java.lang.Boolean
Who
can
help
me
?
Thanks
very
much
Rio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
<mailto:users-unsubscribe@...>
<mailto:users-help@...>
|

|
Re: Java.lang.String ClassCastException
Send us the stack trace.
Rio Liu wrote:
> I mean the AuditLogAjaxFilter NPE , so I can't get the trace log from
> dwr runtime now.
>
> On Thu, Jun 25, 2009 at 9:58 AM, David Marginian < david@...
> <mailto: david@...>> wrote:
>
> Log trace issue? What are you talking about?
>
> Rio Liu wrote:
>
> I think I should resolve the log trace issue first, it would
> be helpful
>
> On Thu, Jun 25, 2009 at 9:05 AM, David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>> wrote:
>
> I don't see how this is related to your issue. You are
> passing a
> type - Boolean. This thread is someone trying to pass Object.
>
> Rio Liu wrote:
>
> Found this ref
>
> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html>
> On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
> <mailto: rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
> wrote:
>
> Hi I tried another way like
> <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD
> Direct Web
> Remoting
> 3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new" javascript="TestManager">
> <param name="class" value="org.rio.test.
>
> TestManager"/>
> </create>
> <create creator="new" javascript="TestClass">
> <param name="class"
> value="org.rio.test.TestClass"/>
> </create>
> <convert converter="exception"
> match="java.lang.Exception"/>
> <convert converter="bean"
> match="org.rio.test.bean.Message"/>
> <convert converter="bean"
> match="org.rio.test.bean.Note"/>
>
> <convert converter="bean"
> match="org.rio.test.bean.Criterion"/>
>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import org.rio.test.TestClass;
> import org.rio.test.TestManager;
>
> import org.rio.test.bean.Criterion;
> TestManager.search(List<Criterion>);
>
> TestClass.removeError(Map<String, Boolean>);
> ]]>
> </signatures>
> </dwr>
> added a TestManager.search(List<Criterion>); , this guy
> works well.
>
> On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
> <mailto: david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> Let us know the results please.
> On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
> <mailto: rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>>> wrote:
>
> OK, I'll keep investigating by your
> comments. thx
>
>
> On Thu, Jun 25, 2009 at 2:41 AM, David Marginian
> < david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>
> <mailto: david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> I would be surprised if this is not
> working. If I
> were you I would ensure that you changed the
> deployed
> file and restarted your container. I
> would double
> check everything and take a look at the
> server logs
> (internal dwr errors shoudl be logged
> without the
> filter).
>
>
> On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
> < rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>> wrote:
>
> Oh, yes, now I corrected it. but got
> the same
> result from server.
>
>
> On Thu, Jun 25, 2009 at 2:34 AM, David
> Marginian
> < david@...
> <mailto: david@...>
> <mailto: david@...
> <mailto: david@...>> <mailto: david@...
> <mailto: david@...>
>
> <mailto: david@... <mailto: david@...>>>>
>
> wrote:
>
> You have the incorrect path to
> TestClass in
> your signature (which is why I
> originally told
> you to send us your
> configuration, but you
> insisted it was correct - this
> would have
> saved us a lot of time).
> In your
> signature:
> import org.rio.test.bean.TestClass;
> In your creator:
> org.rio.test.TestClass
> Your
> signature
> should read org.rio.test.TestClass
> -David
>
>
> On Wed, Jun 24, 2009 at 12:21
> PM, Rio Liu
> < rioliu@...
> <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
> <mailto: rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
> wrote:
>
> <!DOCTYPE dwr PUBLIC
> "-//GetAhead
> Limited//DTD Direct Web Remoting
> 3.0//EN"
>
> " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new"
> javascript="TestManager">
> <param name="class"
>
> value="org.rio.test.TestManager"/>
> </create>
> <create creator="new"
> javascript="TestClass">
> <param name="class"
> value="org.rio.test.TestClass"/>
> </create>
>
> <convert converter="exception"
> match="java.lang.Exception"/>
> <convert converter="bean"
>
> match="org.rio.test.bean.Message"/>
> <convert converter="bean"
> match="org.rio.test.bean.Note"/>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import
> org.rio.test.bean.TestClass;
>
>
> TestClass.removeError(Map<String,
> Boolean>);
> ]]>
> </signatures>
> </dwr>
>
>
> On Thu, Jun 25, 2009 at 2:06
> AM, David
> Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
> <mailto: david@...
> <mailto: david@...>
>
> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> Sending us your dwr.xml
> would
> help us
> ensure you have
> everything set-up
> correctly.
> On Wed, Jun 24, 2009 at
> 12:05 PM,
> David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
>
> <mailto: david@... <mailto: david@...>
>
> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> What version of dwr
> are you
> using? Pre 3.x the
> AuditLogAjaxFilter
> does not
> exist.
>
> On Wed, Jun 24, 2009 at 11:59 AM,
> Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
> wrote:
>
> I try to user
> <filter
>
> class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
> under allow tag to
> trace the
> log, but I got a
> NPE :(, It
> doesn't work for
> me. and my
> creator="new".
>
>
> On Thu, Jun 25,
> 2009 at
> 1:42
> AM, David Marginian
>
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
>
> <mailto: david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>>>
>
>
> wrote:
>
> Do you see
> anything
> in the
> server logs?
> The
> reason I
> am asking is
> that it
> appears that
> DWR is not
> using the
> signature you
> specified.
> If not you
> will see a
> message that
> indicated DWR is
> assuming
> a Map
> containing a
> String
> key and a String
> value. I
> also noticed
> your
> method
> is static. What
> creator
> are you using?
>
>
> On Wed, Jun
> 24, 2009 at
> 11:34 AM,
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
> wrote:
>
> 1. public
> static void removeError(Map<String, Boolean> errorMap)
> {
> 2. if(errorMap == null)
> 3. return;
> 4.
> Iterator<Entry<String, Boolean>> it =
> errorMap.entrySet().iterator();
> 5. while(it.hasNext()) {
> 6.
> Entry<String,
> Boolean> entry = it.next();
> 7. if(entry.getValue()) {
>
> //error here
> 8.
> // do something
> 9. }
> 10. }
> 11. }
>
>
> On Thu,
> Jun 25,
> 2009
> at 1:31
> AM, Jose
> Noheda
>
> < jose.noheda@... <mailto: jose.noheda@...>
> <mailto: jose.noheda@... <mailto: jose.noheda@...>>
>
> <mailto: jose.noheda@... <mailto: jose.noheda@...>
> <mailto: jose.noheda@... <mailto: jose.noheda@...>>>>
>
>
> wrote:
>
>
> What's the Java
>
> counterpart?
>
>
> On
> Wed, Jun 24,
> 2009 at
> 7:29 PM,
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
>
> wrote:
>
>
> It is very
>
> simple js
>
> object
>
> {2009625010703182:true}
>
>
>
> On Thu, Jun
>
> 25, 2009 at
> 1:14
> AM, David
>
> Marginian
>
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
>
> <mailto: david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>>>
>
>
>
> wrote:
>
>
> I meant
>
> send us
>
> the
>
> JavaScript
>
> object you
>
> are
>
> building,
>
> not the
>
> request.
>
>
>
> On Wed,
>
> Jun 24,
>
> 2009 at
>
> 11:11 AM,
>
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
>
>
> wrote:
>
>
> callCount=1
>
> windowName=
>
> c0-scriptName=TestClass
>
> c0-methodName=removeError
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> c0-id=0
>
> c0-e1=boolean:true
>
>
> c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
>
> batchId=11
>
>
> This
>
> is the
>
> content
>
> of the
>
> request,
>
> I have
>
> checked
>
> my
>
> dwr.xml
>
> , I
>
> think
>
> it's
>
> OK,
>
> for
>
> this
>
> case,
>
> I
>
> don't
>
> need
>
> to add
>
> a
>
> converter
>
> for
>
> it.
>
> java.lang.*
>
> are
>
> imported
>
> by
>
> default.
>
>
> Thanks
>
> Rio
>
>
>
> On
>
> Thu,
>
> Jun
>
> 25,
>
> 2009
>
> at
>
> 12:20
>
> AM,
>
> David
>
> Marginian
>
> < david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>
>
> <mailto: david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>>>
>
>
>
> wrote:
>
>
> Have
>
> you
>
> checked
>
> the
>
> server
>
> log?
> Are
>
> you
>
> sure
>
> that
>
> your
>
> dwr
>
> configuration
>
> is
>
> correct
>
> (you
>
> only
>
> posted
>
> a
>
> snippet)?
> What
>
> does
>
> the
>
> JavaScript
>
> object
>
> you
>
> are
>
> passing
>
> the
>
> remote
>
> method
>
> look
>
> like?
>
>
>
> On
>
> Wed,
>
> Jun
>
> 24,
>
> 2009
>
> at
>
> 10:12
>
> AM,
>
> Rio
>
> Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>>>
>
>
>
> wrote:
>
>
> Hi
>
> guys
>
>
> I
>
> hava
>
> a
>
> problem.
>
> I
>
> have
>
> a
>
> signature
>
> config
>
> like
>
>
> <![CDATA[
>
>
>
> import
>
> java.util.List;
>
>
>
> import
>
> java.util.Map;
>
>
> import
>
> com.test.TestClass;
>
>
>
>
> TestClass.removeError(Map<String,
>
> Boolean>);
>
>
> ]]>
>
>
> but
>
> I
>
> always
>
> got
>
> a
>
> Java.lang.String
>
> classcastexception
>
> cannot
>
> be
>
> conveted
>
> to
>
> Java.lang.Boolean
>
> Who
>
> can
>
> help
>
> me
>
> ?
>
>
> Thanks
>
> very
>
> much
>
>
> Rio
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> <mailto: users-unsubscribe@...
> <mailto: users-unsubscribe@...>>
>
> For additional commands, e-mail:
> users-help@... <mailto: users-help@...>
> <mailto: users-help@...
> <mailto: users-help@...>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> For additional commands, e-mail: users-help@...
> <mailto: users-help@...>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
I tested remoting a Map<String, Boolean> method and it works fine. The
JavaScript object I am passing is { key: true}.
Rio Liu wrote:
> I mean the AuditLogAjaxFilter NPE , so I can't get the trace log from
> dwr runtime now.
>
> On Thu, Jun 25, 2009 at 9:58 AM, David Marginian < david@...
> <mailto: david@...>> wrote:
>
> Log trace issue? What are you talking about?
>
> Rio Liu wrote:
>
> I think I should resolve the log trace issue first, it would
> be helpful
>
> On Thu, Jun 25, 2009 at 9:05 AM, David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>> wrote:
>
> I don't see how this is related to your issue. You are
> passing a
> type - Boolean. This thread is someone trying to pass Object.
>
> Rio Liu wrote:
>
> Found this ref
>
> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html>
> On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
> <mailto: rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
> wrote:
>
> Hi I tried another way like
> <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD
> Direct Web
> Remoting
> 3.0//EN" " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new" javascript="TestManager">
> <param name="class" value="org.rio.test.
>
> TestManager"/>
> </create>
> <create creator="new" javascript="TestClass">
> <param name="class"
> value="org.rio.test.TestClass"/>
> </create>
> <convert converter="exception"
> match="java.lang.Exception"/>
> <convert converter="bean"
> match="org.rio.test.bean.Message"/>
> <convert converter="bean"
> match="org.rio.test.bean.Note"/>
>
> <convert converter="bean"
> match="org.rio.test.bean.Criterion"/>
>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import org.rio.test.TestClass;
> import org.rio.test.TestManager;
>
> import org.rio.test.bean.Criterion;
> TestManager.search(List<Criterion>);
>
> TestClass.removeError(Map<String, Boolean>);
> ]]>
> </signatures>
> </dwr>
> added a TestManager.search(List<Criterion>); , this guy
> works well.
>
> On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
> <mailto: david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> Let us know the results please.
> On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
> <mailto: rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>>> wrote:
>
> OK, I'll keep investigating by your
> comments. thx
>
>
> On Thu, Jun 25, 2009 at 2:41 AM, David Marginian
> < david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>
> <mailto: david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> I would be surprised if this is not
> working. If I
> were you I would ensure that you changed the
> deployed
> file and restarted your container. I
> would double
> check everything and take a look at the
> server logs
> (internal dwr errors shoudl be logged
> without the
> filter).
>
>
> On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
> < rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>> wrote:
>
> Oh, yes, now I corrected it. but got
> the same
> result from server.
>
>
> On Thu, Jun 25, 2009 at 2:34 AM, David
> Marginian
> < david@...
> <mailto: david@...>
> <mailto: david@...
> <mailto: david@...>> <mailto: david@...
> <mailto: david@...>
>
> <mailto: david@... <mailto: david@...>>>>
>
> wrote:
>
> You have the incorrect path to
> TestClass in
> your signature (which is why I
> originally told
> you to send us your
> configuration, but you
> insisted it was correct - this
> would have
> saved us a lot of time).
> In your
> signature:
> import org.rio.test.bean.TestClass;
> In your creator:
> org.rio.test.TestClass
> Your
> signature
> should read org.rio.test.TestClass
> -David
>
>
> On Wed, Jun 24, 2009 at 12:21
> PM, Rio Liu
> < rioliu@...
> <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
> <mailto: rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
> wrote:
>
> <!DOCTYPE dwr PUBLIC
> "-//GetAhead
> Limited//DTD Direct Web Remoting
> 3.0//EN"
>
> " http://getahead.org/dwr//dwr30.dtd">
> <dwr>
> <allow>
> <create creator="new"
> javascript="TestManager">
> <param name="class"
>
> value="org.rio.test.TestManager"/>
> </create>
> <create creator="new"
> javascript="TestClass">
> <param name="class"
> value="org.rio.test.TestClass"/>
> </create>
>
> <convert converter="exception"
> match="java.lang.Exception"/>
> <convert converter="bean"
>
> match="org.rio.test.bean.Message"/>
> <convert converter="bean"
> match="org.rio.test.bean.Note"/>
>
> </allow>
> <signatures>
>
> <![CDATA[
> import java.util.List;
> import java.util.Map;
> import
> org.rio.test.bean.TestClass;
>
>
> TestClass.removeError(Map<String,
> Boolean>);
> ]]>
> </signatures>
> </dwr>
>
>
> On Thu, Jun 25, 2009 at 2:06
> AM, David
> Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
> <mailto: david@...
> <mailto: david@...>
>
> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> Sending us your dwr.xml
> would
> help us
> ensure you have
> everything set-up
> correctly.
> On Wed, Jun 24, 2009 at
> 12:05 PM,
> David Marginian
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
>
> <mailto: david@... <mailto: david@...>
>
> <mailto: david@...
> <mailto: david@...>>>> wrote:
>
> What version of dwr
> are you
> using? Pre 3.x the
> AuditLogAjaxFilter
> does not
> exist.
>
> On Wed, Jun 24, 2009 at 11:59 AM,
> Rio Liu
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
> wrote:
>
> I try to user
> <filter
>
> class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
> under allow tag to
> trace the
> log, but I got a
> NPE :(, It
> doesn't work for
> me. and my
> creator="new".
>
>
> On Thu, Jun 25,
> 2009 at
> 1:42
> AM, David Marginian
>
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
>
> <mailto: david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>>>
>
>
> wrote:
>
> Do you see
> anything
> in the
> server logs?
> The
> reason I
> am asking is
> that it
> appears that
> DWR is not
> using the
> signature you
> specified.
> If not you
> will see a
> message that
> indicated DWR is
> assuming
> a Map
> containing a
> String
> key and a String
> value. I
> also noticed
> your
> method
> is static. What
> creator
> are you using?
>
>
> On Wed, Jun
> 24, 2009 at
> 11:34 AM,
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
> wrote:
>
> 1. public
> static void removeError(Map<String, Boolean> errorMap)
> {
> 2. if(errorMap == null)
> 3. return;
> 4.
> Iterator<Entry<String, Boolean>> it =
> errorMap.entrySet().iterator();
> 5. while(it.hasNext()) {
> 6.
> Entry<String,
> Boolean> entry = it.next();
> 7. if(entry.getValue()) {
>
> //error here
> 8.
> // do something
> 9. }
> 10. }
> 11. }
>
>
> On Thu,
> Jun 25,
> 2009
> at 1:31
> AM, Jose
> Noheda
>
> < jose.noheda@... <mailto: jose.noheda@...>
> <mailto: jose.noheda@... <mailto: jose.noheda@...>>
>
> <mailto: jose.noheda@... <mailto: jose.noheda@...>
> <mailto: jose.noheda@... <mailto: jose.noheda@...>>>>
>
>
> wrote:
>
>
> What's the Java
>
> counterpart?
>
>
> On
> Wed, Jun 24,
> 2009 at
> 7:29 PM,
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
>
> wrote:
>
>
> It is very
>
> simple js
>
> object
>
> {2009625010703182:true}
>
>
>
> On Thu, Jun
>
> 25, 2009 at
> 1:14
> AM, David
>
> Marginian
>
> < david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>
>
> <mailto: david@... <mailto: david@...>
> <mailto: david@... <mailto: david@...>>>>
>
>
>
> wrote:
>
>
> I meant
>
> send us
>
> the
>
> JavaScript
>
> object you
>
> are
>
> building,
>
> not the
>
> request.
>
>
>
> On Wed,
>
> Jun 24,
>
> 2009 at
>
> 11:11 AM,
>
> Rio Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>>>
>
>
>
> wrote:
>
>
> callCount=1
>
> windowName=
>
> c0-scriptName=TestClass
>
> c0-methodName=removeError
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> c0-id=0
>
> c0-e1=boolean:true
>
>
> c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
>
> batchId=11
>
>
> This
>
> is the
>
> content
>
> of the
>
> request,
>
> I have
>
> checked
>
> my
>
> dwr.xml
>
> , I
>
> think
>
> it's
>
> OK,
>
> for
>
> this
>
> case,
>
> I
>
> don't
>
> need
>
> to add
>
> a
>
> converter
>
> for
>
> it.
>
> java.lang.*
>
> are
>
> imported
>
> by
>
> default.
>
>
> Thanks
>
> Rio
>
>
>
> On
>
> Thu,
>
> Jun
>
> 25,
>
> 2009
>
> at
>
> 12:20
>
> AM,
>
> David
>
> Marginian
>
> < david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>
>
> <mailto: david@...
> <mailto: david@...> <mailto: david@...
> <mailto: david@...>>>>
>
>
>
> wrote:
>
>
> Have
>
> you
>
> checked
>
> the
>
> server
>
> log?
> Are
>
> you
>
> sure
>
> that
>
> your
>
> dwr
>
> configuration
>
> is
>
> correct
>
> (you
>
> only
>
> posted
>
> a
>
> snippet)?
> What
>
> does
>
> the
>
> JavaScript
>
> object
>
> you
>
> are
>
> passing
>
> the
>
> remote
>
> method
>
> look
>
> like?
>
>
>
> On
>
> Wed,
>
> Jun
>
> 24,
>
> 2009
>
> at
>
> 10:12
>
> AM,
>
> Rio
>
> Liu
>
> < rioliu@... <mailto: rioliu@...>
> <mailto: rioliu@... <mailto: rioliu@...>>
>
> <mailto: rioliu@...
> <mailto: rioliu@...> <mailto: rioliu@...
> <mailto: rioliu@...>>>>
>
>
>
> wrote:
>
>
> Hi
>
> guys
>
>
> I
>
> hava
>
> a
>
> problem.
>
> I
>
> have
>
> a
>
> signature
>
> config
>
> like
>
>
> <![CDATA[
>
>
>
> import
>
> java.util.List;
>
>
>
> import
>
> java.util.Map;
>
>
> import
>
> com.test.TestClass;
>
>
>
>
> TestClass.removeError(Map<String,
>
> Boolean>);
>
>
> ]]>
>
>
> but
>
> I
>
> always
>
> got
>
> a
>
> Java.lang.String
>
> classcastexception
>
> cannot
>
> be
>
> conveted
>
> to
>
> Java.lang.Boolean
>
> Who
>
> can
>
> help
>
> me
>
> ?
>
>
> Thanks
>
> very
>
> much
>
>
> Rio
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> <mailto: users-unsubscribe@...
> <mailto: users-unsubscribe@...>>
>
> For additional commands, e-mail:
> users-help@... <mailto: users-help@...>
> <mailto: users-help@...
> <mailto: users-help@...>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> For additional commands, e-mail: users-help@...
> <mailto: users-help@...>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
David I think I know the reason, because I used the obfuscated jar file. if I don't do the obfuscation, it works fine. now I have to change the parameter to Map<String, String> and update my impl.
On Thu, Jun 25, 2009 at 12:38 PM, David Marginian <david@...> wrote:
I tested remoting a Map method and it works fine. The
JavaScript object I am passing is { key: true}.
Rio Liu wrote:
> I mean the AuditLogAjaxFilter NPE , so I can't get the trace log from
> dwr runtime now.
>
> On Thu, Jun 25, 2009 at 9:58 AM, David Marginian > wrote:
>
> Log trace issue? What are you talking about?
>
> Rio Liu wrote:
>
> I think I should resolve the log trace issue first, it would
> be helpful
>
> On Thu, Jun 25, 2009 at 9:05 AM, David Marginian
>
> >> wrote:
>
> I don't see how this is related to your issue. You are
> passing a
> type - Boolean. This thread is someone trying to pass Object.
>
> Rio Liu wrote:
>
> Found this ref
>
> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
>
> On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu
>
> >
>
>
> >>>
> wrote:
>
> Hi I tried another way like
> Direct Web
> Remoting
> 3.0//EN" "http://getahead.org/dwr//dwr30.dtd">
>
>
>
>
>
>
> value="org.rio.test.TestClass"/>
>
> match="java.lang.Exception"/>
> match="org.rio.test.bean.Message"/>
> match="org.rio.test.bean.Note"/>
>
> match="org.rio.test.bean.Criterion"/>
>
>
>
>
>
>
>
>
> added a TestManager.search(List); , this guy
> works well.
>
> On Thu, Jun 25, 2009 at 3:50 AM, David Marginian
>
> >
> >>> wrote:
>
> Let us know the results please.
> On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu
>
> >
> >>> wrote:
>
> OK, I'll keep investigating by your
> comments. thx
>
>
> On Thu, Jun 25, 2009 at 2:41 AM, David Marginian
> >
> >>> wrote:
>
> I would be surprised if this is not
> working. If I
> were you I would ensure that you changed the
> deployed
> file and restarted your container. I
> would double
> check everything and take a look at the
> server logs
> (internal dwr errors shoudl be logged
> without the
> filter).
>
>
> On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu
> >
>
> >>> wrote:
>
> Oh, yes, now I corrected it. but got
> the same
> result from server.
>
>
> On Thu, Jun 25, 2009 at 2:34 AM, David
> Marginian
>
> >
>
> >>>
>
> wrote:
>
> You have the incorrect path to
> TestClass in
> your signature (which is why I
> originally told
> you to send us your
> configuration, but you
> insisted it was correct - this
> would have
> saved us a lot of time).
> In your
> signature:
> import org.rio.test.bean.TestClass;
> In your creator:
> org.rio.test.TestClass
> Your
> signature
> should read org.rio.test.TestClass
> -David
>
>
> On Wed, Jun 24, 2009 at 12:21
> PM, Rio Liu
>
> >
>
>
> >>>
>
> wrote:
>
> "-//GetAhead
> Limited//DTD Direct Web Remoting
> 3.0//EN"
>
> "http://getahead.org/dwr//dwr30.dtd">
>
>
> javascript="TestManager">
>
> value="org.rio.test.TestManager"/>
>
> javascript="TestClass">
> value="org.rio.test.TestClass"/>
>
>
> match="java.lang.Exception"/>
>
> match="org.rio.test.bean.Message"/>
> match="org.rio.test.bean.Note"/>
>
>
>
>
>
>
>
>
>
> On Thu, Jun 25, 2009 at 2:06
> AM, David
> Marginian
>
> >
>
>
> >>> wrote:
>
> Sending us your dwr.xml
> would
> help us
> ensure you have
> everything set-up
> correctly.
> On Wed, Jun 24, 2009 at
> 12:05 PM,
> David Marginian
>
> >
>
>
>
> >>> wrote:
>
> What version of dwr
> are you
> using? Pre 3.x the
> AuditLogAjaxFilter
> does not
> exist.
>
> On Wed, Jun 24, 2009 at 11:59 AM,
> Rio Liu
>
> >
>
>
>
> >>>
> wrote:
>
> I try to user
>
> class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
> under allow tag to
> trace the
> log, but I got a
> NPE :(, It
> doesn't work for
> me. and my
> creator="new".
>
>
> On Thu, Jun 25,
> 2009 at
> 1:42
> AM, David Marginian
>
>
> >
>
>
> >>>
>
>
> wrote:
>
> Do you see
> anything
> in the
> server logs?
> The
> reason I
> am asking is
> that it
> appears that
> DWR is not
> using the
> signature you
> specified.
> If not you
> will see a
> message that
> indicated DWR is
> assuming
> a Map
> containing a
> String
> key and a String
> value. I
> also noticed
> your
> method
> is static. What
> creator
> are you using?
>
>
> On Wed, Jun
> 24, 2009 at
> 11:34 AM,
> Rio Liu
>
>
> >
>
>
> >>>
>
> wrote:
>
> 1. public
> static void removeError(Map errorMap)
> {
> 2. if(errorMap == null)
> 3. return;
> 4.
> Iterator> it =
> errorMap.entrySet().iterator();
> 5. while(it.hasNext()) {
> 6.
> Entry Boolean> entry = it.next();
> 7. if(entry.getValue()) {
>
> //error here
> 8.
> // do something
> 9. }
> 10. }
> 11. }
>
>
> On Thu,
> Jun 25,
> 2009
> at 1:31
> AM, Jose
> Noheda
>
>
> >
>
>
> >>>
>
>
> wrote:
>
>
> What's the Java
>
> counterpart?
>
>
> On
> Wed, Jun 24,
> 2009 at
> 7:29 PM,
> Rio Liu
>
>
> >
>
>
> >>>
>
>
> wrote:
>
>
> It is very
>
> simple js
>
> object
>
> {2009625010703182:true}
>
>
>
> On Thu, Jun
>
> 25, 2009 at
> 1:14
> AM, David
>
> Marginian
>
>
> >
>
>
> >>>
>
>
>
> wrote:
>
>
> I meant
>
> send us
>
> the
>
> JavaScript
>
> object you
>
> are
>
> building,
>
> not the
>
> request.
>
>
>
> On Wed,
>
> Jun 24,
>
> 2009 at
>
> 11:11 AM,
>
> Rio Liu
>
>
> >
>
>
> >>>
>
>
>
> wrote:
>
>
> callCount=1
>
> windowName=
>
> c0-scriptName=TestClass
>
> c0-methodName=removeError
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> c0-id=0
>
> c0-e1=boolean:true
>
>
> c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
>
> batchId=11
>
>
> This
>
> is the
>
> content
>
> of the
>
> request,
>
> I have
>
> checked
>
> my
>
> dwr.xml
>
> , I
>
> think
>
> it's
>
> OK,
>
> for
>
> this
>
> case,
>
> I
>
> don't
>
> need
>
> to add
>
> a
>
> converter
>
> for
>
> it.
>
> java.lang.*
>
> are
>
> imported
>
> by
>
> default.
>
>
> Thanks
>
> Rio
>
>
>
> On
>
> Thu,
>
> Jun
>
> 25,
>
> 2009
>
> at
>
> 12:20
>
> AM,
>
> David
>
> Marginian
>
> >
>
> >>>
>
>
>
> wrote:
>
>
> Have
>
> you
>
> checked
>
> the
>
> server
>
> log?
> Are
>
> you
>
> sure
>
> that
>
> your
>
> dwr
>
> configuration
>
> is
>
> correct
>
> (you
>
> only
>
> posted
>
> a
>
> snippet)?
> What
>
> does
>
> the
>
> JavaScript
>
> object
>
> you
>
> are
>
> passing
>
> the
>
> remote
>
> method
>
> look
>
> like?
>
>
>
> On
>
> Wed,
>
> Jun
>
> 24,
>
> 2009
>
> at
>
> 10:12
>
> AM,
>
> Rio
>
> Liu
>
>
> >
>
> >>>
>
>
>
> wrote:
>
>
> Hi
>
> guys
>
>
> I
>
> hava
>
> a
>
> problem.
>
> I
>
> have
>
> a
>
> signature
>
> config
>
> like
>
>
>
>
>
> but
>
> I
>
> always
>
> got
>
> a
>
> Java.lang.String
>
> classcastexception
>
> cannot
>
> be
>
> conveted
>
> to
>
> Java.lang.Boolean
>
> Who
>
> can
>
> help
>
> me
>
> ?
>
>
> Thanks
>
> very
>
> much
>
>
> Rio
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
>
> >
>
> For additional commands, e-mail:
> users-help@...
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
>
> For additional commands, e-mail: users-help@...
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
Did you previously mention you were messing with the jar? It would have
saved us a lot of time.
Rio Liu wrote:
> David
>
> I think I know the reason, because I used the obfuscated jar file. if
> I don't do the obfuscation, it works fine. now I have to change the
> parameter to Map<String, String> and update my impl.
>
> On Thu, Jun 25, 2009 at 12:38 PM, David Marginian < david@...
> <mailto: david@...>> wrote:
>
> I tested remoting a Map method and it works fine. The JavaScript
> object I am passing is { key: true}. Rio Liu wrote: > I mean the
> AuditLogAjaxFilter NPE , so I can't get the trace log from > dwr
> runtime now. > > On Thu, Jun 25, 2009 at 9:58 AM, David Marginian
> > wrote: > > Log trace issue? What are you talking about? > > Rio
> Liu wrote: > > I think I should resolve the log trace issue first,
> it would > be helpful > > On Thu, Jun 25, 2009 at 9:05 AM, David
> Marginian > > >> wrote: > > I don't see how this is related to
> your issue. You are > passing a > type - Boolean. This thread is
> someone trying to pass Object. > > Rio Liu wrote: > > Found this
> ref > >
> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html> > > On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu > > > > > > >>> >
> wrote: > > Hi I tried another way like > Direct Web > Remoting >
> 3.0//EN" " http://getahead.org/dwr//dwr30.dtd"> > > > >
>
> > > value="org.rio.test.TestClass"/> > >
match="java.lang.Exception"/> > match="org.rio.test.bean.Message"/> >
match="org.rio.test.bean.Note"/> > >
match="org.rio.test.bean.Criterion"/> > > > > > > > > > added a
TestManager.search(List); , this guy > works well. > > On Thu, Jun 25,
2009 at 3:50 AM, David Marginian > > > > >>> wrote: > > Let us know the
results please. > On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > > > > >>>
wrote: > > OK, I'll keep investigating by your > comments. thx > > > On
Thu, Jun 25, 2009 at 2:41 AM, David Marginian > > > >>> wrote: > > I
would be surprised if this is not > working. If I > were you I would
ensure that you changed the > deployed > file and restarted your
container. I > would double > check everything and take a look at the >
server logs > (internal dwr errors shoudl be logged > without the >
filter). > > > On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>>
wrote: > > Oh, yes, now I corrected it. but got > the same > result from
server. > > > On Thu, Jun 25, 2009 at 2:34 AM, David > Marginian > > > >
> >>> > > wrote: > > You have the incorrect path to > TestClass in >
your signature (which is why I > originally told > you to send us your >
configuration, but you > insisted it was correct - this > would have >
saved us a lot of time). > In your > signature: > import
org.rio.test.bean.TestClass; > In your creator: > org.rio.test.TestClass
> Your > signature > should read org.rio.test.TestClass > -David > > >
On Wed, Jun 24, 2009 at 12:21 > PM, Rio Liu > > > > > > >>> > > wrote: >
> "-//GetAhead > Limited//DTD Direct Web Remoting > 3.0//EN" > >
" http://getahead.org/dwr//dwr30.dtd"> > > > javascript="TestManager"> >
> value="org.rio.test.TestManager"/> > > javascript="TestClass"> >
value="org.rio.test.TestClass"/> > > > match="java.lang.Exception"/> > >
match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> >
> > > > > > > > > On Thu, Jun 25, 2009 at 2:06 > AM, David > Marginian
> > > > > > >>> wrote: > > Sending us your dwr.xml > would > help us >
ensure you have > everything set-up > correctly. > On Wed, Jun 24, 2009
at > 12:05 PM, > David Marginian > > > > > > > >>> wrote: > > What
version of dwr > are you > using? Pre 3.x the > AuditLogAjaxFilter >
does not > exist. > > On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu > > >
> > > > >>> > wrote: > > I try to user > >
class="org.directwebremoting.filter.AuditLogAjaxFilter"/> > under allow
tag to > trace the > log, but I got a > NPE :(, It > doesn't work for >
me. and my > creator="new". > > > On Thu, Jun 25, > 2009 at > 1:42 > AM,
David Marginian > > > > > > > >>> > > > wrote: > > Do you see > anything
> in the > server logs? > The > reason I > am asking is > that it >
appears that > DWR is not > using the > signature you > specified. > If
not you > will see a > message that > indicated DWR is > assuming > a
Map > containing a > String > key and a String > value. I > also noticed
> your > method > is static. What > creator > are you using? > > > On
Wed, Jun > 24, 2009 at > 11:34 AM, > Rio Liu > > > > > > > >>> > >
wrote: > > 1. public > static void removeError(Map errorMap) > { > 2.
if(errorMap == null) > 3. return; > 4. > Iterator> it = >
errorMap.entrySet().iterator(); > 5. while(it.hasNext()) { > 6. > Entry
Boolean> entry = it.next(); > 7. if(entry.getValue()) { > > //error here
> 8. > // do something > 9. } > 10. } > 11. } > > > On Thu, > Jun 25, >
2009 > at 1:31 > AM, Jose > Noheda > > > > > > > >>> > > > wrote: > > >
What's the Java > > counterpart? > > > On > Wed, Jun 24, > 2009 at >
7:29 PM, > Rio Liu > > > > > > > >>> > > > wrote: > > > It is very > >
simple js > > object > > {2009625010703182:true} > > > > On Thu, Jun > >
25, 2009 at > 1:14 > AM, David > > Marginian > > > > > > > >>> > > > >
wrote: > > > I meant > > send us > > the > > JavaScript > > object you >
> are > > building, > > not the > > request. > > > > On Wed, > > Jun
24, > > 2009 at > > 11:11 AM, > > Rio Liu > > > > > > > >>> > > > >
wrote: > > > callCount=1 > > windowName= > > c0-scriptName=TestClass > >
c0-methodName=removeError > > > > > > > > > > > > > > > > > > c0-id=0 >
> c0-e1=boolean:true > > >
c0-param0=Object_Object:{20090625010703185:reference:c0-e1} > >
batchId=11 > > > This > > is the > > content > > of the > > request, > >
I have > > checked > > my > > dwr.xml > > , I > > think > > it's > > OK,
> > for > > this > > case, > > I > > don't > > need > > to add > > a >
> converter > > for > > it. > > java.lang.* > > are > > imported > > by
> > default. > > > Thanks > > Rio > > > > On > > Thu, > > Jun > > 25, >
> 2009 > > at > > 12:20 > > AM, > > David > > Marginian > > > > > >>> >
> > > wrote: > > > Have > > you > > checked > > the > > server > > log?
> Are > > you > > sure > > that > > your > > dwr > > configuration > >
is > > correct > > (you > > only > > posted > > a > > snippet)? > What >
> does > > the > > JavaScript > > object > > you > > are > > passing >
> the > > remote > > method > > look > > like? > > > > On > > Wed, > >
Jun > > 24, > > 2009 > > at > > 10:12 > > AM, > > Rio > > Liu > > > > >
> >>> > > > > wrote: > > > Hi > > guys > > > I > > hava > > a > >
problem. > > I > > have > > a > > signature > > config > > like > > > >
> > but > > I > > always > > got > > a > > Java.lang.String > >
classcastexception > > cannot > > be > > conveted > > to > >
Java.lang.Boolean > > Who > > can > > help > > me > > ? > > > Thanks > >
very > > much > > > Rio > > > > > > > > > > > > > > > > > > > > > > > >
--------------------------------------------------------------------- >
To unsubscribe, e-mail: users-unsubscribe@...
<mailto: users-unsubscribe@...> > > > > > For additional
commands, e-mail: > users-help@...
<mailto: users-help@...> > > > > > > >
--------------------------------------------------------------------- >
To unsubscribe, e-mail: users-unsubscribe@...
<mailto: users-unsubscribe@...> > > For additional commands,
e-mail: users-help@... <mailto: users-help@...>
> > >
--------------------------------------------------------------------- To
unsubscribe, e-mail: users-unsubscribe@...
<mailto: users-unsubscribe@...> For additional commands,
e-mail: users-help@... <mailto: users-help@...>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Java.lang.String ClassCastException
Sorry for that, I want to clarify that the obfuscated jar file is not the dwr.jar. it is the jar file includes my beans. I really confuse that dwr has different behaviors On Thu, Jun 25, 2009 at 1:13 PM, David Marginian <david@...> wrote:
Did you previously mention you were messing with the jar? It would have saved us a lot of time.
Rio Liu wrote:
David
I think I know the reason, because I used the obfuscated jar file. if I don't do the obfuscation, it works fine. now I have to change the parameter to Map<String, String> and update my impl.
On Thu, Jun 25, 2009 at 12:38 PM, David Marginian < david@... <mailto: david@...>> wrote:
I tested remoting a Map method and it works fine. The JavaScript
object I am passing is { key: true}. Rio Liu wrote: > I mean the
AuditLogAjaxFilter NPE , so I can't get the trace log from > dwr
runtime now. > > On Thu, Jun 25, 2009 at 9:58 AM, David Marginian
> wrote: > > Log trace issue? What are you talking about? > > Rio
Liu wrote: > > I think I should resolve the log trace issue first,
it would > be helpful > > On Thu, Jun 25, 2009 at 9:05 AM, David
Marginian > > >> wrote: > > I don't see how this is related to
your issue. You are > passing a > type - Boolean. This thread is
someone trying to pass Object. > > Rio Liu wrote: > > Found this
ref > >
http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
> > On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu > > > > > > >>> >
wrote: > > Hi I tried another way like > Direct Web > Remoting >
3.0//EN" " http://getahead.org/dwr//dwr30.dtd"> > > > >
> > > value="org.rio.test.TestClass"/> > > match="java.lang.Exception"/> > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > match="org.rio.test.bean.Criterion"/> > > > > > > > > > added a TestManager.search(List); , this guy > works well. > > On Thu, Jun 25, 2009 at 3:50 AM, David Marginian > > > > >>> wrote: > > Let us know the results please. > On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > > > > >>> wrote: > > OK, I'll keep investigating by your > comments. thx > > > On Thu, Jun 25, 2009 at 2:41 AM, David Marginian > > > >>> wrote: > > I would be surprised if this is not > working. If I > were you I would ensure that you changed the > deployed > file and restarted your container. I > would double > check everything and take a look at the > server logs > (internal dwr errors shoudl be logged > without the > filter). > > > On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>> wrote: > > Oh, yes, now I corrected it. but got > the same > result from server. > > > On Thu, Jun 25, 2009 at 2:34 AM, David > Marginian > > > > > >>> > > wrote: > > You have the incorrect path to > TestClass in > your signature (which is why I > originally told > you to send us your > configuration, but you > insisted it was correct - this > would have > saved us a lot of time). > In your > signature: > import org.rio.test.bean.TestClass; > In your creator: > org.rio.test.TestClass > Your > signature > should read org.rio.test.TestClass > -David > > > On Wed, Jun 24, 2009 at 12:21 > PM, Rio Liu > > > > > > >>> > > wrote: > > "-//GetAhead > Limited//DTD Direct Web Remoting > 3.0//EN" > > "http://getahead.org/dwr//dwr30.dtd"> > > > javascript="TestManager"> > > value="org.rio.test.TestManager"/> > > javascript="TestClass"> > value="org.rio.test.TestClass"/> > > > match="java.lang.Exception"/> > > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > > > > > > > > > On Thu, Jun 25, 2009 at 2:06 > AM, David > Marginian > > > > > > >>> wrote: > > Sending us your dwr.xml > would > help us > ensure you have > everything set-up > correctly. > On Wed, Jun 24, 2009 at > 12:05 PM, > David Marginian > > > > > > > >>> wrote: > > What version of dwr > are you > using? Pre 3.x the > AuditLogAjaxFilter > does not > exist. > > On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu > > > > > > > >>> > wrote: > > I try to user > > class="org.directwebremoting.filter.AuditLogAjaxFilter"/> > under allow tag to > trace the > log, but I got a > NPE :(, It > doesn't work for > me. and my > creator="new". > > > On Thu, Jun 25, > 2009 at > 1:42 > AM, David Marginian > > > > > > > >>> > > > wrote: > > Do you see > anything > in the > server logs? > The > reason I > am asking is > that it > appears that > DWR is not > using the > signature you > specified. > If not you > will see a > message that > indicated DWR is > assuming > a Map > containing a > String > key and a String > value. I > also noticed > your > method > is static. What > creator > are you using? > > > On Wed, Jun > 24, 2009 at > 11:34 AM, > Rio Liu > > > > > > > >>> > > wrote: > > 1. public > static void removeError(Map errorMap) > { > 2. if(errorMap == null) > 3. return; > 4. > Iterator> it = > errorMap.entrySet().iterator(); > 5. while(it.hasNext()) { > 6. > Entry Boolean> entry = it.next(); > 7. if(entry.getValue()) { > > //error here > 8. > // do something > 9. } > 10. } > 11. } > > > On Thu, > Jun 25, > 2009 > at 1:31 > AM, Jose > Noheda > > > > > > > >>> > > > wrote: > > > What's the Java > > counterpart? > > > On > Wed, Jun 24, > 2009 at > 7:29 PM, > Rio Liu > > > > > > > >>> > > > wrote: > > > It is very > > simple js > > object > > {2009625010703182:true} > > > > On Thu, Jun > > 25, 2009 at > 1:14 > AM, David > > Marginian > > > > > > > >>> > > > > wrote: > > > I meant > > send us > > the > > JavaScript > > object you > > are > > building, > > not the > > request. > > > > On Wed, > > Jun 24, > > 2009 at > > 11:11 AM, > > Rio Liu > > > > > > > >>> > > > > wrote: > > > callCount=1 > > windowName= > > c0-scriptName=TestClass > > c0-methodName=removeError > > > > > > > > > > > > > > > > > > c0-id=0 > > c0-e1=boolean:true > > > c0-param0=Object_Object:{20090625010703185:reference:c0-e1} > > batchId=11 > > > This > > is the > > content > > of the > > request, > > I have > > checked > > my > > dwr.xml > > , I > > think > > it's > > OK, > > for > > this > > case, > > I > > don't > > need > > to add > > a > > converter > > for > > it. > > java.lang.* > > are > > imported > > by > > default. > > > Thanks > > Rio > > > > On > > Thu, > > Jun > > 25, > > 2009 > > at > > 12:20 > > AM, > > David > > Marginian > > > > > >>> > > > > wrote: > > > Have > > you > > checked > > the > > server > > log? > Are > > you > > sure > > that > > your > > dwr > > configuration > > is > > correct > > (you > > only > > posted > > a > > snippet)? > What > > does > > the > > JavaScript > > object > > you > > are > > passing > > the > > remote > > method > > look > > like? > > > > On > > Wed, > > Jun > > 24, > > 2009 > > at > > 10:12 > > AM, > > Rio > > Liu > > > > > > >>> > > > > wrote: > > > Hi > > guys > > > I > > hava > > a > > problem. > > I > > have > > a > > signature > > config > > like > > > > > > but > > I > > always > > got > > a > > Java.lang.String > > classcastexception > > cannot > > be > > conveted > > to > > Java.lang.Boolean > > Who > > can > > help > > me > > ? > > > Thanks > > very > > much > > > Rio > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > > > > For additional commands, e-mail: > users-help@... <mailto:users-help@...> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > For additional commands, e-mail: users-help@... <mailto:users-help@...> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> For additional commands, e-mail: users-help@... <mailto:users-help@...>
|

|
Re: Java.lang.String ClassCastException
Perhaps the obfuscation does not retain generic information and DWR assumes strings. 2009/6/25 Rio Liu <rioliu@...>
Sorry for that, I want to clarify that the obfuscated jar file is not the dwr.jar. it is the jar file includes my beans. I really confuse that dwr has different behaviors
On Thu, Jun 25, 2009 at 1:13 PM, David Marginian <david@...> wrote:
Did you previously mention you were messing with the jar? It would have saved us a lot of time.
Rio Liu wrote:
David
I think I know the reason, because I used the obfuscated jar file. if I don't do the obfuscation, it works fine. now I have to change the parameter to Map<String, String> and update my impl.
On Thu, Jun 25, 2009 at 12:38 PM, David Marginian < david@... <mailto: david@...>> wrote:
I tested remoting a Map method and it works fine. The JavaScript
object I am passing is { key: true}. Rio Liu wrote: > I mean the
AuditLogAjaxFilter NPE , so I can't get the trace log from > dwr
runtime now. > > On Thu, Jun 25, 2009 at 9:58 AM, David Marginian
> wrote: > > Log trace issue? What are you talking about? > > Rio
Liu wrote: > > I think I should resolve the log trace issue first,
it would > be helpful > > On Thu, Jun 25, 2009 at 9:05 AM, David
Marginian > > >> wrote: > > I don't see how this is related to
your issue. You are > passing a > type - Boolean. This thread is
someone trying to pass Object. > > Rio Liu wrote: > > Found this
ref > >
http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
> > On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu > > > > > > >>> >
wrote: > > Hi I tried another way like > Direct Web > Remoting >
3.0//EN" " http://getahead.org/dwr//dwr30.dtd"> > > > >
> > > value="org.rio.test.TestClass"/> > > match="java.lang.Exception"/> > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > match="org.rio.test.bean.Criterion"/> > > > > > > > > > added a TestManager.search(List); , this guy > works well. > > On Thu, Jun 25, 2009 at 3:50 AM, David Marginian > > > > >>> wrote: > > Let us know the results please. > On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > > > > >>> wrote: > > OK, I'll keep investigating by your > comments. thx > > > On Thu, Jun 25, 2009 at 2:41 AM, David Marginian > > > >>> wrote: > > I would be surprised if this is not > working. If I > were you I would ensure that you changed the > deployed > file and restarted your container. I > would double > check everything and take a look at the > server logs > (internal dwr errors shoudl be logged > without the > filter). > > > On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>> wrote: > > Oh, yes, now I corrected it. but got > the same > result from server. > > > On Thu, Jun 25, 2009 at 2:34 AM, David > Marginian > > > > > >>> > > wrote: > > You have the incorrect path to > TestClass in > your signature (which is why I > originally told > you to send us your > configuration, but you > insisted it was correct - this > would have > saved us a lot of time). > In your > signature: > import org.rio.test.bean.TestClass; > In your creator: > org.rio.test.TestClass > Your > signature > should read org.rio.test.TestClass > -David > > > On Wed, Jun 24, 2009 at 12:21 > PM, Rio Liu > > > > > > >>> > > wrote: > > "-//GetAhead > Limited//DTD Direct Web Remoting > 3.0//EN" > > "http://getahead.org/dwr//dwr30.dtd"> > > > javascript="TestManager"> > > value="org.rio.test.TestManager"/> > > javascript="TestClass"> > value="org.rio.test.TestClass"/> > > > match="java.lang.Exception"/> > > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > > > > > > > > > On Thu, Jun 25, 2009 at 2:06 > AM, David > Marginian > > > > > > >>> wrote: > > Sending us your dwr.xml > would > help us > ensure you have > everything set-up > correctly. > On Wed, Jun 24, 2009 at > 12:05 PM, > David Marginian > > > > > > > >>> wrote: > > What version of dwr > are you > using? Pre 3.x the > AuditLogAjaxFilter > does not > exist. > > On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu > > > > > > > >>> > wrote: > > I try to user > > class="org.directwebremoting.filter.AuditLogAjaxFilter"/> > under allow tag to > trace the > log, but I got a > NPE :(, It > doesn't work for > me. and my > creator="new". > > > On Thu, Jun 25, > 2009 at > 1:42 > AM, David Marginian > > > > > > > >>> > > > wrote: > > Do you see > anything > in the > server logs? > The > reason I > am asking is > that it > appears that > DWR is not > using the > signature you > specified. > If not you > will see a > message that > indicated DWR is > assuming > a Map > containing a > String > key and a String > value. I > also noticed > your > method > is static. What > creator > are you using? > > > On Wed, Jun > 24, 2009 at > 11:34 AM, > Rio Liu > > > > > > > >>> > > wrote: > > 1. public > static void removeError(Map errorMap) > { > 2. if(errorMap == null) > 3. return; > 4. > Iterator> it = > errorMap.entrySet().iterator(); > 5. while(it.hasNext()) { > 6. > Entry Boolean> entry = it.next(); > 7. if(entry.getValue()) { > > //error here > 8. > // do something > 9. } > 10. } > 11. } > > > On Thu, > Jun 25, > 2009 > at 1:31 > AM, Jose > Noheda > > > > > > > >>> > > > wrote: > > > What's the Java > > counterpart? > > > On > Wed, Jun 24, > 2009 at > 7:29 PM, > Rio Liu > > > > > > > >>> > > > wrote: > > > It is very > > simple js > > object > > {2009625010703182:true} > > > > On Thu, Jun > > 25, 2009 at > 1:14 > AM, David > > Marginian > > > > > > > >>> > > > > wrote: > > > I meant > > send us > > the > > JavaScript > > object you > > are > > building, > > not the > > request. > > > > On Wed, > > Jun 24, > > 2009 at > > 11:11 AM, > > Rio Liu > > > > > > > >>> > > > > wrote: > > > callCount=1 > > windowName= > > c0-scriptName=TestClass > > c0-methodName=removeError > > > > > > > > > > > > > > > > > > c0-id=0 > > c0-e1=boolean:true > > > c0-param0=Object_Object:{20090625010703185:reference:c0-e1} > > batchId=11 > > > This > > is the > > content > > of the > > request, > > I have > > checked > > my > > dwr.xml > > , I > > think > > it's > > OK, > > for > > this > > case, > > I > > don't > > need > > to add > > a > > converter > > for > > it. > > java.lang.* > > are > > imported > > by > > default. > > > Thanks > > Rio > > > > On > > Thu, > > Jun > > 25, > > 2009 > > at > > 12:20 > > AM, > > David > > Marginian > > > > > >>> > > > > wrote: > > > Have > > you > > checked > > the > > server > > log? > Are > > you > > sure > > that > > your > > dwr > > configuration > > is > > correct > > (you > > only > > posted > > a > > snippet)? > What > > does > > the > > JavaScript > > object > > you > > are > > passing > > the > > remote > > method > > look > > like? > > > > On > > Wed, > > Jun > > 24, > > 2009 > > at > > 10:12 > > AM, > > Rio > > Liu > > > > > > >>> > > > > wrote: > > > Hi > > guys > > > I > > hava > > a > > problem. > > I > > have > > a > > signature > > config > > like > > > > > > but > > I > > always > > got > > a > > Java.lang.String > > classcastexception > > cannot > > be > > conveted > > to > > Java.lang.Boolean > > Who > > can > > help > > me > > ? > > > Thanks > > very > > much > > > Rio > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > > > > For additional commands, e-mail: > users-help@... <mailto:users-help@...> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > For additional commands, e-mail: users-help@... <mailto:users-help@...> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> For additional commands, e-mail: users-help@... <mailto:users-help@...>
|

|
Re: Java.lang.String ClassCastException
Forget my last comment... you are using a signatures section so dwr uses this instead of reflection. 2009/6/25 Lance Java <lance.java@...>
Perhaps the obfuscation does not retain generic information and DWR assumes strings.
2009/6/25 Rio Liu <rioliu@...>
Sorry for that, I want to clarify that the obfuscated jar file is not the dwr.jar. it is the jar file includes my beans. I really confuse that dwr has different behaviors
On Thu, Jun 25, 2009 at 1:13 PM, David Marginian <david@...> wrote:
Did you previously mention you were messing with the jar? It would have saved us a lot of time.
Rio Liu wrote:
David
I think I know the reason, because I used the obfuscated jar file. if I don't do the obfuscation, it works fine. now I have to change the parameter to Map<String, String> and update my impl.
On Thu, Jun 25, 2009 at 12:38 PM, David Marginian < david@... <mailto: david@...>> wrote:
I tested remoting a Map method and it works fine. The JavaScript
object I am passing is { key: true}. Rio Liu wrote: > I mean the
AuditLogAjaxFilter NPE , so I can't get the trace log from > dwr
runtime now. > > On Thu, Jun 25, 2009 at 9:58 AM, David Marginian
> wrote: > > Log trace issue? What are you talking about? > > Rio
Liu wrote: > > I think I should resolve the log trace issue first,
it would > be helpful > > On Thu, Jun 25, 2009 at 9:05 AM, David
Marginian > > >> wrote: > > I don't see how this is related to
your issue. You are > passing a > type - Boolean. This thread is
someone trying to pass Object. > > Rio Liu wrote: > > Found this
ref > >
http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
> > On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu > > > > > > >>> >
wrote: > > Hi I tried another way like > Direct Web > Remoting >
3.0//EN" " http://getahead.org/dwr//dwr30.dtd"> > > > >
> > > value="org.rio.test.TestClass"/> > > match="java.lang.Exception"/> > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > match="org.rio.test.bean.Criterion"/> > > > > > > > > > added a TestManager.search(List); , this guy > works well. > > On Thu, Jun 25, 2009 at 3:50 AM, David Marginian > > > > >>> wrote: > > Let us know the results please. > On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > > > > >>> wrote: > > OK, I'll keep investigating by your > comments. thx > > > On Thu, Jun 25, 2009 at 2:41 AM, David Marginian > > > >>> wrote: > > I would be surprised if this is not > working. If I > were you I would ensure that you changed the > deployed > file and restarted your container. I > would double > check everything and take a look at the > server logs > (internal dwr errors shoudl be logged > without the > filter). > > > On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>> wrote: > > Oh, yes, now I corrected it. but got > the same > result from server. > > > On Thu, Jun 25, 2009 at 2:34 AM, David > Marginian > > > > > >>> > > wrote: > > You have the incorrect path to > TestClass in > your signature (which is why I > originally told > you to send us your > configuration, but you > insisted it was correct - this > would have > saved us a lot of time). > In your > signature: > import org.rio.test.bean.TestClass; > In your creator: > org.rio.test.TestClass > Your > signature > should read org.rio.test.TestClass > -David > > > On Wed, Jun 24, 2009 at 12:21 > PM, Rio Liu > > > > > > >>> > > wrote: > > "-//GetAhead > Limited//DTD Direct Web Remoting > 3.0//EN" > > "http://getahead.org/dwr//dwr30.dtd"> > > > javascript="TestManager"> > > value="org.rio.test.TestManager"/> > > javascript="TestClass"> > value="org.rio.test.TestClass"/> > > > match="java.lang.Exception"/> > > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > > > > > > > > > On Thu, Jun 25, 2009 at 2:06 > AM, David > Marginian > > > > > > >>> wrote: > > Sending us your dwr.xml > would > help us > ensure you have > everything set-up > correctly. > On Wed, Jun 24, 2009 at > 12:05 PM, > David Marginian > > > > > > > >>> wrote: > > What version of dwr > are you > using? Pre 3.x the > AuditLogAjaxFilter > does not > exist. > > On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu > > > > > > > >>> > wrote: > > I try to user > > class="org.directwebremoting.filter.AuditLogAjaxFilter"/> > under allow tag to > trace the > log, but I got a > NPE :(, It > doesn't work for > me. and my > creator="new". > > > On Thu, Jun 25, > 2009 at > 1:42 > AM, David Marginian > > > > > > > >>> > > > wrote: > > Do you see > anything > in the > server logs? > The > reason I > am asking is > that it > appears that > DWR is not > using the > signature you > specified. > If not you > will see a > message that > indicated DWR is > assuming > a Map > containing a > String > key and a String > value. I > also noticed > your > method > is static. What > creator > are you using? > > > On Wed, Jun > 24, 2009 at > 11:34 AM, > Rio Liu > > > > > > > >>> > > wrote: > > 1. public > static void removeError(Map errorMap) > { > 2. if(errorMap == null) > 3. return; > 4. > Iterator> it = > errorMap.entrySet().iterator(); > 5. while(it.hasNext()) { > 6. > Entry Boolean> entry = it.next(); > 7. if(entry.getValue()) { > > //error here > 8. > // do something > 9. } > 10. } > 11. } > > > On Thu, > Jun 25, > 2009 > at 1:31 > AM, Jose > Noheda > > > > > > > >>> > > > wrote: > > > What's the Java > > counterpart? > > > On > Wed, Jun 24, > 2009 at > 7:29 PM, > Rio Liu > > > > > > > >>> > > > wrote: > > > It is very > > simple js > > object > > {2009625010703182:true} > > > > On Thu, Jun > > 25, 2009 at > 1:14 > AM, David > > Marginian > > > > > > > >>> > > > > wrote: > > > I meant > > send us > > the > > JavaScript > > object you > > are > > building, > > not the > > request. > > > > On Wed, > > Jun 24, > > 2009 at > > 11:11 AM, > > Rio Liu > > > > > > > >>> > > > > wrote: > > > callCount=1 > > windowName= > > c0-scriptName=TestClass > > c0-methodName=removeError > > > > > > > > > > > > > > > > > > c0-id=0 > > c0-e1=boolean:true > > > c0-param0=Object_Object:{20090625010703185:reference:c0-e1} > > batchId=11 > > > This > > is the > > content > > of the > > request, > > I have > > checked > > my > > dwr.xml > > , I > > think > > it's > > OK, > > for > > this > > case, > > I > > don't > > need > > to add > > a > > converter > > for > > it. > > java.lang.* > > are > > imported > > by > > default. > > > Thanks > > Rio > > > > On > > Thu, > > Jun > > 25, > > 2009 > > at > > 12:20 > > AM, > > David > > Marginian > > > > > >>> > > > > wrote: > > > Have > > you > > checked > > the > > server > > log? > Are > > you > > sure > > that > > your > > dwr > > configuration > > is > > correct > > (you > > only > > posted > > a > > snippet)? > What > > does > > the > > JavaScript > > object > > you > > are > > passing > > the > > remote > > method > > look > > like? > > > > On > > Wed, > > Jun > > 24, > > 2009 > > at > > 10:12 > > AM, > > Rio > > Liu > > > > > > >>> > > > > wrote: > > > Hi > > guys > > > I > > hava > > a > > problem. > > I > > have > > a > > signature > > config > > like > > > > > > but > > I > > always > > got > > a > > Java.lang.String > > classcastexception > > cannot > > be > > conveted > > to > > Java.lang.Boolean > > Who > > can > > help > > me > > ? > > > Thanks > > very > > much > > > Rio > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > > > > For additional commands, e-mail: > users-help@... <mailto:users-help@...> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > For additional commands, e-mail: users-help@... <mailto:users-help@...> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> For additional commands, e-mail: users-help@... <mailto:users-help@...>
|

|
Re: Java.lang.String ClassCastException
But if I don't use this, the remote method doesn't work for me On Thu, Jun 25, 2009 at 8:21 PM, Lance Java <lance.java@...> wrote:
Forget my last comment... you are using a signatures section so dwr uses this instead of reflection.
2009/6/25 Lance Java <lance.java@...>
Perhaps the obfuscation does not retain generic information and DWR assumes strings.
2009/6/25 Rio Liu <rioliu@...>
Sorry for that, I want to clarify that the obfuscated jar file is not the dwr.jar. it is the jar file includes my beans. I really confuse that dwr has different behaviors
On Thu, Jun 25, 2009 at 1:13 PM, David Marginian <david@...> wrote:
Did you previously mention you were messing with the jar? It would have saved us a lot of time.
Rio Liu wrote:
David
I think I know the reason, because I used the obfuscated jar file. if I don't do the obfuscation, it works fine. now I have to change the parameter to Map<String, String> and update my impl.
On Thu, Jun 25, 2009 at 12:38 PM, David Marginian < david@... <mailto: david@...>> wrote:
I tested remoting a Map method and it works fine. The JavaScript
object I am passing is { key: true}. Rio Liu wrote: > I mean the
AuditLogAjaxFilter NPE , so I can't get the trace log from > dwr
runtime now. > > On Thu, Jun 25, 2009 at 9:58 AM, David Marginian
> wrote: > > Log trace issue? What are you talking about? > > Rio
Liu wrote: > > I think I should resolve the log trace issue first,
it would > be helpful > > On Thu, Jun 25, 2009 at 9:05 AM, David
Marginian > > >> wrote: > > I don't see how this is related to
your issue. You are > passing a > type - Boolean. This thread is
someone trying to pass Object. > > Rio Liu wrote: > > Found this
ref > >
http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
> > On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu > > > > > > >>> >
wrote: > > Hi I tried another way like > Direct Web > Remoting >
3.0//EN" " http://getahead.org/dwr//dwr30.dtd"> > > > >
> > > value="org.rio.test.TestClass"/> > > match="java.lang.Exception"/> > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > match="org.rio.test.bean.Criterion"/> > > > > > > > > > added a TestManager.search(List); , this guy > works well. > > On Thu, Jun 25, 2009 at 3:50 AM, David Marginian > > > > >>> wrote: > > Let us know the results please. > On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > > > > >>> wrote: > > OK, I'll keep investigating by your > comments. thx > > > On Thu, Jun 25, 2009 at 2:41 AM, David Marginian > > > >>> wrote: > > I would be surprised if this is not > working. If I > were you I would ensure that you changed the > deployed > file and restarted your container. I > would double > check everything and take a look at the > server logs > (internal dwr errors shoudl be logged > without the > filter). > > > On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>> wrote: > > Oh, yes, now I corrected it. but got > the same > result from server. > > > On Thu, Jun 25, 2009 at 2:34 AM, David > Marginian > > > > > >>> > > wrote: > > You have the incorrect path to > TestClass in > your signature (which is why I > originally told > you to send us your > configuration, but you > insisted it was correct - this > would have > saved us a lot of time). > In your > signature: > import org.rio.test.bean.TestClass; > In your creator: > org.rio.test.TestClass > Your > signature > should read org.rio.test.TestClass > -David > > > On Wed, Jun 24, 2009 at 12:21 > PM, Rio Liu > > > > > > >>> > > wrote: > > "-//GetAhead > Limited//DTD Direct Web Remoting > 3.0//EN" > > "http://getahead.org/dwr//dwr30.dtd"> > > > javascript="TestManager"> > > value="org.rio.test.TestManager"/> > > javascript="TestClass"> > value="org.rio.test.TestClass"/> > > > match="java.lang.Exception"/> > > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > > > > > > > > > On Thu, Jun 25, 2009 at 2:06 > AM, David > Marginian > > > > > > >>> wrote: > > Sending us your dwr.xml > would > help us > ensure you have > everything set-up > correctly. > On Wed, Jun 24, 2009 at > 12:05 PM, > David Marginian > > > > > > > >>> wrote: > > What version of dwr > are you > using? Pre 3.x the > AuditLogAjaxFilter > does not > exist. > > On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu > > > > > > > >>> > wrote: > > I try to user > > class="org.directwebremoting.filter.AuditLogAjaxFilter"/> > under allow tag to > trace the > log, but I got a > NPE :(, It > doesn't work for > me. and my > creator="new". > > > On Thu, Jun 25, > 2009 at > 1:42 > AM, David Marginian > > > > > > > >>> > > > wrote: > > Do you see > anything > in the > server logs? > The > reason I > am asking is > that it > appears that > DWR is not > using the > signature you > specified. > If not you > will see a > message that > indicated DWR is > assuming > a Map > containing a > String > key and a String > value. I > also noticed > your > method > is static. What > creator > are you using? > > > On Wed, Jun > 24, 2009 at > 11:34 AM, > Rio Liu > > > > > > > >>> > > wrote: > > 1. public > static void removeError(Map errorMap) > { > 2. if(errorMap == null) > 3. return; > 4. > Iterator> it = > errorMap.entrySet().iterator(); > 5. while(it.hasNext()) { > 6. > Entry Boolean> entry = it.next(); > 7. if(entry.getValue()) { > > //error here > 8. > // do something > 9. } > 10. } > 11. } > > > On Thu, > Jun 25, > 2009 > at 1:31 > AM, Jose > Noheda > > > > > > > >>> > > > wrote: > > > What's the Java > > counterpart? > > > On > Wed, Jun 24, > 2009 at > 7:29 PM, > Rio Liu > > > > > > > >>> > > > wrote: > > > It is very > > simple js > > object > > {2009625010703182:true} > > > > On Thu, Jun > > 25, 2009 at > 1:14 > AM, David > > Marginian > > > > > > > >>> > > > > wrote: > > > I meant > > send us > > the > > JavaScript > > object you > > are > > building, > > not the > > request. > > > > On Wed, > > Jun 24, > > 2009 at > > 11:11 AM, > > Rio Liu > > > > > > > >>> > > > > wrote: > > > callCount=1 > > windowName= > > c0-scriptName=TestClass > > c0-methodName=removeError > > > > > > > > > > > > > > > > > > c0-id=0 > > c0-e1=boolean:true > > > c0-param0=Object_Object:{20090625010703185:reference:c0-e1} > > batchId=11 > > > This > > is the > > content > > of the > > request, > > I have > > checked > > my > > dwr.xml > > , I > > think > > it's > > OK, > > for > > this > > case, > > I > > don't > > need > > to add > > a > > converter > > for > > it. > > java.lang.* > > are > > imported > > by > > default. > > > Thanks > > Rio > > > > On > > Thu, > > Jun > > 25, > > 2009 > > at > > 12:20 > > AM, > > David > > Marginian > > > > > >>> > > > > wrote: > > > Have > > you > > checked > > the > > server > > log? > Are > > you > > sure > > that > > your > > dwr > > configuration > > is > > correct > > (you > > only > > posted > > a > > snippet)? > What > > does > > the > > JavaScript > > object > > you > > are > > passing > > the > > remote > > method > > look > > like? > > > > On > > Wed, > > Jun > > 24, > > 2009 > > at > > 10:12 > > AM, > > Rio > > Liu > > > > > > >>> > > > > wrote: > > > Hi > > guys > > > I > > hava > > a > > problem. > > I > > have > > a > > signature > > config > > like > > > > > > but > > I > > always > > got > > a > > Java.lang.String > > classcastexception > > cannot > > be > > conveted > > to > > Java.lang.Boolean > > Who > > can > > help > > me > > ? > > > Thanks > > very > > much > > > Rio > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > > > > For additional commands, e-mail: > users-help@... <mailto:users-help@...> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > For additional commands, e-mail: users-help@... <mailto:users-help@...> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> For additional commands, e-mail: users-help@... <mailto:users-help@...>
|

|
Re: Java.lang.String ClassCastException
I was suggesting that the obfuscation may have removed generic info from your classes. If you had not been using a signatures section (ie letting dwr get generic info by reflection) this would have been an issue. Since you are using a signatures section this would not matter. Hence please ignore the comment all together.
Lance 2009/6/25 Rio Liu <rioliu@...>
But if I don't use this, the remote method doesn't work for meOn Thu, Jun 25, 2009 at 8:21 PM, Lance Java <lance.java@...> wrote:
Forget my last comment... you are using a signatures section so dwr uses this instead of reflection.
2009/6/25 Lance Java <lance.java@...>
Perhaps the obfuscation does not retain generic information and DWR assumes strings.
2009/6/25 Rio Liu <rioliu@...>
Sorry for that, I want to clarify that the obfuscated jar file is not the dwr.jar. it is the jar file includes my beans. I really confuse that dwr has different behaviors
On Thu, Jun 25, 2009 at 1:13 PM, David Marginian <david@...> wrote:
Did you previously mention you were messing with the jar? It would have saved us a lot of time.
Rio Liu wrote:
David
I think I know the reason, because I used the obfuscated jar file. if I don't do the obfuscation, it works fine. now I have to change the parameter to Map<String, String> and update my impl.
On Thu, Jun 25, 2009 at 12:38 PM, David Marginian < david@... <mailto: david@...>> wrote:
I tested remoting a Map method and it works fine. The JavaScript
object I am passing is { key: true}. Rio Liu wrote: > I mean the
AuditLogAjaxFilter NPE , so I can't get the trace log from > dwr
runtime now. > > On Thu, Jun 25, 2009 at 9:58 AM, David Marginian
> wrote: > > Log trace issue? What are you talking about? > > Rio
Liu wrote: > > I think I should resolve the log trace issue first,
it would > be helpful > > On Thu, Jun 25, 2009 at 9:05 AM, David
Marginian > > >> wrote: > > I don't see how this is related to
your issue. You are > passing a > type - Boolean. This thread is
someone trying to pass Object. > > Rio Liu wrote: > > Found this
ref > >
http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
> > On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu > > > > > > >>> >
wrote: > > Hi I tried another way like > Direct Web > Remoting >
3.0//EN" " http://getahead.org/dwr//dwr30.dtd"> > > > >
> > > value="org.rio.test.TestClass"/> > > match="java.lang.Exception"/> > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > match="org.rio.test.bean.Criterion"/> > > > > > > > > > added a TestManager.search(List); , this guy > works well. > > On Thu, Jun 25, 2009 at 3:50 AM, David Marginian > > > > >>> wrote: > > Let us know the results please. > On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > > > > >>> wrote: > > OK, I'll keep investigating by your > comments. thx > > > On Thu, Jun 25, 2009 at 2:41 AM, David Marginian > > > >>> wrote: > > I would be surprised if this is not > working. If I > were you I would ensure that you changed the > deployed > file and restarted your container. I > would double > check everything and take a look at the > server logs > (internal dwr errors shoudl be logged > without the > filter). > > > On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>> wrote: > > Oh, yes, now I corrected it. but got > the same > result from server. > > > On Thu, Jun 25, 2009 at 2:34 AM, David > Marginian > > > > > >>> > > wrote: > > You have the incorrect path to > TestClass in > your signature (which is why I > originally told > you to send us your > configuration, but you > insisted it was correct - this > would have > saved us a lot of time). > In your > signature: > import org.rio.test.bean.TestClass; > In your creator: > org.rio.test.TestClass > Your > signature > should read org.rio.test.TestClass > -David > > > On Wed, Jun 24, 2009 at 12:21 > PM, Rio Liu > > > > > > >>> > > wrote: > > "-//GetAhead > Limited//DTD Direct Web Remoting > 3.0//EN" > > "http://getahead.org/dwr//dwr30.dtd"> > > > javascript="TestManager"> > > value="org.rio.test.TestManager"/> > > javascript="TestClass"> > value="org.rio.test.TestClass"/> > > > match="java.lang.Exception"/> > > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > > > > > > > > > On Thu, Jun 25, 2009 at 2:06 > AM, David > Marginian > > > > > > >>> wrote: > > Sending us your dwr.xml > would > help us > ensure you have > everything set-up > correctly. > On Wed, Jun 24, 2009 at > 12:05 PM, > David Marginian > > > > > > > >>> wrote: > > What version of dwr > are you > using? Pre 3.x the > AuditLogAjaxFilter > does not > exist. > > On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu > > > > > > > >>> > wrote: > > I try to user > > class="org.directwebremoting.filter.AuditLogAjaxFilter"/> > under allow tag to > trace the > log, but I got a > NPE :(, It > doesn't work for > me. and my > creator="new". > > > On Thu, Jun 25, > 2009 at > 1:42 > AM, David Marginian > > > > > > > >>> > > > wrote: > > Do you see > anything > in the > server logs? > The > reason I > am asking is > that it > appears that > DWR is not > using the > signature you > specified. > If not you > will see a > message that > indicated DWR is > assuming > a Map > containing a > String > key and a String > value. I > also noticed > your > method > is static. What > creator > are you using? > > > On Wed, Jun > 24, 2009 at > 11:34 AM, > Rio Liu > > > > > > > >>> > > wrote: > > 1. public > static void removeError(Map errorMap) > { > 2. if(errorMap == null) > 3. return; > 4. > Iterator> it = > errorMap.entrySet().iterator(); > 5. while(it.hasNext()) { > 6. > Entry Boolean> entry = it.next(); > 7. if(entry.getValue()) { > > //error here > 8. > // do something > 9. } > 10. } > 11. } > > > On Thu, > Jun 25, > 2009 > at 1:31 > AM, Jose > Noheda > > > > > > > >>> > > > wrote: > > > What's the Java > > counterpart? > > > On > Wed, Jun 24, > 2009 at > 7:29 PM, > Rio Liu > > > > > > > >>> > > > wrote: > > > It is very > > simple js > > object > > {2009625010703182:true} > > > > On Thu, Jun > > 25, 2009 at > 1:14 > AM, David > > Marginian > > > > > > > >>> > > > > wrote: > > > I meant > > send us > > the > > JavaScript > > object you > > are > > building, > > not the > > request. > > > > On Wed, > > Jun 24, > > 2009 at > > 11:11 AM, > > Rio Liu > > > > > > > >>> > > > > wrote: > > > callCount=1 > > windowName= > > c0-scriptName=TestClass > > c0-methodName=removeError > > > > > > > > > > > > > > > > > > c0-id=0 > > c0-e1=boolean:true > > > c0-param0=Object_Object:{20090625010703185:reference:c0-e1} > > batchId=11 > > > This > > is the > > content > > of the > > request, > > I have > > checked > > my > > dwr.xml > > , I > > think > > it's > > OK, > > for > > this > > case, > > I > > don't > > need > > to add > > a > > converter > > for > > it. > > java.lang.* > > are > > imported > > by > > default. > > > Thanks > > Rio > > > > On > > Thu, > > Jun > > 25, > > 2009 > > at > > 12:20 > > AM, > > David > > Marginian > > > > > >>> > > > > wrote: > > > Have > > you > > checked > > the > > server > > log? > Are > > you > > sure > > that > > your > > dwr > > configuration > > is > > correct > > (you > > only > > posted > > a > > snippet)? > What > > does > > the > > JavaScript > > object > > you > > are > > passing > > the > > remote > > method > > look > > like? > > > > On > > Wed, > > Jun > > 24, > > 2009 > > at > > 10:12 > > AM, > > Rio > > Liu > > > > > > >>> > > > > wrote: > > > Hi > > guys > > > I > > hava > > a > > problem. > > I > > have > > a > > signature > > config > > like > > > > > > but > > I > > always > > got > > a > > Java.lang.String > > classcastexception > > cannot > > be > > conveted > > to > > Java.lang.Boolean > > Who > > can > > help > > me > > ? > > > Thanks > > very > > much > > > Rio > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > > > > For additional commands, e-mail: > users-help@... <mailto:users-help@...> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > For additional commands, e-mail: users-help@... <mailto:users-help@...> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> For additional commands, e-mail: users-help@... <mailto:users-help@...>
|

|
Re: Java.lang.String ClassCastException
Thanks your clarification, I think it is very useful in enterprise env. On Thu, Jun 25, 2009 at 8:47 PM, Lance Java <lance.java@...> wrote:
I was suggesting that the obfuscation may have removed generic info from your classes. If you had not been using a signatures section (ie letting dwr get generic info by reflection) this would have been an issue. Since you are using a signatures section this would not matter. Hence please ignore the comment all together.
Lance2009/6/25 Rio Liu <rioliu@...>
But if I don't use this, the remote method doesn't work for meOn Thu, Jun 25, 2009 at 8:21 PM, Lance Java <lance.java@...> wrote:
Forget my last comment... you are using a signatures section so dwr uses this instead of reflection.
2009/6/25 Lance Java <lance.java@...>
Perhaps the obfuscation does not retain generic information and DWR assumes strings.
2009/6/25 Rio Liu <rioliu@...>
Sorry for that, I want to clarify that the obfuscated jar file is not the dwr.jar. it is the jar file includes my beans. I really confuse that dwr has different behaviors
On Thu, Jun 25, 2009 at 1:13 PM, David Marginian <david@...> wrote:
Did you previously mention you were messing with the jar? It would have saved us a lot of time.
Rio Liu wrote:
David
I think I know the reason, because I used the obfuscated jar file. if I don't do the obfuscation, it works fine. now I have to change the parameter to Map<String, String> and update my impl.
On Thu, Jun 25, 2009 at 12:38 PM, David Marginian < david@... <mailto: david@...>> wrote:
I tested remoting a Map method and it works fine. The JavaScript
object I am passing is { key: true}. Rio Liu wrote: > I mean the
AuditLogAjaxFilter NPE , so I can't get the trace log from > dwr
runtime now. > > On Thu, Jun 25, 2009 at 9:58 AM, David Marginian
> wrote: > > Log trace issue? What are you talking about? > > Rio
Liu wrote: > > I think I should resolve the log trace issue first,
it would > be helpful > > On Thu, Jun 25, 2009 at 9:05 AM, David
Marginian > > >> wrote: > > I don't see how this is related to
your issue. You are > passing a > type - Boolean. This thread is
someone trying to pass Object. > > Rio Liu wrote: > > Found this
ref > >
http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html
> > On Thu, Jun 25, 2009 at 8:59 AM, Rio Liu > > > > > > >>> >
wrote: > > Hi I tried another way like > Direct Web > Remoting >
3.0//EN" " http://getahead.org/dwr//dwr30.dtd"> > > > >
> > > value="org.rio.test.TestClass"/> > > match="java.lang.Exception"/> > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > match="org.rio.test.bean.Criterion"/> > > > > > > > > > added a TestManager.search(List); , this guy > works well. > > On Thu, Jun 25, 2009 at 3:50 AM, David Marginian > > > > >>> wrote: > > Let us know the results please. > On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > > > > >>> wrote: > > OK, I'll keep investigating by your > comments. thx > > > On Thu, Jun 25, 2009 at 2:41 AM, David Marginian > > > >>> wrote: > > I would be surprised if this is not > working. If I > were you I would ensure that you changed the > deployed > file and restarted your container. I > would double > check everything and take a look at the > server logs > (internal dwr errors shoudl be logged > without the > filter). > > > On Wed, Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>> wrote: > > Oh, yes, now I corrected it. but got > the same > result from server. > > > On Thu, Jun 25, 2009 at 2:34 AM, David > Marginian > > > > > >>> > > wrote: > > You have the incorrect path to > TestClass in > your signature (which is why I > originally told > you to send us your > configuration, but you > insisted it was correct - this > would have > saved us a lot of time). > In your > signature: > import org.rio.test.bean.TestClass; > In your creator: > org.rio.test.TestClass > Your > signature > should read org.rio.test.TestClass > -David > > > On Wed, Jun 24, 2009 at 12:21 > PM, Rio Liu > > > > > > >>> > > wrote: > > "-//GetAhead > Limited//DTD Direct Web Remoting > 3.0//EN" > > "http://getahead.org/dwr//dwr30.dtd"> > > > javascript="TestManager"> > > value="org.rio.test.TestManager"/> > > javascript="TestClass"> > value="org.rio.test.TestClass"/> > > > match="java.lang.Exception"/> > > match="org.rio.test.bean.Message"/> > match="org.rio.test.bean.Note"/> > > > > > > > > > > On Thu, Jun 25, 2009 at 2:06 > AM, David > Marginian > > > > > > >>> wrote: > > Sending us your dwr.xml > would > help us > ensure you have > everything set-up > correctly. > On Wed, Jun 24, 2009 at > 12:05 PM, > David Marginian > > > > > > > >>> wrote: > > What version of dwr > are you > using? Pre 3.x the > AuditLogAjaxFilter > does not > exist. > > On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu > > > > > > > >>> > wrote: > > I try to user > > class="org.directwebremoting.filter.AuditLogAjaxFilter"/> > under allow tag to > trace the > log, but I got a > NPE :(, It > doesn't work for > me. and my > creator="new". > > > On Thu, Jun 25, > 2009 at > 1:42 > AM, David Marginian > > > > > > > >>> > > > wrote: > > Do you see > anything > in the > server logs? > The > reason I > am asking is > that it > appears that > DWR is not > using the > signature you > specified. > If not you > will see a > message that > indicated DWR is > assuming > a Map > containing a > String > key and a String > value. I > also noticed > your > method > is static. What > creator > are you using? > > > On Wed, Jun > 24, 2009 at > 11:34 AM, > Rio Liu > > > > > > > >>> > > wrote: > > 1. public > static void removeError(Map errorMap) > { > 2. if(errorMap == null) > 3. return; > 4. > Iterator> it = > errorMap.entrySet().iterator(); > 5. while(it.hasNext()) { > 6. > Entry Boolean> entry = it.next(); > 7. if(entry.getValue()) { > > //error here > 8. > // do something > 9. } > 10. } > 11. } > > > On Thu, > Jun 25, > 2009 > at 1:31 > AM, Jose > Noheda > > > > > > > >>> > > > wrote: > > > What's the Java > > counterpart? > > > On > Wed, Jun 24, > 2009 at > 7:29 PM, > Rio Liu > > > > > > > >>> > > > wrote: > > > It is very > > simple js > > object > > {2009625010703182:true} > > > > On Thu, Jun > > 25, 2009 at > 1:14 > AM, David > > Marginian > > > > > > > >>> > > > > wrote: > > > I meant > > send us > > the > > JavaScript > > object you > > are > > building, > > not the > > request. > > > > On Wed, > > Jun 24, > > 2009 at > > 11:11 AM, > > Rio Liu > > > > > > > >>> > > > > wrote: > > > callCount=1 > > windowName= > > c0-scriptName=TestClass > > c0-methodName=removeError > > > > > > > > > > > > > > > > > > c0-id=0 > > c0-e1=boolean:true > > > c0-param0=Object_Object:{20090625010703185:reference:c0-e1} > > batchId=11 > > > This > > is the > > content > > of the > > request, > > I have > > checked > > my > > dwr.xml > > , I > > think > > it's > > OK, > > for > > this > > case, > > I > > don't > > need > > to add > > a > > converter > > for > > it. > > java.lang.* > > are > > imported > > by > > default. > > > Thanks > > Rio > > > > On > > Thu, > > Jun > > 25, > > 2009 > > at > > 12:20 > > AM, > > David > > Marginian > > > > > >>> > > > > wrote: > > > Have > > you > > checked > > the > > server > > log? > Are > > you > > sure > > that > > your > > dwr > > configuration > > is > > correct > > (you > > only > > posted > > a > > snippet)? > What > > does > > the > > JavaScript > > object > > you > > are > > passing > > the > > remote > > method > > look > > like? > > > > On > > Wed, > > Jun > > 24, > > 2009 > > at > > 10:12 > > AM, > > Rio > > Liu > > > > > > >>> > > > > wrote: > > > Hi > > guys > > > I > > hava > > a > > problem. > > I > > have > > a > > signature > > config > > like > > > > > > but > > I > > always > > got > > a > > Java.lang.String > > classcastexception > > cannot > > be > > conveted > > to > > Java.lang.Boolean > > Who > > can > > help > > me > > ? > > > Thanks > > very > > much > > > Rio > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > > > > For additional commands, e-mail: > users-help@... <mailto:users-help@...> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> > > For additional commands, e-mail: users-help@... <mailto:users-help@...> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... <mailto:users-unsubscribe@...> For additional commands, e-mail: users-help@... <mailto:users-help@...>
|

|
Re: Java.lang.String ClassCastException
My guess is that you are having a problem because the method is static.
I have heard of obfuscators munging static method names.
Rio Liu wrote:
> Thanks your clarification, I think it is very useful in enterprise env.
>
> On Thu, Jun 25, 2009 at 8:47 PM, Lance Java < lance.java@...
> <mailto: lance.java@...>> wrote:
>
> I was suggesting that the obfuscation may have removed generic
> info from your classes. If you had not been using a signatures
> section (ie letting dwr get generic info by reflection) this would
> have been an issue. Since you are using a signatures section this
> would not matter. Hence please ignore the comment all together.
>
> Lance
>
>
> 2009/6/25 Rio Liu < rioliu@... <mailto: rioliu@...>>
>
> But if I don't use this, the remote method doesn't work for me
>
>
> On Thu, Jun 25, 2009 at 8:21 PM, Lance Java
> < lance.java@... <mailto: lance.java@...>>
> wrote:
>
> Forget my last comment... you are using a signatures
> section so dwr uses this instead of reflection.
>
> 2009/6/25 Lance Java < lance.java@...
> <mailto: lance.java@...>>
>
> Perhaps the obfuscation does not retain generic
> information and DWR assumes strings.
>
> 2009/6/25 Rio Liu < rioliu@...
> <mailto: rioliu@...>>
>
> Sorry for that, I want to clarify that the
> obfuscated jar file is not the dwr.jar. it is the
> jar file includes my beans. I really confuse that
> dwr has different behaviors
>
>
> On Thu, Jun 25, 2009 at 1:13 PM, David Marginian
> < david@... <mailto: david@...>>
> wrote:
>
> Did you previously mention you were messing
> with the jar? It would have saved us a lot of
> time.
>
> Rio Liu wrote:
>
> David
>
> I think I know the reason, because I used
> the obfuscated jar file. if I don't do the
> obfuscation, it works fine. now I have to
> change the parameter to Map<String,
> String> and update my impl.
>
> On Thu, Jun 25, 2009 at 12:38 PM, David
> Marginian < david@...
> <mailto: david@...>
> <mailto: david@...
> <mailto: david@...>>> wrote:
>
> I tested remoting a Map method and it
> works fine. The JavaScript
> object I am passing is { key: true}.
> Rio Liu wrote: > I mean the
> AuditLogAjaxFilter NPE , so I can't get
> the trace log from > dwr
> runtime now. > > On Thu, Jun 25, 2009
> at 9:58 AM, David Marginian
> > wrote: > > Log trace issue? What are
> you talking about? > > Rio
> Liu wrote: > > I think I should resolve
> the log trace issue first,
> it would > be helpful > > On Thu, Jun
> 25, 2009 at 9:05 AM, David
> Marginian > > >> wrote: > > I don't see
> how this is related to
> your issue. You are > passing a > type
> - Boolean. This thread is
> someone trying to pass Object. > > Rio
> Liu wrote: > > Found this
> ref > >
>
> http://www.nabble.com/RE:-Trouble-with-Converters-%28Map%3CString,-Object%3E%29-td14252203.html> > > On Thu, Jun 25, 2009 at 8:59 AM,
> Rio Liu > > > > > > >>> >
> wrote: > > Hi I tried another way like
> > Direct Web > Remoting >
> 3.0//EN"
> " http://getahead.org/dwr//dwr30.dtd"> > > > >
>
> > > > value="org.rio.test.TestClass"/> > >
> match="java.lang.Exception"/> >
> match="org.rio.test.bean.Message"/> >
> match="org.rio.test.bean.Note"/> > >
> match="org.rio.test.bean.Criterion"/> > > > >
> > > > > > added a TestManager.search(List); ,
> this guy > works well. > > On Thu, Jun 25,
> 2009 at 3:50 AM, David Marginian > > > > >>>
> wrote: > > Let us know the results please. >
> On Wed, Jun 24, 2009 at 12:43 PM, Rio Liu > >
> > > >>> wrote: > > OK, I'll keep investigating
> by your > comments. thx > > > On Thu, Jun 25,
> 2009 at 2:41 AM, David Marginian > > > >>>
> wrote: > > I would be surprised if this is not
> > working. If I > were you I would ensure that
> you changed the > deployed > file and
> restarted your container. I > would double >
> check everything and take a look at the >
> server logs > (internal dwr errors shoudl be
> logged > without the > filter). > > > On Wed,
> Jun 24, 2009 at 12:36 PM, Rio Liu > > > > >>>
> wrote: > > Oh, yes, now I corrected it. but
> got > the same > result from server. > > > On
> Thu, Jun 25, 2009 at 2:34 AM, David >
> Marginian > > > > > >>> > > wrote: > > You
> have the incorrect path to > TestClass in >
> your signature (which is why I > originally
> told > you to send us your > configuration,
> but you > insisted it was correct - this >
> would have > saved us a lot of time). > In
> your > signature: > import
> org.rio.test.bean.TestClass; > In your
> creator: > org.rio.test.TestClass > Your >
> signature > should read org.rio.test.TestClass
> > -David > > > On Wed, Jun 24, 2009 at 12:21 >
> PM, Rio Liu > > > > > > >>> > > wrote: > >
> "-//GetAhead > Limited//DTD Direct Web
> Remoting > 3.0//EN" > >
> " http://getahead.org/dwr//dwr30.dtd"> > > >
> javascript="TestManager"> > >
> value="org.rio.test.TestManager"/> > >
> javascript="TestClass"> >
> value="org.rio.test.TestClass"/> > > >
> match="java.lang.Exception"/> > >
> match="org.rio.test.bean.Message"/> >
> match="org.rio.test.bean.Note"/> > > > > > > >
> > > > On Thu, Jun 25, 2009 at 2:06 > AM, David
> > Marginian > > > > > > >>> wrote: > > Sending
> us your dwr.xml > would > help us > ensure you
> have > everything set-up > correctly. > On
> Wed, Jun 24, 2009 at > 12:05 PM, > David
> Marginian > > > > > > > >>> wrote: > > What
> version of dwr > are you > using? Pre 3.x the
> > AuditLogAjaxFilter > does not > exist. > >
> On Wed, Jun 24, 2009 at 11:59 AM, > Rio Liu >
> > > > > > > >>> > wrote: > > I try to user > >
> class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
> > under allow tag to > trace the > log, but I
> got a > NPE :(, It > doesn't work for > me.
> and my > creator="new". > > > On Thu, Jun 25,
> > 2009 at > 1:42 > AM, David Marginian > > > >
> > > > >>> > > > wrote: > > Do you see >
> anything > in the > server logs? > The >
> reason I > am asking is > that it > appears
> that > DWR is not > using the > signature you
> > specified. > If not you > will see a >
> message that > indicated DWR is > assuming > a
> Map > containing a > String > key and a String
> > value. I > also noticed > your > method > is
> static. What > creator > are you using? > > >
> On Wed, Jun > 24, 2009 at > 11:34 AM, > Rio
> Liu > > > > > > > >>> > > wrote: > > 1. public
> > static void removeError(Map errorMap) > { >
> 2. if(errorMap == null) > 3. return; > 4. >
> Iterator> it = >
> errorMap.entrySet().iterator(); > 5.
> while(it.hasNext()) { > 6. > Entry Boolean>
> entry = it.next(); > 7. if(entry.getValue()) {
> > > //error here > 8. > // do something > 9. }
> > 10. } > 11. } > > > On Thu, > Jun 25, > 2009
> > at 1:31 > AM, Jose > Noheda > > > > > > >
> >>> > > > wrote: > > > What's the Java > >
> counterpart? > > > On > Wed, Jun 24, > 2009 at
> > 7:29 PM, > Rio Liu > > > > > > > >>> > > >
> wrote: > > > It is very > > simple js > >
> object > > {2009625010703182:true} > > > > On
> Thu, Jun > > 25, 2009 at > 1:14 > AM, David >
> > Marginian > > > > > > > >>> > > > > wrote: >
> > > I meant > > send us > > the > > JavaScript
> > > object you > > are > > building, > > not
> the > > request. > > > > On Wed, > > Jun 24, >
> > 2009 at > > 11:11 AM, > > Rio Liu > > > > >
> > > >>> > > > > wrote: > > > callCount=1 > >
> windowName= > > c0-scriptName=TestClass > >
> c0-methodName=removeError > > > > > > > > > >
> > > > > > > > > c0-id=0 > > c0-e1=boolean:true
> > > >
> c0-param0=Object_Object:{20090625010703185:reference:c0-e1}
> > > batchId=11 > > > This > > is the > >
> content > > of the > > request, > > I have > >
> checked > > my > > dwr.xml > > , I > > think >
> > it's > > OK, > > for > > this > > case, > >
> I > > don't > > need > > to add > > a > >
> converter > > for > > it. > > java.lang.* > >
> are > > imported > > by > > default. > > >
> Thanks > > Rio > > > > On > > Thu, > > Jun > >
> 25, > > 2009 > > at > > 12:20 > > AM, > >
> David > > Marginian > > > > > >>> > > > >
> wrote: > > > Have > > you > > checked > > the
> > > server > > log? > Are > > you > > sure > >
> that > > your > > dwr > > configuration > > is
> > > correct > > (you > > only > > posted > > a
> > > snippet)? > What > > does > > the > >
> JavaScript > > object > > you > > are > >
> passing > > the > > remote > > method > > look
> > > like? > > > > On > > Wed, > > Jun > > 24,
> > > 2009 > > at > > 10:12 > > AM, > > Rio > >
> Liu > > > > > > >>> > > > > wrote: > > > Hi >
> > guys > > > I > > hava > > a > > problem. > >
> I > > have > > a > > signature > > config > >
> like > > > > > > but > > I > > always > > got
> > > a > > Java.lang.String > >
> classcastexception > > cannot > > be > >
> conveted > > to > > Java.lang.Boolean > > Who
> > > can > > help > > me > > ? > > > Thanks > >
> very > > much > > > Rio > > > > > > > > > > >
> > > > > > > > > > > > > >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> <mailto: users-unsubscribe@...
> <mailto: users-unsubscribe@...>> >
> > > > > For additional commands, e-mail: >
> users-help@...
> <mailto: users-help@...>
> <mailto: users-help@...
> <mailto: users-help@...>> > > > >
> > > >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> <mailto: users-unsubscribe@...
> <mailto: users-unsubscribe@...>> >
> > For additional commands, e-mail:
> users-help@...
> <mailto: users-help@...>
> <mailto: users-help@...
> <mailto: users-help@...>> > > >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> <mailto: users-unsubscribe@...
> <mailto: users-unsubscribe@...>>
> For additional commands, e-mail:
> users-help@...
> <mailto: users-help@...>
> <mailto: users-help@...
> <mailto: users-help@...>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@...
> <mailto: users-unsubscribe@...>
> For additional commands, e-mail:
> users-help@...
> <mailto: users-help@...>
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|