valb3r / flowable-bpmn-intellij-plugin

Flowable, Activiti, Camunda BPMN engines process editor plugin for IntelliJ. Pure Kotlin (and some Java)
https://plugins.jetbrains.com/plugin/14318-flowable-bpmn-visualizer
MIT License
158 stars 31 forks source link

Issue while opening a supported bpmn20.xml in macOS #223

Open tanmayapanda opened 3 years ago

tanmayapanda commented 3 years ago

com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class com.valb3r.bpmn.intellij.plugin.flowable.parser.nodes.diagram.Plane] value failed for JSON property id due to missing (therefore NULL) value for creator parameter id which is a non-nullable type at [Source: (StringReader); line: 932, column: 24] (through reference chain: com.valb3r.bpmn.intellij.plugin.flowable.parser.nodes.BpmnFile["BPMNDiagram"]->java.util.ArrayList[0]->com.valb3r.bpmn.intellij.plugin.flowable.parser.nodes.DiagramNode["BPMNPlane"]->com.valb3r.bpmn.intellij.plugin.flowable.parser.nodes.diagram.Plane["id"]) at com.fasterxml.jackson.module.kotlin.KotlinValueInstantiator.createFromObjectWith(KotlinValueInstantiator.kt:112) at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:198) at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:488) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159) at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:114) at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:530) at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:528) at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:417) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159) at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286) at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245) at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27) at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:530) at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:528) at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:417) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159) at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:114) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3205) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3188) at com.valb3r.bpmn.intellij.plugin.flowable.parser.FlowableParser.parse(FlowableParser.kt:697) at com.valb3r.bpmn.intellij.plugin.core.CanvasBuilder.build(CanvasBuilder.kt:52) at com.valb3r.bpmn.intellij.plugin.core.BpmnPluginToolWindow.run(BpmnPluginToolWindow.kt:82) at com.valb3r.bpmn.intellij.plugin.flowable.actions.ViewFlowableBpmnDiagramAction$actionPerformed$1.run(ViewFlowableBpmnDiagramAction.kt:25) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$activateToolWindow$1.run(ToolWindowManagerImpl.kt:605) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216) at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

valb3r commented 3 years ago

@tanmayapanda Thank you for the feedback, but it would be good to have a BPMN file to reproduce this issue or BPMN-example to reproduce. Currently, it looks like the file is missing the necessary BPMNPlane element, so does not have a layout of elements required for the plugin to work

rherrick commented 2 years ago

I just got this same error and found this issue as a result. The BPMN file with which this occurred is part of an example from Baeldung, which you can find here. I don't know enough about BPMN format to know exactly how this is supposed to work but it looks like the BPMNDiagram/BPMNPlane elements basically mirror the contents of the process definition to provide the graphical layout for the actual diagram, like this example from the flowable-engine repo.

I think a good way to handle this issue would be to detect that the BPMNDiagram/BPMNPlane elements aren't available and pop up a notification that there's no layout element associated with the workflow process. Much friendlier than an inscrutable stack trace that doesn't tell you what the issue actually is!

At least short term. Long term it'd be awesome to generate the BPMNDiagram/BPMNPlane elements and their contents when not present, but that's definitely non-trivial!

valb3r commented 2 years ago

@rherrick Thanks for the feedback,

I think a good way to handle this issue would be to detect that the BPMNDiagram/BPMNPlane elements aren't available and pop up a notification that there's no layout element associated with the workflow process. Much friendlier than an inscrutable stack trace that doesn't tell you what the issue actually is!

This is already incorporated in DEV (not yet published) https://github.com/valb3r/flowable-bpmn-intellij-plugin/commit/3e650884b9646bf158ac8700581d9d472a35e2f8