• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Creating new field in a bean

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to add a new field (losowner) to a bean but apparently I'm doing it wrong because JBOSS gives me the following error:

ey.api.client.ClientHandlerException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "losowner" (Class com.voxportal.web.asset.LineOfServiceBean), not marked as ignorable
at [Source: java.io.ByteArrayInputStream@2e81863b; line: 1, column: 830] (through reference chain: com.voxportal.web.asset.AssetSearchBean["assetBeans"]->com.voxportal.web.asset.AssetBean["lineOfServiceBean"]->com.voxportal.web.asset.LineOfServiceBean["losowner"])

The code for LineOfServiceBean and VoxLineOfService are below:



 
Sheriff
Posts: 7113
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This will probably do better in the JBoss forum, moving.
 
Sheriff
Posts: 17065
298
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not a JBoss issue. It has to do with Jackson, the JSON libary you are using.


ey.api.client.ClientHandlerException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "losowner" (Class com.voxportal.web.asset.LineOfServiceBean),


Search the internet for that error message and I'm sure it'll turn up suggestions on what you can do to resolve the issue.

Try to learn how to spot things like that in stack traces -- these kind of things happen all the time and being able to diagnose a problem is the first step towards self-sufficiency. If you get really stuck, at least you will be able to ShowSomeEffort (←click on that link) before asking for help.
 
Michael Piaser
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't post this in JBOSS - it was moved there for me. I saw the error and I have spent many hours trying to figure out why it says that field is not in the bean when I am adding it there. Hence, the question of how do you add a field into a bean. If a bean is inheriting it's "beanship" from other beans, does the field have to be defined to the other beans too?
 
Knute Snortum
Sheriff
Posts: 7113
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Michael Piaser wrote:I didn't post this in JBOSS - it was moved there for me.



Would you like me to move it to Java in General?
 
Michael Piaser
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably General is a better placement unless there is a forum specifically for Beans.
 
Junilu Lacar
Sheriff
Posts: 17065
298
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The only thing I can think of is that you have an older LineOfServiceBean.class file hanging around somewhere. Try cleaning out your target directory of all .class files and rebuild/recompile everything. If you're using Maven then do mvn clean first.
 
Sheriff
Posts: 22682
128
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Junilu may be right, because I don't see any other reason you'd get this error. Besides checking for .class files, also check for any lingering .jar files you forgot you placed that include the class.
 
What's gotten into you? Could it be this tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic