Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't setup indexing for enum on last SNAPSHOT #64

Closed
ghost opened this issue Apr 3, 2018 · 8 comments
Closed

Can't setup indexing for enum on last SNAPSHOT #64

ghost opened this issue Apr 3, 2018 · 8 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 3, 2018

Exception:

04-03 10:16:14.045 3658-3658/eu.cortex.cortexalarm E/AndroidRuntime: FATAL EXCEPTION: main
    Process: eu.cortex.cortexalarm, PID: 3658
    java.lang.RuntimeException: Unable to create application eu.cortex.cortexalarm.presentation.AndroidCaApplication: org.dizitart.no2.exceptions.IndexingException: NO2.5020: invalid type specified eu.cortex.cortexalarm.data.daos.caobjectsnotifications.entities.CaoNotificationImportance for indexing
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4347)
        at android.app.ActivityThread.access$1500(ActivityThread.java:135)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5017)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
        at dalvik.system.NativeStart.main(Native Method)
     Caused by: org.dizitart.no2.exceptions.IndexingException: NO2.5020: invalid type specified eu.cortex.cortexalarm.data.daos.caobjectsnotifications.entities.CaoNotificationImportance for indexing
        at org.dizitart.no2.util.ValidationUtils.validateObjectIndexField(ValidationUtils.java:233)
        at org.dizitart.no2.util.ObjectUtils.populateIndex(ObjectUtils.java:220)
        at org.dizitart.no2.util.ObjectUtils.extractIndices(ObjectUtils.java:90)
        at org.dizitart.no2.objects.DefaultObjectRepository.createIndexes(DefaultObjectRepository.java:305)
        at org.dizitart.no2.objects.DefaultObjectRepository.initRepository(DefaultObjectRepository.java:300)
        at org.dizitart.no2.objects.DefaultObjectRepository.<init>(DefaultObjectRepository.java:57)
        at org.dizitart.no2.objects.RepositoryFactory.open(RepositoryFactory.java:46)
        at org.dizitart.no2.Nitrite.getRepository(Nitrite.java:139)
        at eu.cortex.cortexalarm.data.daos.caobjectsnotifications.CaoNotificationsDao.<init>(CaoNotificationsDao.kt:23)
        at eu.cortex.cortexalarm.presentation.app.di.CaObjectsModule.caoNotificationsDao(CaObjectsModule.kt:56)
        at eu.cortex.cortexalarm.presentation.app.di.CaObjectsModule_CaoNotificationsDaoFactory.get(CaObjectsModule_CaoNotificationsDaoFactory.java:31)
        at eu.cortex.cortexalarm.presentation.app.di.CaObjectsModule_CaoNotificationsDaoFactory.get(CaObjectsModule_CaoNotificationsDaoFactory.java:10)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at eu.cortex.cortexalarm.presentation.app.di.CaObjectsModule_CaObjectsManagerFactory.get(CaObjectsModule_CaObjectsManagerFactory.java:45)
        at eu.cortex.cortexalarm.presentation.app.di.CaObjectsModule_CaObjectsManagerFactory.get(CaObjectsModule_CaObjectsManagerFactory.java:12)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at eu.cortex.cortexalarm.presentation.app.di.CaObjectsModule_CaoMessagesDispatcherFactory.get(CaObjectsModule_CaoMessagesDispatcherFactory.java:45)
        at eu.cortex.cortexalarm.presentation.app.di.CaObjectsModule_CaoMessagesDispatcherFactory.get(CaObjectsModule_CaoMessagesDispatcherFactory.java:12)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at eu.cortex.cortexalarm.presentation.app.di.DaggerAppComponent.caoMessagesDispatcher(DaggerAppComponent.java:263)
        at eu.cortex.cortexalarm.presentation.app.CaPresentationApplication.create(CaPresentationApplication.kt:28)
        at eu.cortex.cortexalarm.presentation.AndroidCaApplication.onCreate(AndroidCaApplication.kt:94)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
        at android.app.ActivityThread.access$1500(ActivityThread.java:135) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:136) 
        at android.app.ActivityThread.main(ActivityThread.java:5017) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:515) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
        at dalvik.system.NativeStart.main(Native Method) 
     Caused by: kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
        at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:86)
        at kotlin.jvm.internal.ClassReference.getNestedClasses(ClassReference.kt:35)
        at kotlin.reflect.full.KClasses.getCompanionObject(KClasses.kt:51)

Enum:

enum class CaoDeviceType {
    COMMUNICATOR,
    CONTROL_PANEL
}
@ghost
Copy link
Author

ghost commented Apr 3, 2018

Strange things happens after last android gradle plugin update :D
I will investigate it

@anidotnet
Copy link
Contributor

I think this is the issue as mentioned in stacktrace

Caused by: kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:86)

@ghost
Copy link
Author

ghost commented Apr 3, 2018

Yep but it's build system problem

rolling back to com.android.tools.build:gradle:3.0.1 solved this issue

@ghost ghost closed this as completed Apr 3, 2018
@anidotnet
Copy link
Contributor

That's strange! Did you come to any conclusion as why gradle update is responsible for this? Theoretically it should not.

@ghost
Copy link
Author

ghost commented Apr 3, 2018

Kotlin-reflect dependency wasn't found by nitrite at runtime or something like that.
Nope, I don't know why this is happened :)

@anidotnet
Copy link
Contributor

May be I'll add kotlin-reflect explicitly in next snapshot iteration, I'll notify you here then you can check once after upgrading gradle.

@anidotnet anidotnet reopened this Apr 3, 2018
@anidotnet anidotnet self-assigned this Apr 3, 2018
@anidotnet anidotnet added the bug label Apr 3, 2018
@anidotnet anidotnet added this to the 2.2.0 milestone Apr 3, 2018
@anidotnet
Copy link
Contributor

@TRY4W you can try with the latest snapshot after upgrading the gradle plugin

@ghost
Copy link
Author

ghost commented Apr 7, 2018

@anidotnet Yep now it works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant