Bug #2320
closedCannot run multiple instances of Kepler simultaneously.
0%
Description
Because of the internal database (hsqldb), one cannot run two instances of
kepler simultaneously. The second instance of kepler started results in a very
ugly stacktrace but does not terminate the application. This is an example of
the stacktrace:
java.lang.NullPointerException
at org.kepler.objectmanager.cache.CacheUtil.executeSQLCommand(CacheUtil.java:78)
at org.kepler.objectmanager.cache.CacheManager.<init>(CacheManager.java:101)
at org.kepler.objectmanager.cache.CacheManager.getInstance(CacheManager.java:119)
at org.kepler.moml.KSWLibraryBuilder.buildLibrary(KSWLibraryBuilder.java:82)
at ptolemy.vergil.VergilApplication.openLibrary(VergilApplication.java:230)
at
ptolemy.vergil.VergilApplication._createDefaultConfiguration(VergilApplication.java:418)
at
ptolemy.vergil.VergilApplication._createEmptyConfiguration(VergilApplication.java:439)
at ptolemy.actor.gui.MoMLApplication._parseArgs(MoMLApplication.java:875)
at ptolemy.vergil.VergilApplication._parseArgs(VergilApplication.java:512)
at ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:208)
at ptolemy.vergil.VergilApplication.<init>(VergilApplication.java:105)
at ptolemy.vergil.VergilApplication$1.run(VergilApplication.java:148)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
java.lang.NullPointerException
at org.kepler.objectmanager.cache.CacheUtil.executeSQLCommand(CacheUtil.java:78)
at org.kepler.objectmanager.cache.CacheManager.<init>(CacheManager.java:101)
at org.kepler.objectmanager.cache.CacheManager.getInstance(CacheManager.java:119)
at org.kepler.moml.KSWLibraryBuilder.buildLibrary(KSWLibraryBuilder.java:82)
at ptolemy.vergil.VergilApplication.openLibrary(VergilApplication.java:230)
at
ptolemy.vergil.VergilApplication._createDefaultConfiguration(VergilApplication.java:418)
at
ptolemy.vergil.VergilApplication._createEmptyConfiguration(VergilApplication.java:439)
at ptolemy.actor.gui.MoMLApplication._parseArgs(MoMLApplication.java:875)
at ptolemy.vergil.VergilApplication._parseArgs(VergilApplication.java:512)
at ptolemy.actor.gui.MoMLApplication.<init>(MoMLApplication.java:208)
at ptolemy.vergil.VergilApplication.<init>(VergilApplication.java:105)
at ptolemy.vergil.VergilApplication$1.run(VergilApplication.java:148)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Here are some possible resolutions:
1) deploy hsqldb as a service and have it run in an independent jvm. Questions:
How is startup managed? Are there any performance or resource constraints?
2) test for another instance of kepler and terminate the second copy with an
appropriate error message
3) use a different database system which operates independently from kepler.
MySQL is one example. Questions: what are the deployment issues involved here.
Related issues