PersistentStateComponent with Application level cause Error.
PersistentStateComponent with Application level cause Unable to save settings Error.
Before that, I succeeded to use Project level PersistentStateComponent already.
I just changed `plugin.xml` from
<projectService serviceImplementation="models.PersistentUser" />
to
<applicationService serviceImplementation="models.PersistentUser" />
And when I call
`ServiceManager.getService(PersistentUser.class)`, the error occured.
What else I should change codes if I want use Application Level PersistentStateComponent?
Error Log
2018/12/08
23:53 Unable to save settings
Failed to save settings. Please restart IntelliJ IDEA
java.lang.RuntimeException: java.lang.Exception: Cannot get PersistentUser component state
at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:160)
at com.intellij.util.lang.CompoundRuntimeException.throwIfNotEmpty(CompoundRuntimeException.java:153)
at com.intellij.configurationStore.ComponentStoreImpl.save(ComponentStoreImpl.kt:149)
at com.intellij.openapi.components.impl.stores.StoreUtil.save(StoreUtil.java:40)
at com.intellij.openapi.application.impl.ApplicationImpl.saveSettings(ApplicationImpl.java:1432)
at com.intellij.openapi.components.impl.stores.StoreUtil.saveProjectsAndApp(StoreUtil.java:120)
at com.intellij.openapi.components.impl.stores.StoreUtil.saveDocumentsAndProjectsAndApp(StoreUtil.java:113)
at com.intellij.openapi.application.impl.ApplicationImpl.saveAll(ApplicationImpl.java:1441)
at com.intellij.ide.SaveAndSyncHandlerImpl.saveProjectsAndDocuments(SaveAndSyncHandlerImpl.java:126)
at com.in... (show balloon)
Please sign in to leave a comment.
This is my code.
This is my plugin.xml.
And the code below has error.
Could you please post the full exception stack trace from idea.log file?
I cannot find any log file in my project.
How can I get idea.log file?
Use Help | Show Log action to navigate to the log file.