I am new to Oracle database mobile server. In followed the official tutorial and documentation from here & here . I downloaded the Oracle Mobile server from here.
Following the tutorial ,
- I installed MDK
- Opened the sample project from the directory
<MDK_ROOT>\Mobile\Sdk\samples\Sync\android\simple_sync_android - and done the Java Build Path exercises
- No Errors were showed up in eclipse.
- Then I chose
RUN AS -> Android application
That showed up the emulator and console showed a successful install… so far so good.
10-13 11:58:07.588: E/AndroidRuntime(654): FATAL EXCEPTION: main
10-13 11:58:07.588: E/AndroidRuntime(654): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{tests.sync/tests.sync.MainAct}: java.lang.ClassNotFoundException: tests.sync.MainAct
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.access$600(ActivityThread.java:130)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.os.Looper.loop(Looper.java:137)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.main(ActivityThread.java:4745)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.reflect.Method.invokeNative(Native Method)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.reflect.Method.invoke(Method.java:511)
10-13 11:58:07.588: E/AndroidRuntime(654): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-13 11:58:07.588: E/AndroidRuntime(654): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-13 11:58:07.588: E/AndroidRuntime(654): at dalvik.system.NativeStart.main(Native Method)
10-13 11:58:07.588: E/AndroidRuntime(654): Caused by: java.lang.ClassNotFoundException: tests.sync.MainAct
10-13 11:58:07.588: E/AndroidRuntime(654): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
10-13 11:58:07.588: E/AndroidRuntime(654): ... 11 more
I checked out the manifest… here it is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tests.sync"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MainAct"
android:label="@string/app_name"
android:configChanges="orientation" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".TextFileEditor"
android:label="@string/app_name"
android:configChanges="orientation" >
</activity>
<service android:name="oracle.opensync.syncagent.android.SyncAgentService"></service>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
I could see all activities listed there (only two classes extends from activity, one is the launcher type). I did nothing inside the code. It is as it is given from Oracle.
I was trying to establish a non-risky data connection with my oracle enterprise database from the android device. That leads me to Oracle database mobile server. The starting itself is stuck here.
All sorts of suggestions and guidance are welcome.
Got the answer 🙂
I am sharing it here, expecting it to be of help to some other newbie like me ..
The problem is with the ordering of jar file we imported from the oracle home folder.
I had to do the following to workaround this:
/simple/sync_android/src entry
this worked for me.
More info can be available from a simple blog written by DoubleA. Here is the link