My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 74: java.lang.UnsatisfiedLinkError: getDeclaredAnnotations
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jun 2011

Sign in to add a comment
Project Member Reported by, Jun 7, 2011
Hello Samuel,

hope you are doing well...   I've am trying to install on a rather (what I consider) eclectic piece of hardware - a Chumby 1 (  I successfully got a version of the JamVM & GNU Classpath working on it.  Now I'm a little flummoxed by an unsatisfied link error.

I've grepped and grepped but can't find the location (in source at least)

Do you use reflective Annotations?  I read in this post they aren't supported on Android - and I believe the Davlik JVM is very close to the JamVM. 

Do you have any ideas or any possible directions I might go in to investigate?


14899 [main] INFO org.myrobotlab.service.OpenCV  - starting capture
Exception in thread "OpenCV_videoProcessor" java.lang.UnsatisfiedLinkError: getDeclaredAnnotations
   at java.lang.VMClass.getDeclaredAnnotations(Native Method)
   at java.lang.Class.getDeclaredAnnotations(
   at java.lang.Class.getAnnotations(
   at java.lang.Class.getAnnotation(
   at com.googlecode.javacpp.Loader.appendProperties(
   at com.googlecode.javacpp.Loader.load(
   at com.googlecode.javacpp.Loader.load(
   at com.googlecode.javacv.cpp.opencv_core.<clinit>(
   at java.lang.VMClass.forName(Native Method)
   at java.lang.Class.forName(
   at com.googlecode.javacpp.Loader.load(
   at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(
   at java.lang.VMClass.forName(Native Method)
   at java.lang.Class.forName(
   at com.googlecode.javacpp.Loader.load(
   at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(
   at org.myrobotlab.service.OpenCV$ Source)

Jun 7, 2011
Project Member #1
missing non support for Annotations @ Android link -
Jun 7, 2011
Project Member #2
I'll try building and installing the latest version of JamVM and GNU classpath
Jun 7, 2011
Project Member #3
First, JavaCV and JavaCPP does not use `java.lang.Package.getDeclaredAnnotations()` anywhere, so there is no problem on Android.

Second, annotations are only required when building. If you can build your files on another platform, and move the compiled file on your 'eclectic' hardware, then it could work. I would just need to add a few try/catch blocks there.

So, let me know if you can cross-build your software from another platform, thank you
Jun 7, 2011
Project Member #4
BTW, since this is an ARM machine, are you saying that .so files compiled for Android actually working on it?
Jun 7, 2011
Project Member #5
In regards to First - Yes, I could believe that..  My suspicion is the implementation of GNU Classes uses getAnnotation and calls the JVM's getDeclaredAnnotations - which apparently was not implemented in JamVM.  Not sure of all the details of the different parts... but it seems like a logical possibility.  Also, I saw some reference to the JamVM where it was logged as a bug and said it was fixed in a later version (hopefully the one I am attempting on installing)

I am 4000 miles away from the machine which this is being done.  Debugging in an IDE is not really possible.  However, as far as I can tell.. it goes into 

when the error is thrown..

I haven't replaced the JVM and GNU classpath - so I would not give it any attention until I get that done and run some more tests..

In regards to ARM and the .so files ... Yes, that was the intention.

Jun 9, 2011
Project Member #6
I released a new version of JavaCPP+JavaCV that fixes the loading issue when the JVM does not support annotation. However, I doubt very much that native .so library files compiled for Android will work on another Linux-based platform. If you get errors like `UnsatisfiedLinkError` or `NoClassDefFoundError` even after putting the .so files in the system library PATH, please try to recompile the native libraries.
Status: Fixed
Jun 9, 2011
Project Member #7
Will do... was taking a crash course in cross compiling.  I have not tried the Android files yet, but soon I'll be in a position to test both Android and native.  We'll see.
Sign in to add a comment

Powered by Google Project Hosting