java.lang.IllegalStateException: The global database holder is not initialized. Ensure you call FlowManager.init() before accessing the database?
How to resolve this issue
Yesterday application was working, Today I run the same code giving me runtime error on splash screen activity.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.planfisheye.fisheye, PID: 11217
java.lang.IllegalStateException: The global database holder is not initialized. Ensure you call FlowManager.init() before accessing the database.
at com.raizlabs.android.dbflow.config.FlowManager.checkDatabaseHolder(FlowManager.java:507)
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseForTable(FlowManager.java:138)
at com.raizlabs.android.dbflow.config.FlowManager.getModelAdapterOrNull(FlowManager.java:469)
at com.raizlabs.android.dbflow.config.FlowManager.getTableName(FlowManager.java:79)
at com.raizlabs.android.dbflow.sql.language.From.getTableAlias(From.java:43)
at com.raizlabs.android.dbflow.sql.language.From.getQuery(From.java:211)
at com.raizlabs.android.dbflow.sql.language.BaseModelQueriable.querySingle(BaseModelQueriable.java:67)
at com.raizlabs.android.dbflow.sql.language.BaseTransformable.querySingle(BaseTransformable.java:106)
at com.planfisheye.fisheye.database.AuthenticationQueries.getUserDetails(AuthenticationQueries.java:205)
at com.planfisheye.fisheye.SplashActivity.checkDatabase(SplashActivity.java:205)
at com.planfisheye.fisheye.SplashActivity.access$100(SplashActivity.java:49)
at com.planfisheye.fisheye.SplashActivity$3$1.run(SplashActivity.java:187)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
android illegalstateexception dbflow
add a comment |
How to resolve this issue
Yesterday application was working, Today I run the same code giving me runtime error on splash screen activity.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.planfisheye.fisheye, PID: 11217
java.lang.IllegalStateException: The global database holder is not initialized. Ensure you call FlowManager.init() before accessing the database.
at com.raizlabs.android.dbflow.config.FlowManager.checkDatabaseHolder(FlowManager.java:507)
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseForTable(FlowManager.java:138)
at com.raizlabs.android.dbflow.config.FlowManager.getModelAdapterOrNull(FlowManager.java:469)
at com.raizlabs.android.dbflow.config.FlowManager.getTableName(FlowManager.java:79)
at com.raizlabs.android.dbflow.sql.language.From.getTableAlias(From.java:43)
at com.raizlabs.android.dbflow.sql.language.From.getQuery(From.java:211)
at com.raizlabs.android.dbflow.sql.language.BaseModelQueriable.querySingle(BaseModelQueriable.java:67)
at com.raizlabs.android.dbflow.sql.language.BaseTransformable.querySingle(BaseTransformable.java:106)
at com.planfisheye.fisheye.database.AuthenticationQueries.getUserDetails(AuthenticationQueries.java:205)
at com.planfisheye.fisheye.SplashActivity.checkDatabase(SplashActivity.java:205)
at com.planfisheye.fisheye.SplashActivity.access$100(SplashActivity.java:49)
at com.planfisheye.fisheye.SplashActivity$3$1.run(SplashActivity.java:187)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
android illegalstateexception dbflow
Your error log is your solution. It clearly says that what you need to do.
– Piyush
Nov 14 '18 at 5:09
But it was not showing previously, why it is showing now?
– Ext1 Dev
Nov 14 '18 at 5:14
add a comment |
How to resolve this issue
Yesterday application was working, Today I run the same code giving me runtime error on splash screen activity.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.planfisheye.fisheye, PID: 11217
java.lang.IllegalStateException: The global database holder is not initialized. Ensure you call FlowManager.init() before accessing the database.
at com.raizlabs.android.dbflow.config.FlowManager.checkDatabaseHolder(FlowManager.java:507)
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseForTable(FlowManager.java:138)
at com.raizlabs.android.dbflow.config.FlowManager.getModelAdapterOrNull(FlowManager.java:469)
at com.raizlabs.android.dbflow.config.FlowManager.getTableName(FlowManager.java:79)
at com.raizlabs.android.dbflow.sql.language.From.getTableAlias(From.java:43)
at com.raizlabs.android.dbflow.sql.language.From.getQuery(From.java:211)
at com.raizlabs.android.dbflow.sql.language.BaseModelQueriable.querySingle(BaseModelQueriable.java:67)
at com.raizlabs.android.dbflow.sql.language.BaseTransformable.querySingle(BaseTransformable.java:106)
at com.planfisheye.fisheye.database.AuthenticationQueries.getUserDetails(AuthenticationQueries.java:205)
at com.planfisheye.fisheye.SplashActivity.checkDatabase(SplashActivity.java:205)
at com.planfisheye.fisheye.SplashActivity.access$100(SplashActivity.java:49)
at com.planfisheye.fisheye.SplashActivity$3$1.run(SplashActivity.java:187)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
android illegalstateexception dbflow
How to resolve this issue
Yesterday application was working, Today I run the same code giving me runtime error on splash screen activity.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.planfisheye.fisheye, PID: 11217
java.lang.IllegalStateException: The global database holder is not initialized. Ensure you call FlowManager.init() before accessing the database.
at com.raizlabs.android.dbflow.config.FlowManager.checkDatabaseHolder(FlowManager.java:507)
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseForTable(FlowManager.java:138)
at com.raizlabs.android.dbflow.config.FlowManager.getModelAdapterOrNull(FlowManager.java:469)
at com.raizlabs.android.dbflow.config.FlowManager.getTableName(FlowManager.java:79)
at com.raizlabs.android.dbflow.sql.language.From.getTableAlias(From.java:43)
at com.raizlabs.android.dbflow.sql.language.From.getQuery(From.java:211)
at com.raizlabs.android.dbflow.sql.language.BaseModelQueriable.querySingle(BaseModelQueriable.java:67)
at com.raizlabs.android.dbflow.sql.language.BaseTransformable.querySingle(BaseTransformable.java:106)
at com.planfisheye.fisheye.database.AuthenticationQueries.getUserDetails(AuthenticationQueries.java:205)
at com.planfisheye.fisheye.SplashActivity.checkDatabase(SplashActivity.java:205)
at com.planfisheye.fisheye.SplashActivity.access$100(SplashActivity.java:49)
at com.planfisheye.fisheye.SplashActivity$3$1.run(SplashActivity.java:187)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
android illegalstateexception dbflow
android illegalstateexception dbflow
edited Nov 14 '18 at 8:09
Gunasekar
5201517
5201517
asked Nov 14 '18 at 5:06
Ext1 DevExt1 Dev
14
14
Your error log is your solution. It clearly says that what you need to do.
– Piyush
Nov 14 '18 at 5:09
But it was not showing previously, why it is showing now?
– Ext1 Dev
Nov 14 '18 at 5:14
add a comment |
Your error log is your solution. It clearly says that what you need to do.
– Piyush
Nov 14 '18 at 5:09
But it was not showing previously, why it is showing now?
– Ext1 Dev
Nov 14 '18 at 5:14
Your error log is your solution. It clearly says that what you need to do.
– Piyush
Nov 14 '18 at 5:09
Your error log is your solution. It clearly says that what you need to do.
– Piyush
Nov 14 '18 at 5:09
But it was not showing previously, why it is showing now?
– Ext1 Dev
Nov 14 '18 at 5:14
But it was not showing previously, why it is showing now?
– Ext1 Dev
Nov 14 '18 at 5:14
add a comment |
1 Answer
1
active
oldest
votes
Try initialising your database in Application class of your project.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293509%2fjava-lang-illegalstateexception-the-global-database-holder-is-not-initialized%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try initialising your database in Application class of your project.
add a comment |
Try initialising your database in Application class of your project.
add a comment |
Try initialising your database in Application class of your project.
Try initialising your database in Application class of your project.
answered Nov 14 '18 at 5:26
muhammed rameezmuhammed rameez
517
517
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293509%2fjava-lang-illegalstateexception-the-global-database-holder-is-not-initialized%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Your error log is your solution. It clearly says that what you need to do.
– Piyush
Nov 14 '18 at 5:09
But it was not showing previously, why it is showing now?
– Ext1 Dev
Nov 14 '18 at 5:14