does Jamvm provide implementation of getAnnotation API of java.lang.reflect.Field

View: New views
2 Messages — Rating Filter:   Alert me  

does Jamvm provide implementation of getAnnotation API of java.lang.reflect.Field

by alk.shr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am  is using sun RI of JAXB 2.0  for XML binding. while trying to run application using Jamvm and GNU classpath version 0.98,  i am getting below mentioned exception. It seems that getAnnotation API of java.lang.reflect.Field class is not implemented by Jamvm.

java.lang.UnsatisfiedLinkError: getAnnotation
   at java.lang.reflect.VMField.getAnnotation(Native Method)
   at java.lang.reflect.Field.getAnnotation(Field.java:715)
   at java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObject.java:231)
   at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.hasFieldAnnotation(RuntimeInlineAnnotationReader.java:25)
   at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.hasFieldAnnotation(RuntimeInlineAnnotationReader.java:17)
   at com.sun.xml.bind.v2.model.impl.FieldPropertySeed.hasAnnotation(FieldPropertySeed.java:28)
   at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl$RuntimePropertySeed.hasAnnotation(RuntimeClassInfoImpl.java:209)
   at com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcId(PropertyInfoImpl.java:187)
   at com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.<init>(PropertyInfoImpl.java:59)
   at com.sun.xml.bind.v2.model.impl.ERPropertyInfoImpl.<init>(ERPropertyInfoImpl.java:15)
   at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.<init>(ElementPropertyInfoImpl.java:61)
   at com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.<init>(RuntimeElementPropertyInfoImpl.java:23)
   at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.createElementProperty(RuntimeClassInfoImpl.java:76)
   at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.addProperty(ClassInfoImpl.java:725)
   at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:243)
   at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
   at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
   at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
   at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
   at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
   at com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:51)
   at com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
   at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
   at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
   at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
   at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
   at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
   at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
   at java.lang.reflect.VMMethod.invoke(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:327)
   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
   at javax.xml.bind.Con

May I have some suggestions or comments about how should i solve this problem? Also please inform me whether JAXB library can be used with Jamvm and GNU classpath.

Re: does Jamvm provide implementation of getAnnotation API of java.lang.reflect.Field

by Robert Lougher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Yes, it _should_ be implemented.  It got accidently missed out when I
rewrote the reflection code a few months ago!

It's fixed in CVS (see http://developer.berlios.de/cvs/?group_id=6545
for instructions).  Or, you can modify your local copy.  Here's the
relevant change:

http://cvs.berlios.de/cgi-bin/viewvc.cgi/jamvm/jamvm/lib/java/lang/reflect/VMField.java?r1=1.1&r2=1.2

Rob.

2009/6/4 alk.shr <alk.shr@...>:

>
> I am  is using sun RI of JAXB 2.0  for XML binding. while trying to run
> application using Jamvm and GNU classpath version 0.98,  i am getting below
> mentioned exception. It seems that getAnnotation API of
> java.lang.reflect.Field class is not implemented by Jamvm.
>
> java.lang.UnsatisfiedLinkError: getAnnotation
>   at java.lang.reflect.VMField.getAnnotation(Native Method)
>   at java.lang.reflect.Field.getAnnotation(Field.java:715)
>   at
> java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObject.java:231)
>   at
> com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.hasFieldAnnotation(RuntimeInlineAnnotationReader.java:25)
>   at
> com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.hasFieldAnnotation(RuntimeInlineAnnotationReader.java:17)
>   at
> com.sun.xml.bind.v2.model.impl.FieldPropertySeed.hasAnnotation(FieldPropertySeed.java:28)
>   at
> com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl$RuntimePropertySeed.hasAnnotation(RuntimeClassInfoImpl.java:209)
>   at
> com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcId(PropertyInfoImpl.java:187)
>   at
> com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.<init>(PropertyInfoImpl.java:59)
>   at
> com.sun.xml.bind.v2.model.impl.ERPropertyInfoImpl.<init>(ERPropertyInfoImpl.java:15)
>   at
> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.<init>(ElementPropertyInfoImpl.java:61)
>   at
> com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.<init>(RuntimeElementPropertyInfoImpl.java:23)
>   at
> com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.createElementProperty(RuntimeClassInfoImpl.java:76)
>   at
> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.addProperty(ClassInfoImpl.java:725)
>   at
> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:243)
>   at
> com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
>   at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
>   at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
>   at
> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
>   at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
>   at
> com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:51)
>   at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
>   at
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
>   at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
>   at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
>   at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
>   at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
>   at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
>   at java.lang.reflect.VMMethod.invoke(Native Method)
>   at java.lang.reflect.Method.invoke(Method.java:327)
>   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
>   at javax.xml.bind.Con
>
> May I have some suggestions or comments about how should i solve this
> problem? Also please inform me whether JAXB library can be used with Jamvm
> and GNU classpath.
>
> --
> View this message in context: http://www.nabble.com/does-Jamvm-provide-implementation-of-getAnnotation-API-of-java.lang.reflect.Field-tp23863678p23863678.html
> Sent from the JamVM mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Jamvm-general mailing list
> Jamvm-general@...
> https://lists.sourceforge.net/lists/listinfo/jamvm-general
>

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Jamvm-general mailing list
Jamvm-general@...
https://lists.sourceforge.net/lists/listinfo/jamvm-general