« Return to Thread: Error marshalling java.lang.Object - Variable arguments support

Re: Error marshalling java.lang.Object - Variable arguments support

by Joe Walker-3 :: Rate this Message:

Reply to Author | View in Thread


Unfortunately DWR does not handle varargs methods currently. There is an issue open (http://getahead.org/bugs/browse/DWR-80) which we're hoping to fix for 3.0

Joe.

On Wed, Mar 5, 2008 at 5:56 AM, Duppio <oneband@...> wrote:

I'm in trouble. The "Marshalling Exception" was occured.

detail exception messages are this :
org.directwebremoting.extend.MarshallException: Error marshalling
java.lang.Object: No converter found for 'class java.lang.Object'. See the
logs for more details.
       at
org.directwebremoting.dwrp.DefaultConverterManager.convertInbound(DefaultConverterManager.java:147)
       at
org.directwebremoting.convert.ArrayConverter.convertInbound(ArrayConverter.java:93)
       at
org.directwebremoting.dwrp.DefaultConverterManager.convertInbound(DefaultConverterManager.java:159)
       at
org.directwebremoting.dwrp.BaseCallMarshaller.marshallInbound(BaseCallMarshaller.java:155)

The java method that called by DWR is this :
   public static String format(String pattern, Object ... arguments) {
       MessageFormat temp = new MessageFormat(pattern);
       return temp.format(arguments);
   }
This method is included in java.text.MessageFormat.

javascript is this:
       var args = "Test";

       MessageFormat.format ("This is a {0}", args, {
           callback:function(data) {
               alert(data);
           }, errorHandling:function(message) { alert(message); }
       });

The "format" method in MessageFormat has two arguments. The one is "String
pattern". The Other is "Object ... arguments". This error is occured at
"Object ... arguments".

Maybe "Variable-length argument" make a problem in DWR, converting
javascript object to Java object.

Doesn't DWR support the "Variable-length argument" of JDK 1.5? Is there
anyone help me?
--
View this message in context: http://www.nabble.com/Error-marshalling-java.lang.Object---Variable-arguments-support-tp15843780p15843780.html
Sent from the DWR - Users mailing list archive at Nabble.com.


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


 « Return to Thread: Error marshalling java.lang.Object - Variable arguments support