Xamarin Forms app throws 'SQLite.SQLiteException: Could not open database file' - sqlite

Xamarin Forms app throws following error during on click on Navigation Button.
If I comment the following method DisplaySoccerStatus(); in the SoccerDailyStatus class then the app will work. So I assume, few records in the database which are null is causing the issue ? Not sure, how can I resolve the problem ?
SQLite.SQLiteException: Could not open database file: /data/user/0/com.companyname.soccerapp/files/.config/soccerpep (CannotOpen
public partial class SoccerDailyStatus : ContentPage
{
private SQLiteConnection conn;
SoccerAvailability status;
public SoccerDailyStatus(SoccerAvailability soccerStatus)
{
InitializeComponent();
status = soccerStatus;
BindingContext = status;
//DisplaySoccerStatus();
}
protected override async void OnAppearing()
{
conn = DependencyService.Get<Isqlite>().GetConnection();
conn.CreateTable<SoccerAvailability>();
base.OnAppearing();
async Task DisplaySoccerStatus()
{
var datetoday = DateTime.Now.ToString("ddMMyyyy");
//List<SoccerAvailability> myList = (from x in conn.Table<SoccerAvailability>() select x).ToList();
List<SoccerAvailability> myList = (from x in conn.Table<SoccerAvailability>().Where(x => x.CurrentDate == datetoday) select x).ToList();
if (myList != null)
{
SoccerAvailability soccerAvailability = new SoccerAvailability();
soccerAvailability.SoccerStatus = myList[0].SoccerStatus;
soccerAvailability.CurrentDate = DateTime.Now.ToString("ddMMyyyy");
await Navigation.PushAsync(new SoccerDailyStatus(soccerAvailability) { });
}
else
{
await DisplayAlert("Notification", "Unable to proccess status", "Cancel");
}
}
await DisplaySoccerStatus();
}
}
}
Stack Trace:
05-04 13:51:12.462 D/Mono (23709): DllImport attempting to load: '__Internal'.
05-04 13:51:12.462 D/Mono (23709): DllImport loaded library '(null)'.
05-04 13:51:12.462 D/Mono (23709): DllImport searching in: '__Internal' ('(null)').
05-04 13:51:12.462 D/Mono (23709): Searching for 'monodroid_get_system_property'.
05-04 13:51:12.462 D/Mono (23709): Probing 'monodroid_get_system_property'.
05-04 13:51:12.462 D/Mono (23709): Found as 'monodroid_get_system_property'.
05-04 13:51:12.462 D/Mono (23709): DllImport searching in: '__Internal' ('(null)').
05-04 13:51:12.462 D/Mono (23709): Searching for 'monodroid_free'.
05-04 13:51:12.462 D/Mono (23709): Probing 'monodroid_free'.
05-04 13:51:12.462 D/Mono (23709): Found as 'monodroid_free'.
05-04 13:51:12.904 D/Mono (23709): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
05-04 13:51:12.904 D/Mono (23709): Searching for 'sqlite3_changes'.
05-04 13:51:13.123 I/art (23709): Starting a blocking GC Explicit
05-04 13:51:13.132 I/art (23709): Explicit concurrent mark sweep GC freed 206(21KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 3MB/5MB, paused 651us total 8.285ms
05-04 13:51:13.134 D/Mono (23709): GC_TAR_BRIDGE bridges 87 objects 901 opaque 262 colors 87 colors-bridged 87 colors-visible 87 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 0.19ms scc-setup 0.04ms gather-xref 0.02ms xref-setup 0.02ms cleanup 0.74ms
05-04 13:51:13.134 D/Mono (23709): GC_BRIDGE: Complete, was running for 11.21ms
05-04 13:51:13.135 D/Mono (23709): GC_MINOR: (Nursery full) time 7.23ms, stw 7.85ms promoted 1963K major size: 2848K in use: 2132K los size: 1024K in use: 55K
05-04 13:51:13.306 D/Mono (23709): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 87 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 0.19ms scc-setup 0.04ms gather-xref 0.02ms xref-setup 0.02ms cleanup 0.02ms
05-04 13:51:13.306 D/Mono (23709): GC_BRIDGE: Complete, was running for 0.15ms
05-04 13:51:13.307 D/Mono (23709): GC_MINOR: (Nursery full) time 5.49ms, stw 5.88ms promoted 2025K major size: 4992K in use: 4209K los size: 1024K in use: 55K
05-04 13:51:13.468 D/Mono (23709): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 87 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 0.19ms scc-setup 0.04ms gather-xref 0.02ms xref-setup 0.02ms cleanup 0.03ms
05-04 13:51:13.468 D/Mono (23709): GC_BRIDGE: Complete, was running for 0.26ms
05-04 13:51:13.468 D/Mono (23709): GC_MINOR: (Nursery full) time 6.25ms, stw 6.64ms promoted 1963K major size: 7024K in use: 6222K los size: 1024K in use: 55K
05-04 13:51:13.629 D/Mono (23709): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 87 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 0.19ms scc-setup 0.04ms gather-xref 0.02ms xref-setup 0.02ms cleanup 0.03ms
05-04 13:51:13.629 D/Mono (23709): GC_BRIDGE: Complete, was running for 0.19ms
05-04 13:51:13.629 D/Mono (23709): GC_MINOR: (Nursery full) time 7.41ms, stw 7.90ms promoted 1886K major size: 9024K in use: 8157K los size: 1024K in use: 55K
05-04 13:51:13.817 D/Mono (23709): GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 87 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.03ms tarjan 0.19ms scc-setup 0.04ms gather-xref 0.02ms xref-setup 0.02ms cleanup 0.03ms
05-04 13:51:13.817 D/Mono (23709): GC_BRIDGE: Complete, was running for 0.19ms
05-04 13:51:13.817 D/Mono (23709): GC_MINOR: (Nursery full) time 9.31ms, stw 9.72ms promoted 1818K major size: 10896K in use: 10021K los size: 1024K in use: 55K
05-04 13:51:14.140 I/art (23709): Starting a blocking GC Explicit
05-04 13:51:14.147 I/art (23709): Explicit concurrent mark sweep GC freed 156(9KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 3MB/5MB, paused 599us total 6.464ms
05-04 13:51:14.147 D/Mono (23709): GC_TAR_BRIDGE bridges 29 objects 29 opaque 0 colors 29 colors-bridged 29 colors-visible 29 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.04ms tarjan 0.03ms scc-setup 0.03ms gather-xref 0.02ms xref-setup 0.02ms cleanup 0.27ms
05-04 13:51:14.147 D/Mono (23709): GC_BRIDGE: Complete, was running for 7.41ms
05-04 13:51:14.147 D/Mono (23709): GC_MINOR: (Nursery full) time 7.24ms, stw 7.62ms promoted 501K major size: 11472K in use: 10539K los size: 1024K in use: 55K
05-04 13:51:14.157 D/Mono (23709): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
05-04 13:51:14.158 D/Mono (23709): Searching for 'sqlite3_close_v2'.
05-04 13:51:14.651 I/Choreographer(23709): Skipped 167 frames! The application may be doing too much work on its main thread.
05-04 13:51:14.688 E/EGL_emulation(23709): tid 23733: swapBuffers(531): error 0x300d (EGL_BAD_SURFACE)
05-04 13:51:14.688 W/OpenGLRenderer(23709): swapBuffers encountered EGL_BAD_SURFACE on 0x9c46bd40, halting rendering...
05-04 13:51:14.690 D/EGL_emulation(23709): eglMakeCurrent: 0xb077de80: ver 3 1 (tinfo 0x9c459e20)
Unhandled Exception:
SQLite.SQLiteException: Could not open database file: /data/user/0/com.companyname.soccerapp/files/.config/soccerpep (CannotOpen)

I think the problem is due to the async method DisplaySoccerStatus called in ctor.
A single data connection cannot be used simultaneously in two or more threads.
I suggest two things:
Call your DisplaySoccerStatus in async onAppearing and use await DisplaySoccerStatus. Oh, and use async Task DisplaySoccerStatus and not async void so you can know when task is finished.
The async void case is a "fire and forget": You start the task chain, but you don't care about when it's finished. When the function returns, all you know is that everything up to the first await has executed. Everything after the first await will run at some unspecified point in the future that you have no access to.
Move your connection in a singleton declared on app.xaml.xs as suggested in the official documentation

Related

r8 shrinker Java.Lang.NoSuchMethodError Message=no non-static method in xamarin forms

I am using d8+r8+Multi-Dex to deploy my Xamarin Forms App. However, when enabling r8 I am getting some weired exception. I checked debug mode and I am getting this weired error. I have also configured proguard file to exempt some of the files, but it didn't help.
06-17 19:06:08.090 D/Mono (31705): Assembly Loader probing location: '//Facades/Xamarin.Forms.Platform.Android.AppLinks.exe'.
06-17 19:06:08.195 D/Mono (31705): DllImport searching in: '__Internal' ('(null)').
06-17 19:06:08.195 D/Mono (31705): Searching for 'java_interop_jnienv_call_static_int_method_a'.
06-17 19:06:08.195 D/Mono (31705): Probing 'java_interop_jnienv_call_static_int_method_a'.
06-17 19:06:08.196 D/Mono (31705): Found as 'java_interop_jnienv_call_static_int_method_a'.
06-17 19:06:08.322 D/Mono (31705): DllImport searching in: '__Internal' ('(null)').
06-17 19:06:08.322 D/Mono (31705): Searching for 'java_interop_jnienv_call_nonvirtual_int_method_a'.
06-17 19:06:08.322 D/Mono (31705): Probing 'java_interop_jnienv_call_nonvirtual_int_method_a'.
06-17 19:06:08.322 D/Mono (31705): Found as 'java_interop_jnienv_call_nonvirtual_int_method_a'.
06-17 19:06:08.389 I/FA (31705): Tag Manager is not found and thus will not be used
06-17 19:06:08.391 D/OpenGLRenderer(31705): HWUI GL Pipeline
06-17 19:06:08.398 E/FA (31705): Missing google_app_id. Firebase Analytics disabled. See
06-17 19:06:08.560 D/Mono (31705): Requesting loading reference 9 (of 13) of /storage/emulated/0/Android/data/com.AZEE.wquran/files/.__override__/Xamarin.AndroidX.Fragment.dll
06-17 19:06:08.560 D/Mono (31705): Loading reference 9 of /storage/emulated/0/Android/data/com.AZEE.wquran/files/.__override__/Xamarin.AndroidX.Fragment.dll asmctx DEFAULT, looking for Xamarin.AndroidX.Lifecycle.LiveData.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
06-17 19:06:08.560 D/Mono (31705): Assembly Ref addref Xamarin.AndroidX.Fragment[0xe9e72860] -> Xamarin.AndroidX.Lifecycle.LiveData.Core[0xe9e72aa0]: 2
06-17 19:06:08.652 D/Mono (31705): DllImport searching in: '__Internal' ('(null)').
06-17 19:06:08.652 D/Mono (31705): Searching for 'java_interop_jnienv_call_object_method'.
06-17 19:06:08.652 D/Mono (31705): Probing 'java_interop_jnienv_call_object_method'.
06-17 19:06:08.652 D/Mono (31705): Found as 'java_interop_jnienv_call_object_method'.
06-17 19:06:08.825 W/DynamiteModule(31705): Local module descriptor class for com.google.android.gms.ads.dynamite not found.
**Java.Lang.NoSuchMethodError:** 'no non-static method "Landroidx/fragment/app/FragmentTransaction;.add(ILandroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;"'
Thread started: <Thread Pool> #10
Thread started: <Thread Pool> #11
Thread finished: <Thread Pool> #7
The thread 0x7 has exited with code 0 (0x0).
"<threadpool thread>"
"<threadpool thread>"
"<unnamed thread>" at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Diagnostics.Debugger.Mono_UnhandledException_internal (System.Exception) <0x00012>
at System.Diagnostics.Debugger.Mono_UnhandledException (System.Exception) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Diagnostics/Debugger.cs:125
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.63 (intptr,intptr) [0x00020] in <eaa205f580954a64824b74a79fa87c62>:0
at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.63 (intptr,intptr) [0x00030] in <eaa205f580954a64824b74a79fa87c62>:0
proguard file
-dontwarn java.lang.invoke.**
-keep public class * implements androidx.versionedparcelable.VersionedParcelable
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
-keep class android.support.V7.**
-keep class android.support.v7.widget.** { *; }
-dontwarn android.support.v7.widget.**
-keep class android.support.v4.widget.Space { *; }
-dontwarn android.support.v4.widget.Space
-keep class MediaManager.CrossMediaManager.**
-keep class android.support.v4.media.MediaBrowserCompat
-keep class android.support.v4.media.**
-keep class androidX.appCompat.widget.**
-keep class Plugin.InAppBilling.**
-keep class Plugin.InAppBilling.InAppBillingImplementation.**
I removed the last 6 lines from the proguard file and it worked.
-keep class MediaManager.CrossMediaManager.**
-keep class android.support.v4.media.MediaBrowserCompat
-keep class android.support.v4.media.**
-keep class androidX.appCompat.widget.**
-keep class Plugin.InAppBilling.**
-keep class Plugin.InAppBilling.InAppBillingImplementation.**

Firebase PhoneAuth for Xamarin Android

Even after extensive research, I have been unable to find any implementation of Firebase PhoneAuth for Xamarin Android and I have already tried the answers from other questions similar to mine but those are just C# port of the methods but don't really work. I have tried it but ended up with NullPointerException while calling VerifyPhoneNumber.
LoginActivity.cs
...
void VerifyNumber(string mobile_no)
{
PhoneAuthCallbacks phoneAuthCallbacks = new PhoneAuthCallbacks();
PhoneAuthProvider.Instance.VerifyPhoneNumber(mobile_no, 60, Java.Util.Concurrent.TimeUnit.Seconds, this, phoneAuthCallbacks);
}
public class PhoneAuthCallbacks : PhoneAuthProvider.OnVerificationStateChangedCallbacks
{
public override void OnVerificationCompleted(PhoneAuthCredential credential)
{
FirebaseAuth.Instance.SignInWithCredential(credential);
System.Diagnostics.Debug.WriteLine("onVerificationCompleted");
}
public override void OnVerificationFailed(FirebaseException exception)
{
// This callback is invoked in an invalid request for verification is made,
// for instance if the the phone number format is not valid.
System.Diagnostics.Debug.WriteLine("onVerificationFailed: " + exception);
}
public override void OnCodeSent(string verificationId, PhoneAuthProvider.ForceResendingToken forceResendingToken)
{
// The SMS verification code has been sent to the provided phone number, we
// now need to ask the user to enter the code and then construct a credential
// by combining the code with a verification ID.
base.OnCodeSent(verificationId, forceResendingToken);
System.Diagnostics.Debug.WriteLine("onCodeSent" + verificationId);
}
}
Debug Log
10-05 16:35:45.265 D/Mono (19093): Loading reference 8 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Delivery_DemoApp.dll asmctx DEFAULT, looking for Xamarin.Firebase.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.265 D/Mono (19093): Assembly Ref addref Delivery_DemoApp[0xa7179160] -> Xamarin.Firebase.Common[0xa7177e40]: 2
10-05 16:35:45.265 D/Mono (19093): Loading reference 1 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Common.dll asmctx DEFAULT, looking for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
10-05 16:35:45.265 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Common[0xa7177e40] -> Mono.Android[0xa7178620]: 12
10-05 16:35:45.265 D/Mono (19093): Loading reference 9 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Delivery_DemoApp.dll asmctx DEFAULT, looking for Xamarin.Firebase.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.265 D/Mono (19093): Assembly Ref addref Delivery_DemoApp[0xa7179160] -> Xamarin.Firebase.Auth[0xa7177d80]: 2
10-05 16:35:45.266 D/Mono (19093): Loading reference 1 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.dll asmctx DEFAULT, looking for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
10-05 16:35:45.266 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth[0xa7177d80] -> Mono.Android[0xa7178620]: 13
10-05 16:35:45.266 D/Mono (19093): Loading reference 2 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.dll asmctx DEFAULT, looking for Xamarin.Firebase.Auth.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.266 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth[0xa7177d80] -> Xamarin.Firebase.Auth.Interop[0xa7177de0]: 2
10-05 16:35:45.266 D/Mono (19093): Loading reference 2 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.Interop.dll asmctx DEFAULT, looking for Xamarin.Firebase.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.266 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth.Interop[0xa7177de0] -> Xamarin.Firebase.Common[0xa7177e40]: 3
10-05 16:35:45.266 D/Mono (19093): Loading reference 0 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Common.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
10-05 16:35:45.266 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Common[0xa7177e40] -> mscorlib[0xa83b5220]: 15
10-05 16:35:45.266 D/Mono (19093): Loading reference 1 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.Interop.dll asmctx DEFAULT, looking for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
10-05 16:35:45.266 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth.Interop[0xa7177de0] -> Mono.Android[0xa7178620]: 14
10-05 16:35:45.266 D/Mono (19093): Loading reference 0 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.Interop.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
10-05 16:35:45.266 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth.Interop[0xa7177de0] -> mscorlib[0xa83b5220]: 16
10-05 16:35:45.266 D/Mono (19093): Loading reference 3 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.dll asmctx DEFAULT, looking for Xamarin.Firebase.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.266 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth[0xa7177d80] -> Xamarin.Firebase.Common[0xa7177e40]: 4
10-05 16:35:45.266 D/Mono (19093): Loading reference 0 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
10-05 16:35:45.267 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth[0xa7177d80] -> mscorlib[0xa83b5220]: 17
10-05 16:35:45.271 D/Mono (19093): Loading reference 4 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.dll asmctx DEFAULT, looking for Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
10-05 16:35:45.271 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth[0xa7177d80] -> Java.Interop[0xa7178680]: 6
10-05 16:35:45.271 D/Mono (19093): Loading reference 10 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Delivery_DemoApp.dll asmctx DEFAULT, looking for Xamarin.GooglePlayServices.Basement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.272 D/Mono (19093): Assembly Ref addref Delivery_DemoApp[0xa7179160] -> Xamarin.GooglePlayServices.Basement[0xa7178140]: 2
10-05 16:35:45.272 D/Mono (19093): Loading reference 1 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.GooglePlayServices.Basement.dll asmctx DEFAULT, looking for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
10-05 16:35:45.272 D/Mono (19093): Assembly Ref addref Xamarin.GooglePlayServices.Basement[0xa7178140] -> Mono.Android[0xa7178620]: 15
10-05 16:35:45.272 D/Mono (19093): Loading reference 6 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.dll asmctx DEFAULT, looking for Xamarin.GooglePlayServices.Basement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.272 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth[0xa7177d80] -> Xamarin.GooglePlayServices.Basement[0xa7178140]: 3
10-05 16:35:45.273 D/Mono (19093): Loading reference 0 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.GooglePlayServices.Basement.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
10-05 16:35:45.273 D/Mono (19093): Assembly Ref addref Xamarin.GooglePlayServices.Basement[0xa7178140] -> mscorlib[0xa83b5220]: 18
10-05 16:35:45.330 D/Mono (19093): Loading reference 2 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Common.dll asmctx DEFAULT, looking for Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
10-05 16:35:45.330 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Common[0xa7177e40] -> Java.Interop[0xa7178680]: 7
10-05 16:35:45.383 D/FirebaseApp(19093): com.google.firebase.iid.FirebaseInstanceId is not linked. Skipping initialization.
10-05 16:35:45.384 D/FirebaseApp(19093): com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
10-05 16:35:45.385 D/FirebaseApp(19093): com.google.android.gms.measurement.AppMeasurement is not linked. Skipping initialization.
10-05 16:35:45.404 D/Mono (19093): Loading reference 5 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.dll asmctx DEFAULT, looking for Xamarin.GooglePlayServices.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.405 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth[0xa7177d80] -> Xamarin.GooglePlayServices.Tasks[0xa7178200]: 2
10-05 16:35:45.405 D/Mono (19093): Loading reference 1 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.GooglePlayServices.Tasks.dll asmctx DEFAULT, looking for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
10-05 16:35:45.405 D/Mono (19093): Assembly Ref addref Xamarin.GooglePlayServices.Tasks[0xa7178200] -> Mono.Android[0xa7178620]: 16
10-05 16:35:45.405 D/Mono (19093): Loading reference 4 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Auth.Interop.dll asmctx DEFAULT, looking for Xamarin.GooglePlayServices.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.405 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Auth.Interop[0xa7177de0] -> Xamarin.GooglePlayServices.Tasks[0xa7178200]: 3
10-05 16:35:45.405 D/Mono (19093): Loading reference 3 of /storage/emulated/0/Android/data/com.companyname.App1/files/.__override__/Xamarin.Firebase.Common.dll asmctx DEFAULT, looking for Xamarin.GooglePlayServices.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10-05 16:35:45.405 D/Mono (19093): Assembly Ref addref Xamarin.Firebase.Common[0xa7177e40] -> Xamarin.GooglePlayServices.Tasks[0xa7178200]: 4
Unhandled Exception: Java.Lang.NullPointerException: <Timeout exceeded getting exception details>
Stack Trace
>Java.Lang.NullPointerException: Attempt to invoke virtual method 'void com.google.firebase.auth.FirebaseAuth.zza(java.lang.String, long, java.util.concurrent.TimeUnit, com.google.firebase.auth.PhoneAuthProvider$OnVerificationStateChangedCallbacks, android.app.Activity, java.util.concurrent.Executor, boolean)' on a null object reference
at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <3beddfcb1eb547cd8ce47c3097f6eaeb>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <3beddfcb1eb547cd8ce47c3097f6eaeb>:0
at Firebase.Auth.PhoneAuthProvider.VerifyPhoneNumber (System.String phoneNumber, System.Int64 timeout, Java.Util.Concurrent.TimeUnit unit, Android.App.Activity activity, Firebase.Auth.PhoneAuthProvider+OnVerificationStateChangedCallbacks callbacks) [0x000af] in <fd3fe568403d40c2b79ab43d84a24199>:0
at Delivery_DemoApp.Helpers.Firebase_Manager.SendCodeVerification (System.String mobile, Delivery_DemoApp.LoginActivity Instance) [0x00043] in C:\Users\bilka\source\repos\Delivery_DemoApp\Delivery_DemoApp\Helpers\Firebase_Manager.cs:76
--- End of managed Java.Lang.NullPointerException stack trace ---
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.firebase.auth.FirebaseAuth.zza(java.lang.String, long, java.util.concurrent.TimeUnit, com.google.firebase.auth.PhoneAuthProvider$OnVerificationStateChangedCallbacks, android.app.Activity, java.util.concurrent.Executor, boolean)' on a null object reference
at com.google.firebase.auth.PhoneAuthProvider.zza(Unknown Source:30)
at com.google.firebase.auth.PhoneAuthProvider.verifyPhoneNumber(Unknown Source:10)
at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:30)
at android.view.View.performClick(View.java:6297)
at android.view.View$PerformClick.run(View.java:24797)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6626)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
Has anyone been able to implement it? If so, please provide assistance
As found earlier, this is a known issue with the new Xamarin Firebase Auth package where the Firebase Auth instance is null, details of which can be found at https://github.com/xamarin/GooglePlayServicesComponents/issues/223.
A temporary fix is also mentioned (which has indeed solved my issue, at least for sign up and login functions) as shown below
var instance = FirebaseAuth.GetInstance(app);
if (instance == null)
{
instance = new FirebaseAuth(app);
}
As it appears this is still an issue in the current Xamarin Firebase Auth package. Building on from Bilal's solution I have found a way to get Phone Auth working. You can use the FirebaseAuth instance to get a PhoneAuthProvider instance.
var instance = FirebaseAuth.GetInstance(FirebaseApp.GetInstance(FirebaseApp.DefaultAppName));
if (instance == null)
{
instance = new FirebaseAuth(FirebaseApp.GetInstance(FirebaseApp.DefaultAppName));
}
var providerInstance = PhoneAuthProvider.GetInstance(instance);
providerInstance.VerifyPhoneNumber(numberWithCode, 60, Java.Util.Concurrent.TimeUnit.Seconds, this, PhoneAuthCallbacks);
Hopefully this helps someone

The "LinkAssemblies" task failed unexpectedly in Plugin.FirebasePushNotification

I am trying to release the application on Android using Linker to reduce the apk size.
When I use None I donĀ“t have problem.
When I use SDK Assemblies Only I get the next error:
Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.Void Plugin.FirebasePushNotification.FirebasePushNotificationManager::Subscribe(System.String)' in assembly: 'Plugin.FirebasePushNotification.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Firebase.Messaging.FirebaseMessaging::SubscribeToTopic(System.String)
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

How to generate SQL for Oracle 11g with Liquibase 3.3 in offline mode?

Problem
I use YAML scripts that describes my DB objects structure. It is very convenient because I can have DB-based integration tests with H2.
But the Production service of my client requires that we provide Oracle oriented SQL scripts (they use Liquibase, but in a not standard way, that we cannot challenge/change).
So I would like to generate these Oracle SQL scripts from my YAML ones, in an automatically way.
Thoughts
I firstly found the Liquibase:updateSQL command. Problem is that I do not have access to the DB (I don't know the JDBC URL, neither am I on the same network). So this solution can not work.
Then, I found a new option in Liquibase that allow "offline" mode for updateSQL command. It really seems to be the solution I'm looking for but then I have the following error (using Maven and -X -e options) :
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL (default-cli) on project granit: Error setting up or running Liquibase: liquibase.exception.UnexpectedLiquibaseException: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection() -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL (default-cli) on project granit: Error setting up or running Liquibase: liquibase.exception.UnexpectedLiquibaseException: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection()
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: liquibase.exception.UnexpectedLiquibaseException: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection()
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:373)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: liquibase.exception.DatabaseException: liquibase.exception.UnexpectedLiquibaseException: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection()
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:69)
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:321)
... 21 more
Caused by: liquibase.exception.UnexpectedLiquibaseException: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection()
at liquibase.database.core.OracleDatabase.setConnection(OracleDatabase.java:62)
at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:123)
at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:143)
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:50)
... 22 more
Caused by: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection()
at java.lang.Class.getMethod(Class.java:1624)
at liquibase.database.core.OracleDatabase.setConnection(OracleDatabase.java:58)
... 25 more
I then re-try with offline H2 base but I've got a new error :
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.748 s
[INFO] Finished at: 2015-02-22T12:00:51+01:00
[INFO] Final Memory: 19M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL (default-cli) on project app: Execution default-cli of goal org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL failed: A required class was missing while executing org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL: org/yaml/snakeyaml/Yaml
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.liquibase:liquibase-maven-plugin:3.3.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/me/.m2/repository/org/liquibase/liquibase-maven-plugin/3.3.2/liquibase-maven-plugin-3.3.2.jar
[ERROR] urls[1] = file:/Users/me/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[ERROR] urls[2] = file:/Users/me/.m2/repository/org/liquibase/liquibase-core/3.3.2/liquibase-core-3.3.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>fr.cnp.grn:app:1.0.14-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------: org.yaml.snakeyaml.Yaml
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL (default-cli) on project app: Execution default-cli of goal org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL failed: A required class was missing while executing org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL: org/yaml/snakeyaml/Yaml
-----------------------------------------------------
realm = plugin>org.liquibase:liquibase-maven-plugin:3.3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/me/.m2/repository/org/liquibase/liquibase-maven-plugin/3.3.2/liquibase-maven-plugin-3.3.2.jar
urls[1] = file:/Users/me/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
urls[2] = file:/Users/me/.m2/repository/org/liquibase/liquibase-core/3.3.2/liquibase-core-3.3.2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[project>fr.cnp.grn:app:1.0.14-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
-----------------------------------------------------
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL failed: A required class was missing while executing org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL: org/yaml/snakeyaml/Yaml
-----------------------------------------------------
realm = plugin>org.liquibase:liquibase-maven-plugin:3.3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/me/.m2/repository/org/liquibase/liquibase-maven-plugin/3.3.2/liquibase-maven-plugin-3.3.2.jar
urls[1] = file:/Users/me/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
urls[2] = file:/Users/me/.m2/repository/org/liquibase/liquibase-core/3.3.2/liquibase-core-3.3.2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[project>fr.cnp.grn:app:1.0.14-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
-----------------------------------------------------
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:167)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.liquibase:liquibase-maven-plugin:3.3.2:updateSQL: org/yaml/snakeyaml/Yaml
-----------------------------------------------------
realm = plugin>org.liquibase:liquibase-maven-plugin:3.3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/me/.m2/repository/org/liquibase/liquibase-maven-plugin/3.3.2/liquibase-maven-plugin-3.3.2.jar
urls[1] = file:/Users/me/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
urls[2] = file:/Users/me/.m2/repository/org/liquibase/liquibase-core/3.3.2/liquibase-core-3.3.2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[project>fr.cnp.grn:app:1.0.14-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
-----------------------------------------------------
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:165)
... 20 more
Caused by: java.lang.NoClassDefFoundError: org/yaml/snakeyaml/Yaml
at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:44)
at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:356)
at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:248)
at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:211)
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:215)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.Liquibase.update(Liquibase.java:258)
at org.liquibase.maven.plugins.LiquibaseUpdateSQL.doUpdate(LiquibaseUpdateSQL.java:49)
at org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:24)
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:369)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.Yaml
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
... 32 more
So my questions are :
Does the Liquibase:updateSQL seems to you the right solution ?
Do you succeed to execute Liquibase:updateSQL command in offline mode for Oracle ? (and how ?)
Thank you for reading so far

Naming Context not found exception

I am deploying a EAR from RAD .The EAR pacakges a WAR and EJB module. I am getting the following error after the application in invoked..
javax.naming.NameNotFoundException: Context: C7M91P-L93883NNode01Cell/nodes/C7M91P-L93883NNode01/servers/server1, name: ejb/org/ifc/dots/business/services/DOTSStartupServiceHome: First component in name DOTSStartupServiceHome not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4360)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1793)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1748)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1499)
How do I verify the naming context entries in the websphere server... ?
Actually the error occurred because the ejb was not part of the EAR deployment descriptor..I added ejb module in the deployment descriptor and now the error is gone..
I am now getting the following error..
[2/6/14 18:16:37:808 IST] 00000023 FfdcProvider I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_295f295f_14.02.06_18.16.37.59110970.txt com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt 1507
[2/6/14 18:16:37:810 IST] 00000023 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookupExt
Context name: C7M91P-L93883NNode01Cell/nodes/C7M91P-L93883NNode01/servers/server1
Target name: ejb/org/ifc/dots/business/services/DOTSStartupServiceHome
Other data: ""
Exception stack trace: com.ibm.ws.naming.util.InvalidObjectException: Some object reference in the name "ejb/org/ifc/dots/business/services/DOTSStartupServiceHome" relative to the context "C7M91P-L93883NNode01Cell/nodes/C7M91P-L93883NNode01/servers/server1" is invalid. Some possible causes include a context binding in the name which refers to a destroyed context, or an object binding which contains an invalid EJBHome reference. [Root exception is org.omg.CORBA.INV_OBJREF: Could not resolve IOR string. vmcid: 0x0 minor code: 0 completed: No]
at com.ibm.ws.naming.jndicos.CNContextImpl.mapINV_OBJREF(CNContextImpl.java:4391)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1807)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1748)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1499)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:636)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.ifc.dots.business.locator.ServiceLocator.getServiceHome(ServiceLocator.java:228)
at org.ifc.dots.business.delegation.DotsBusinessServiceDelegate.invokeService(DotsBusinessServiceDelegate.java:96)
at org.ifc.dots.web.aggregation.DOTSXMLHelper.getXML(DOTSXMLHelper.java:468)
at org.ifc.dots.web.servlet.DOTSWebServlet.getXMLElement(DOTSWebServlet.java:126)
at org.ifc.framework.web.servlet.BaseWebServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1449)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Caused by: org.omg.CORBA.INV_OBJREF: Could not resolve IOR string. vmcid: 0x0 minor code: 0 completed: No
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolveUnresolvedBinding(WsnOptimizedNamingImpl.java:1995)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolve_binding(WsnOptimizedNamingImpl.java:1675)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:580)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2163)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2792)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2788)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:762)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2786)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1789)
... 34 more
Caused by: org.omg.CORBA.OBJECT_NOT_EXIST: SERVANT_NOT_FOUND (4) for key 0x49454a50020033e2132d077365727665723103454a420000005cacac0002000100290000005f5f686f6d654f66486f6d6573235f5f686f6d654f66486f6d6573235f5f686f6d654f66486f6d657308444f5453494923444f54534949456a622e6a617223444f54535374617274757053657276696365 vmcid: IBM minor code: C14 completed: No
at com.ibm.rmi.corba.ObjectManager.lookupServant(ObjectManager.java:110)
at com.ibm.CORBA.iiop.ServerDelegate.getServant(ServerDelegate.java:311)
at com.ibm.rmi.iiop.ORB.lookupLocalObject(ORB.java:592)
at com.ibm.CORBA.iiop.ORB.lookupLocalObject(ORB.java:1465)
at com.ibm.rmi.iiop.CDRReader.newObjRef(CDRReader.java:1290)
at com.ibm.rmi.iiop.CDRReader.read_Object(CDRReader.java:1130)
at com.ibm.rmi.iiop.CDRReader.read_Object(CDRReader.java:1094)
at com.ibm.rmi.corba.IorURL.iorbytesToObjref(IorURL.java:105)
at com.ibm.rmi.corba.IorURL.resolve(IorURL.java:93)
at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3718)
at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3256)
at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3619)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolveUnresolvedBinding(WsnOptimizedNamingImpl.java:1921)
... 43 more

Resources