warmuuh / milkman

An Extensible Request/Response Workbench
MIT License
1.15k stars 75 forks source link

Explore plugin requires Notes and Scripting plugins #12

Closed mdickin closed 5 years ago

mdickin commented 5 years ago

Version: 3.2.0 OS: Windows 10 Issue: After installing the application with all plugins, I played around a little bit, but was unable to get HTTP requests to work (still looking into that). I tried removing most of the plugins, leaving the Rest and Explore plugins. After doing that and restarting the application, Milkman would flash on screen and then quickly exit. Looking into the logs (dump below), it seems that the Explore plugin is dependent upon Notes plugin. After re-adding that plugin, I got a similar dump for missing class ScriptingAspect.

It's not clear from documentation whether this dependency is intentional or not. If nothing else, an error popup before exit could be beneficial.

Log Dump:

2019-07-09 08:08:46,018 ERROR [JavaFX Application Thread] o.d.n.m.JacksonFacade [JacksonFacade.java:136] Error while converting document to object 
java.lang.IllegalArgumentException: Invalid type id 'milkman.plugin.note.NotesAspect' (for id type 'Id.class'): no such class found (through reference chain: milkman.domain.Workspace["openRequests"]->java.util.ArrayList[0]->milkman.ui.plugin.rest.domain.RestRequestContainer["aspects"]->java.util.ArrayList[3])
    at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:3512)
    at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:3431)
    at org.dizitart.no2.mapper.JacksonFacade.asObject(JacksonFacade.java:134)
    at org.dizitart.no2.mapper.GenericMapper.asObjectInternal(GenericMapper.java:53)
    at org.dizitart.no2.mapper.AbstractMapper.asObject(AbstractMapper.java:76)
    at org.dizitart.no2.objects.ObjectCursor$ObjectCursorIterator.next(ObjectCursor.java:110)
    at milkman.persistence.PersistenceManager.loadWorkspaceNames(PersistenceManager.java:50)
    at milkman.ctrl.ApplicationController.initApplication(ApplicationController.java:62)
    at milkman.MilkmanApplication.start(MilkmanApplication.java:27)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Invalid type id 'milkman.plugin.note.NotesAspect' (for id type 'Id.class'): no such class found (through reference chain: milkman.domain.Workspace["openRequests"]->java.util.ArrayList[0]->milkman.ui.plugin.rest.domain.RestRequestContainer["aspects"]->java.util.ArrayList[3])
    at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:339)
    at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:311)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:298)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
    at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
    at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:163)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:135)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:120)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:91)
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:142)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:279)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
    at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
    at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
    at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:3507)
    ... 17 common frames omitted
Caused by: java.lang.IllegalArgumentException: Invalid type id 'milkman.plugin.note.NotesAspect' (for id type 'Id.class'): no such class found
    at com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver._typeFromId(ClassNameIdResolver.java:66)
    at com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver.typeFromId(ClassNameIdResolver.java:48)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:156)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:106)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:91)
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:142)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:279)
    ... 35 common frames omitted
warmuuh commented 5 years ago

thanks for reporting this. there is no dependency, what you see is that the plugins have stored something in the database which then cannot be loaded as you removed the plugins. This should actually not result in a startup-failure and the db should still work if you remove and add plugins, so there definitely IS an issue, gonna check up on this. (for workaround, you can remove database.db to "reset" the state of milkman)