1

I am trying to create an android application to connect to Azure's SQL database. When I try to create a ODataConsumer object that would later be used to filter the message.

The ODataConsumer object is create with the create method

ODataConsumer c = ODataConsumer.create("http:/xxx/yyy.svc");

But when the execution reaches here, I get class def not found exception and the application is force closed.

I downloaded the jar files from the following site

http://code.google.com/p/odata4j/downloads/list

I started off with v0.3 as this is the jar file used in the demo that is provided by Microsoft. I also tried v0.4

I add <uses-permission android:name="android.permission.INTERNET"/> to the manifest file of the project. I also import import org.odata4j.consumer.ODataConsumer; import org.odata4j.core.OEntity;.

Am I missing something here?

The error that I get is AndroidRuntime(595): java.lang.NoClassDefFoundError: org.data4j.consumer.OdataConsumer

Ha Sh
  • 724
  • 5
  • 26

2 Answers2

0

You should really be using the latest version.

Also the class name in the error is misspelled. It's ODataConsumer not OdataConsumer.

John Spurlock
  • 1,723
  • 1
  • 13
  • 12
0

I was having the same problem. In my case I was able to follow the example here:

http://xrigau.wordpress.com/2012/03/22/fix-some-problems-with-libraries-in-the-adt-17-plugin-10/

which is described here:

Android-SDK r17 ruins working projects

which solved my problem. Good luck.

Community
  • 1
  • 1
rys322
  • 1