• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

jibx binding Error: Nonstatic field name not found in

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!