Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7092959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:22:46+00:00 2026-05-28T08:22:46+00:00

I use AutoBean to code/decode data to JSON and that was all right in

  • 0

I use AutoBean to code/decode data to JSON and that was all right in previous GWT versions. In my opinion AutoBean is very good and convenient tool to deal with JSON. Since GWT ver.2.4.0 this functionality has changed and I spent some time to restore it in my code. But only one part stays still unfixed – annotation @PropertyName. This annotation is used to add an “alias” to properties. It saves a lot of network traffic. And now it throws an exception. The code example is below:

import com.google.web.bindery.autobean.shared.AutoBean.PropertyName;

public interface IPersonInfo {

    // Name
    @PropertyName("n")
    public String getName();
    public void setName(String name);

    // Surname
    @PropertyName("s")
    public String getSurname();
    public void setSurname(String surname);

    // other properties...
}

Then I try to decode this to JSON in this way:

AutoBean<IPersonInfo> user = factory.user();

// clone the userDto (it's a new way to clone an object in ver 2.4.0
// instad of deprecated clone() method)
Splittable data = AutoBeanCodex.encode(user);
IPersonInfo userDto = AutoBeanCodex.decode(factory, IPersonInfo.class, data).as();

userDto.setName("Name");
userDto.setSurname("Surname");
//... other properties

This piece of code worked perfectly in legacy code. But now (in GWT 2.4.0) I get an exception:

java.lang.IllegalArgumentException: name
    at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl.doCoderFor(AutoBeanCodexImpl.java:524)
    at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:276)
    at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.setProperty(ProxyAutoBean.java:253)
    at com.google.web.bindery.autobean.vm.impl.BeanMethod$3.invoke(BeanMethod.java:103)
    at com.google.web.bindery.autobean.vm.impl.SimpleBeanHandler.invoke(SimpleBeanHandler.java:43)
    at $Proxy74.setName(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:104)
    at com.google.web.bindery.autobean.vm.impl.ShimHandler.invoke(ShimHandler.java:81)
    at $Proxy74.setName(Unknown Source)

If I remove the @PropertyName from my interface, then the exception won’t occur.

I still waiting, that the official documentation will be updated, but it still stays with old code examples.

Can someone help me to solve this issue? Thank you for advice.

I use GWT ver. 2.4.0, GAE ver. 1.6.1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:22:46+00:00Added an answer on May 28, 2026 at 8:22 am

    I needed to put @PropertyName(“XXXX”) on my set methods as well. Give it a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use a data acquisition card to take readings from a device that increases
use Data::Dumper; %hash = ( Key => {test => [[testvalue, 10], [testvalue, 20]]}, Key2
Use case example: Client A comes to request sales information, enters their zip code
use case example I have a servlet that is receiving login requests. If a
Use a hidden field will fix my issue... i got it.. Hi All, I
Use of Unassigned local variable 'model'. Is what error message I'm getting. Its right
If I used Autobean on GWT client to serialise my POJO (sent out thro
Use case: we have some project meta-data files which we want tracked, but are
use ThreadPool.QueueUserWorkItem (WaitCallback, Object) to start a thread with my target method and data.
I use Qt 4.4.2 in Visual Studio 2008. When I am writing code, IntelliSense

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.