To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.
NullPointerException in InductiveVisualMiner.visualise
I'm using some ProM libraries in a personal project, and I need to know if what I'm doing is right.
1st. I take all the dependencies from ProM project.
2nd. I resolve the dependencies for OpenXas.
Now I'm stuck trying to show the graph, but give me an error of NullPointerException. Maybe what I'm doing is wrong, I just need a light at the end of the maze.
1st. I take all the dependencies from ProM project.
2nd. I resolve the dependencies for OpenXas.
Now I'm stuck trying to show the graph, but give me an error of NullPointerException. Maybe what I'm doing is wrong, I just need a light at the end of the maze.
List<logs> = parseXes.parse(file);//list of xlog
JComponent tt = null;//visual component
for(int i=0;i<logs.size();i++){
XLog log = logs.get(i);
InductiveVisualMiner visualizer = new InductiveVisualMiner();
PluginContext plugin = UciProMGlobalContext.instance().getPluginContext();
InductiveVisualMiner.InductiveVisualMinerLauncher ivml;
ivml = visualizer.mineGuiProcessTree(plugin, log);
tt = visualizer.visualise(plugin , ivml, ProMCanceller.NEVER_CANCEL);//the error is here
}
if(tt != null){
jPanel1.add(tt);
jPanel1.updateUI();
}
Comments
-
Hi,
There are a few suspects:
- the dependencies should be solved automatically and recursively by Apache Ivy. Simply including the .jar files will be tedious and error-prone. Is Ivy enabled on the project?
- UciProMGlobalContext is a class that I'm unfamiliar with. Does this class provide the mechanism to find annotated classes? In another project, I used the Inductive visual Miner outside of ProM, which might provide inspiration: https://svn.win.tue.nl/repos/prom/Packages/SanderLeemans/QuickVisualiser/src/org/processmining/quickvisualiser/context/
If both are fine, please post the full stack trace on this forum and we'll have a look.
Sander
Sander Leemans
Assistant Processor (Lecturer) at Queensland University of Technology
Author of the visual Miner and Inductive Miner -
Basically, I downloaded the rapidProM source code and analice the code, because I don't know how use the pluginManager and all it's methods and classes. Now I goin to see your classes for better understanding. The class UciProMGlobalContext is a singlenton for work with the pluginManager, the pluginContext and others, but like i see in your code I use in my classes a lot of code that is not necesary. Thank you for your answer.
-
I follow the @sjjleemans 's code, and I solved the initial problem, but now return the following error:
java.lang.ClassCastException: javax.swing.plaf.synth.SynthBorder cannot be cast to javax.swing.border.TitledBorder.
This is when I invoke the code:visualizer.visualise(context, log, state);
-
One step furher
Could you post the complete stack trace of this error?
Sander Leemans
Assistant Processor (Lecturer) at Queensland University of Technology
Author of the visual Miner and Inductive Miner -
This is the complete error, thank for the fast answer.
I show the JComponent returned by the visualise() function, but the visual components contain errors.java.lang.ClassCastException: javax.swing.plaf.synth.SynthBorder cannot be cast to javax.swing.border.TitledBorder
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFilterGui.setForeground(IvMFilterGui.java:35)
at javax.swing.plaf.synth.SynthStyle.installDefaults(SynthStyle.java:942)
at javax.swing.plaf.nimbus.NimbusStyle.installDefaults(NimbusStyle.java:231)
at javax.swing.plaf.synth.SynthStyle.installDefaults(SynthStyle.java:916)
at javax.swing.plaf.synth.SynthLookAndFeel.updateStyle(SynthLookAndFeel.java:265)
at javax.swing.plaf.synth.SynthPanelUI.updateStyle(SynthPanelUI.java:117)
at javax.swing.plaf.synth.SynthPanelUI.installDefaults(SynthPanelUI.java:100)
at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:56)
at javax.swing.plaf.synth.SynthPanelUI.installUI(SynthPanelUI.java:62)
at javax.swing.JComponent.setUI(JComponent.java:666)
at javax.swing.JPanel.setUI(JPanel.java:153)
at javax.swing.JPanel.updateUI(JPanel.java:126)
at javax.swing.JPanel.<init>(JPanel.java:86)
at javax.swing.JPanel.<init>(JPanel.java:109)
at javax.swing.JPanel.<init>(JPanel.java:117)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFilterGui.<init>(IvMFilterGui.java:15)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.highlightingfilter.filters.MultiAttributeFilterGui.<init>(MultiAttributeFilterGui.java:36)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.preminingfilters.filters.PreMiningFilterEvents.createGui(PreMiningFilterEvents.java:46)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFilter.createFilterGui(IvMFilter.java:78)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFiltersController.<init>(IvMFiltersController.java:47)
at org.processmining.plugins.inductiveVisualMiner.InductiveVisualMinerController$3.run(InductiveVisualMinerController.java:119)
at org.processmining.plugins.inductiveVisualMiner.chain.ChainLink$1$1.run(ChainLink.java:74)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.ClassCastException: javax.swing.plaf.synth.SynthBorder cannot be cast to javax.swing.border.TitledBorder
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFilterGui.setForeground(IvMFilterGui.java:35)
at javax.swing.plaf.synth.SynthStyle.installDefaults(SynthStyle.java:942)
at javax.swing.plaf.nimbus.NimbusStyle.installDefaults(NimbusStyle.java:231)
at javax.swing.plaf.synth.SynthStyle.installDefaults(SynthStyle.java:916)
at javax.swing.plaf.synth.SynthLookAndFeel.updateStyle(SynthLookAndFeel.java:265)
at javax.swing.plaf.synth.SynthPanelUI.updateStyle(SynthPanelUI.java:117)
at javax.swing.plaf.synth.SynthPanelUI.installDefaults(SynthPanelUI.java:100)
at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:56)
at javax.swing.plaf.synth.SynthPanelUI.installUI(SynthPanelUI.java:62)
at javax.swing.JComponent.setUI(JComponent.java:666)
at javax.swing.JPanel.setUI(JPanel.java:153)
at javax.swing.JPanel.updateUI(JPanel.java:126)
at javax.swing.JPanel.<init>(JPanel.java:86)
at javax.swing.JPanel.<init>(JPanel.java:109)
at javax.swing.JPanel.<init>(JPanel.java:117)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFilterGui.<init>(IvMFilterGui.java:15)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.preminingfilters.filters.SliderGui.<init>(SliderGui.java:20)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.preminingfilters.filters.PreMiningFrequentTracesFilter.createGui(PreMiningFrequentTracesFilter.java:27)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFilter.createFilterGui(IvMFilter.java:78)
at org.processmining.plugins.inductiveVisualMiner.ivmfilter.IvMFiltersController.<init>(IvMFiltersController.java:47)
at org.processmining.plugins.inductiveVisualMiner.InductiveVisualMinerController$3.run(InductiveVisualMinerController.java:119)
at org.processmining.plugins.inductiveVisualMiner.chain.ChainLink$1$1.run(ChainLink.java:74)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) -
I solved the problem, it was only some dependencies errors.
Howdy, Stranger!
Categories
- 1.6K All Categories
- 45 Announcements / News
- 225 Process Mining
- 6 - BPI Challenge 2020
- 9 - BPI Challenge 2019
- 24 - BPI Challenge 2018
- 27 - BPI Challenge 2017
- 8 - BPI Challenge 2016
- 68 Research
- 1K ProM 6
- 394 - Usage
- 288 - Development
- 9 RapidProM
- 1 - Usage
- 7 - Development
- 54 ProM5
- 19 - Usage
- 187 Event Logs
- 32 - ProMimport
- 75 - XESame