File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSON plugin ignoring some types

 
Emir Bugra Koksalan
Greenhorn
Posts: 9
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic