• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSON plugin ignoring some types

 
Greenhorn
Posts: 9
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody.
I'm using struts and json plugin. I have a class that have some properties and properties have type of org.joda.time.DateTimeFieldType. Json plugin trying to convert all classes to json and of course DAteTimeFieldType's properties too. Some properties which in the DateTimeFieldType has StandardDateTimeFieldType and this class is private and json plugin throws illegal access exception of course :'( I dont want that. Struts must not look at deep of every class.

I used xwork-conversion-properties but no good result. My xwork file is:

org.joda.time.DateTimeFieldType = org.kodmanyagha.strutsexample.StandardDateTimeFieldTypeConverter
org.joda.time.DateTimeFieldType.StandardDateTimeFieldType = org.kodmanyagha.strutsexample.StandardDateTimeFieldTypeConverter

How can I block struts when coming to DateTimeFieldType?

I will break my head at last Please help meeee
 
Emir Bugra Koksalan
Greenhorn
Posts: 9
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot write the error:

Class org.apache.struts2.json.JSONWriter can not access a member of class org.joda.time.DateTimeFieldType$StandardDateTimeFieldType with modifiers "public"

I hope somebody got that error and solved...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic