My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  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 supert...@gmail.com, 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 (http://en.wikipedia.org/wiki/Chumby)  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?

Regards,
Greg.

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(Class.java:1580)
   at java.lang.Class.getAnnotations(Class.java:1518)
   at java.lang.Class.getAnnotation(Class.java:1497)
   at com.googlecode.javacpp.Loader.appendProperties(Loader.java:101)
   at com.googlecode.javacpp.Loader.load(Loader.java:300)
   at com.googlecode.javacpp.Loader.load(Loader.java:266)
   at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:118)
   at java.lang.VMClass.forName(Native Method)
   at java.lang.Class.forName(Class.java:189)
   at com.googlecode.javacpp.Loader.load(Loader.java:286)
   at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:87)
   at java.lang.VMClass.forName(Native Method)
   at java.lang.Class.forName(Class.java:189)
   at com.googlecode.javacpp.Loader.load(Loader.java:286)
   at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:88)
   at org.myrobotlab.service.OpenCV$VideoProcess.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:710)




Jun 7, 2011
Project Member #1 supert...@gmail.com
missing non support for Annotations @ Android link - https://code.google.com/p/android/issues/detail?id=16135
Jun 7, 2011
Project Member #2 supert...@gmail.com
I'll try building and installing the latest version of JamVM and GNU classpath
Jun 7, 2011
Project Member #3 samuel.a...@gmail.com
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 samuel.a...@gmail.com
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 supert...@gmail.com
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 

				oldGrabber=cvCreateCameraCapture(cameraIndex);
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 samuel.a...@gmail.com
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 supert...@gmail.com
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