Some of the non core java APIs that sun normally ships along with the java sdk
are not present in the android jdk/dalvik, so this makes using libraries like
this difficult. Your best bets would be to use something else or try to get
the source for the dependent library, and modify it however you might need to
in order to run it on dalvik. I have tried previously, I think with RestEasy
in fact, and ended up looking for alternatives and/or doing low level
httpclient calls. It ends up being a rat-hole issue - if you go to port a
library for use on android, and then discover something else you need to port
before you can do that, how far deep do you go?
MB
From: TE [mailto:alok...@hotmail.com]
Sent: Sunday, September 04, 2011 2:19 PM
To: resteasy-users@lists.sourceforge.net
Subject: Re: [Resteasy-users] Using RestEasy Client Proxy Framework on Android
Hmmm. It seems posting via Firefox was not a good idea. The line breaks in my
mail do not show in the mailing list archive. Let me try resending through
Outlook.
I apologize for the mishap.
TE
________________________________
From: T E [mailto:alok...@hotmail.com]
Sent: 04 Eylül 2011 Pazar 21:05
To: resteasy-users@lists.sourceforge.net
Subject: Using RestEasy Client Proxy Framework on Android
Hello,
We are developing a JAX-RS based servlet using RestEasy. One of the platforms
the client software is intended to run on is Android. So far we have been using
the RestEasy Client Proxy Framework with success on other client platforms, but
on Android we get the exception stack below.
I am assuming the "java.lang.NoClassDefFoundError:
com.sun.ws.rs.ext.RuntimeDelegateImpl" error is because the
META-INF/services/javax.ws.rs.ext.RuntimeDelegate in
resteasy-jaxrs-2.2.2.GA.jar is not processed by the Android runtime for some
reason. I would like to ask if there are any workarounds we can use on the
Android platform or if there's a way that the client framework can be obtained
separately without such dependencies.
Thanks in advance for your attention.
TE
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.example.resteasyclienttest/com.example.resteasyclienttest.ResteasyClientTestActivity}:
java.lang.RuntimeException: java.lang.ClassNotFoundException:
com.sun.ws.rs.ext.RuntimeDelegateImpl
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:
com.sun.ws.rs.ext.RuntimeDelegateImpl
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:134)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:96)
at
org.jboss.resteasy.spi.ResteasyProviderFactory.getInstance(ResteasyProviderFactory.java:351)
at
com.example.resteasyclienttest.ResteasyClientTestActivity.onCreate(ResteasyClientTestActivity.java:29)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
... 11 more
Caused by: java.lang.ClassNotFoundException:
com.sun.ws.rs.ext.RuntimeDelegateImpl
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:234)
at java.lang.Class.forName(Class.java:181)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:77)
at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:201)
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:113)
... 16 more
Caused by: java.lang.NoClassDefFoundError: com.sun.ws.rs.ext.RuntimeDelegateImpl
... 22 more
Caused by: java.lang.ClassNotFoundException:
com.sun.ws.rs.ext.RuntimeDelegateImpl in loader
dalvik.system.PathClassLoader[/data/app/com.example.resteasyclienttest-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
... 22 more
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users