|
gae-xstream.patch - Adds AppEngineXStream.java Thoughts? gae-xstream2.patch same idea, refactored to mean less code in subclass I am trying to use XStream 1.4 SNAPSHOT jar on Google AppEngine. Creating an XStream object causes this: Caused by: java.lang.SecurityException: java.lang.IllegalAccessException: Reflection is not allowed on private java.lang.String java.text.AttributedCharacterIterator$Attribute.name Are there any plans to commit Paul Hammant's patch (gae-xstream2.patch) ? @Sean: Did you see Paul's and my conversation on the dev list? Actually I don't like to add another specialized facade, but improve the runtime behaviour of the XStream facade itself. However, I don't know currently how I can detect that I am running GAE, since the environment identifies itself as standard Sun 1.6 JVM. I examined Paul Hammant's patch (gae2-xstream.patch) and incoporated the code into a new patch. Using my patch, I built a custom XStream jar and deployed it in an App Engine application. I have not found any problems (yet). Please examine gae3-xstream.patch and let me know if the code is acceptable. I'm tried the attached jar, and it failed on local development server. Trying to convert some JSF component to XML raised that: java.security.AccessControlException: access denied (java.io.SerializablePermission enableSubclassImplementation) Is there some configuration I missed in order to make xstream working with gae? Jörg, Have you had time to review the patch that I submitted on August 2nd? https://jira.codehaus.org/secure/attachment/43548/gae3-xstream.patch @Sean, yes I had a look, that's exactly what I had in mind in first place. It's just that I am currently in the middle of the work for a different area of XStream and I had no time to come back to GAE compatibility. The only thing that itches me still is, that this looks all like a standard environment with a SecurityManager similar using XStream in an applet. In this case it might be possible as alternative to check the runtime permissions in a general way. Barak's issue with the SerializationConverter makes me think about this alternative. Any progress on this issue? I have patched 1.3.1-src download of XStream with the gae3-xstream.patch and it doesn't seem to work with app engine 1.2.5. The exception is below. Basically I am not allowed to create a CustomObjectInputStream due to permissioning issues. I am attempting to parse an XML file containing a list of XStreamed data objects. Thanks, John java.security.AccessControlException: access denied (java.io.SerializablePermission enableSubclassImplementation) Hi John, as long as you cannot grant more permissions for an app on GAE, it is not possible to use the SerializationProvider nor will the XStream.createObjectInputStream/XStream.createObjectOutputStream work. However, this is nothing XStream can do about - except for not registering the SerializationConverter also.
Jörg, I understand the problem and can see its not straightforward to fix. In case its useful to anyone else I will point out that if its possible for your application if you change from using an Input/Output Pity XStream and GAE can't work together better yet, hopefully as GAE evolves it will be possible. XStream is an incredibly useful library. Cheers, John Hi all, I just improve the patch (file gae4-xstream.patch and xstream-1.4-SNAPSHOT-GAE.jar) for XStream 1.4 version. The jar attach to this issue is working in a GAE App. Best regards I've just tested the 1.4 patch, and I was unable to convert an XML representation to an object instance, having the following exception: java.lang.NoClassDefFoundError: sun.reflect.ReflectionFactory is a restricted class. I'm using gae 1.3. Best regards |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paul, I think this was the wrong patch. IMHO the second one, you've sent to the list makes this one obsolete anyway.