3 messages in net.java.dev.jna.users[jna-users] ClassCastexception Proxy-...
FromSent OnAttachments
andrea antonelloJun 13, 2008 3:08 am 
Albert StrasheimJun 13, 2008 3:29 am 
andrea antonelloJun 13, 2008 4:08 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] ClassCastexception Proxy->LibraryActions...
From:andrea antonello (andr@gmail.com)
Date:Jun 13, 2008 3:08:46 am
List:net.java.dev.jna.users

Hi, I'm new to the list and jna. I tried some examples from the docu and I love that way to access native libs.

I'm trying to access native libs inside an eclipse rcp environment. After some issues about library path, I now get an error, of which I didn't find docu in the archives and web.

Following the examples, when accessing the library loading part:

KrigingLibrary INSTANCE = (KrigingLibrary) Native.loadLibrary("kriging", KrigingLibrary.class);

I get the following:

Caused by: java.lang.ClassCastException: $Proxy0 cannot be cast to com.sun.jna.Library at com.sun.jna.Native.loadLibrary(Native.java:263) at com.sun.jna.Native.loadLibrary(Native.java:246) at
eu.hydrologis.jgrass.models.h.kriging.h_kriging$KrigingLibrary.<clinit>(h_kriging.java:345) ... 21 more

Can someone give me a hint on how to solve that?

Thanks, Andrea