This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

jibx binding Error: Nonstatic field name not found in

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I'm trying to use jibx to bind MemberDetailsRequest and MemberDetailsResponse java objects.
Every time I clean my project the following error occurs:-

[bind] Error: Nonstatic field name not found in class org.bk.memberservice.message.MemberDetailsResponse; on value element at (line 11, col 38, in memberservice_jibx_binding.xml)
[bind] Error: Nonstatic field city not found in class org.bk.memberservice.message.MemberDetailsResponse; on value element at (line 12, col 38, in memberservice_jibx_binding.xml)
[bind] Error: Nonstatic field phone not found in class org.bk.memberservice.message.MemberDetailsResponse; on value element at (line 13, col 40, in memberservice_jibx_binding.xml)
[bind] Error: Nonstatic field state not found in class org.bk.memberservice.message.MemberDetailsResponse; on value element at (line 14, col 40, in memberservice_jibx_binding.xml)
[bind] Error running binding compiler
[bind] org.jibx.runtime.JiBXException: Binding memberservice_jibx_binding.xml is unusable because of validation errors

I'm using the following code:-

file:memberservice_jibx_binding.xml


file:MemberDetailsRequest.java


file:MemberDetailsResponse.java


file:MemberDetail.java


file:build.xml


Has anybody got any ideas on this

Mat
 
Mat Anthony
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just found out that memberservice_jibx_binding.xml should contain:-
<structure field="memberDetail" name="memberDetail" ordered="false">

I now get the following error on running my junit test.

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshaller' defined in class path resource [applicationContext-memberservice.xml]: Invocation of init method failed; nested exception is org.springframework.oxm.jibx.JibxSystemException: Binding information for class org.bk.memberservice.message.MemberDetailsResponse must be regenerated with current binding compiler; nested exception is org.jibx.runtime.JiBXException: Binding information for class org.bk.memberservice.message.MemberDetailsResponse must be regenerated with current binding compiler
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
... 51 more
Caused by: org.springframework.oxm.jibx.JibxSystemException: Binding information for class org.bk.memberservice.message.MemberDetailsResponse must be regenerated with current binding compiler; nested exception is org.jibx.runtime.JiBXException: Binding information for class org.bk.memberservice.message.MemberDetailsResponse must be regenerated with current binding compiler
at org.springframework.oxm.jibx.JibxMarshaller.afterPropertiesSet(JibxMarshaller.java:137)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 61 more
Caused by: org.jibx.runtime.JiBXException: Binding information for class org.bk.memberservice.message.MemberDetailsResponse must be regenerated with current binding compiler
at org.jibx.runtime.BindingDirectory.getFactoryFromName(BindingDirectory.java:134)
at org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:211)
at org.springframework.oxm.jibx.JibxMarshaller.afterPropertiesSet(JibxMarshaller.java:133)
... 63 more

My applicationContext-memberservice.xml is as follows:-


file: GetMemberDetailsEndpoint.java


Has anybody seen this type of error, if so how do you sole it.

Mat
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic