History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-431
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Joerg Schaible
Reporter: Rico Neubauer
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
XStream

xStream unable to use Sun14ReflectionProvider with SAP VM

Created: 19/Sep/07 06:45 AM   Updated: 25/Feb/08 05:01 PM
Component/s: Core
Affects Version/s: 1.2.2
Fix Version/s: 1.3

Issue Links:
Duplicate
 

JDK version and platform: SAP AG 5.1.0717


 Description  « Hide
Hi,
There is a VM from SAP, which is not
The XStream Library includes code that checks the Vendor name of the VM
und depending on that, different reflection providers are used.

In class com.thoughtworks.xstream.core.JVM (example for sun):
private static boolean isSun() {
    return System.getProperty("java.vm.vendor").indexOf("Sun") != -1;
}
or comparable demands in the same class for VMs of IBM, HP and others.
private boolean canUseSun14ReflectionProvider() {
    return (isSun() || isApple() || isHPUX() || isIBM() || isBlackdown() || isBEAWithUnsafeSupport() || isHitachi()) && is14() && loadClass "sun.misc.Unsafe") != null;
}

The SAP JVM will not be identified from this check and as a result, a the PureJavaReflectionProvider is used, which does not support all features.

adding a check for "SAP AG" results in the Sun14ReflectionProvider being used without problems, so imho this can be easily and safely added.

For your information, here what the System-Properties return:
VM-Version: 5.1.0717
VM-Vendor: SAP AG

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Joerg Schaible - 01/Oct/07 12:13 PM
Hi Rico,

is there any chance to get a copy of this JVM? It seems currently not available as download, at least not here: https://www.sdn.sap.com/irj/sdn/downloads?rid=/library/uuid/da699d27-0b01-0010-99b0-f11458f31ef2. Since we do some highly unportable stuff in enhanced mode, we'd like to make our tests. E.g. for JRockit support BEA itself provided patches.

- Jörg

Norbert Kuck - 10/Oct/07 05:33 AM
Hi Joerg,

it seems that it is currently a little difficult to download a copy of the VM (mainly because it is delivered as part of the application server), but I could provide you with a prerelease copy of just the VM itself directly from SAP development. I have sent you a mail explaining the details.

Greetings - Norbert

Joerg Schaible - 11/Oct/07 12:15 PM
Verified (thanks to Norbert Kuck by SAP). Works fine. Directly supported now in head revision.

Rico Neubauer - 13/Oct/07 12:52 PM
Thanks Jörg and Norbert :)

Joerg Schaible - 25/Feb/08 05:01 PM
Closing issues before next release.