Dexels / navajo

Navajo Service-oriented Applications
GNU Affero General Public License v3.0
9 stars 5 forks source link

(Tipi) (Swing) Fix exception at startup using JNLP for SLC and other TipiSwing applications #436

Open kharybdys opened 6 years ago

kharybdys commented 6 years ago

If you use the jnlp's to start up SLC or TeamRegistration dashboard, you get an exception as follows (SLC):

Java Web Start 11.161.2.12 x86
Using JRE version 1.8.0_161-b12 Java HotSpot(TM) Client VM
User home directory = C:\Users\Dexels
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
CacheEntry[https://club-test.sportlink.com/apps/club-test/lib/knvb_jnlp.jar]: updateAvailable=true,lastModified=Tue Feb 27 11:53:53 CET 2018,length=32413
Activated HttpLogAppender
Activated LogShipper
2018-03-02 15:12:08 INFO  TipiContext:375 - Parsing includes took: 94
2018-03-02 15:12:08 INFO  RemoteValidationPropertiesHandler:36 - Going to retrieve validation.properties for nl - knvb - av
2018-03-02 15:12:08 INFO  RemoteValidationPropertiesHandler:36 - Going to retrieve validation.properties for nl - knvb - av
2018-03-02 15:12:08 INFO  SwingTipiContext:593 - JNLP detected, cache: true. Instantiating webstart loader loaderType: tipi/
2018-03-02 15:12:08 INFO  CachedHttpJnlpResourceLoader:38 - Creating JNLP-backed local cache: relativePath: tipi/ id: tipi useJnlpLocalStorageString: null
2018-03-02 15:12:08 INFO  JnlpLocalStorage:49 - local muffins size: 0
2018-03-02 15:12:08 INFO  SwingTipiContext:593 - JNLP detected, cache: true. Instantiating webstart loader loaderType: resource/
2018-03-02 15:12:08 INFO  CachedHttpJnlpResourceLoader:38 - Creating JNLP-backed local cache: relativePath: resource/ id: resource useJnlpLocalStorageString: null
2018-03-02 15:12:08 INFO  JnlpLocalStorage:49 - local muffins size: 0
2018-03-02 15:12:09 INFO  RemoteValidationPropertiesHandler:36 - Going to retrieve validation.properties for nl - knvb - av
java.lang.NoClassDefFoundError: org/jdesktop/swingx/painter/Painter
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.pushingpixels.lafplugin.PluginManager.getPlugin(PluginManager.java:105)
    at org.pushingpixels.lafplugin.PluginManager.getAvailablePlugins(PluginManager.java:158)
    at org.pushingpixels.lafplugin.PluginManager.getAvailablePlugins(PluginManager.java:122)
    at org.pushingpixels.lafplugin.ComponentPluginManager.processAllDefaultsEntries(ComponentPluginManager.java:110)
    at org.pushingpixels.substance.api.SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.java:2110)
    at org.pushingpixels.substance.api.SubstanceLookAndFeel.initialize(SubstanceLookAndFeel.java:1656)
    at javax.swing.UIManager.setLookAndFeel(Unknown Source)
    at javax.swing.UIManager.setLookAndFeel(Unknown Source)
    at tipiswing.TipiSwingExtension.setLookAndFeel(TipiSwingExtension.java:99)
    at com.dexels.navajo.tipi.components.swingimpl.SwingTipiContext$6.run(SwingTipiContext.java:565)
    at com.dexels.navajo.tipi.components.swingimpl.SwingTipiContext.runSyncInEventThread(SwingTipiContext.java:185)
    at com.dexels.navajo.tipi.components.swingimpl.SwingTipiContext.processProperties(SwingTipiContext.java:560)
    at tipiswing.SwingTipiApplicationInstance.createContext(SwingTipiApplicationInstance.java:125)
    at tipi.BaseTipiApplicationInstance.startup(BaseTipiApplicationInstance.java:49)
    at tipi.MainApplication$1.run(MainApplication.java:154)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingx.painter.Painter
    at java.net.URLClassLoader.findClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 31 more
2018-03-02 15:12:09 INFO  BaseTipiErrorHandler:265 - Retrieved validation.properties from server
2018-03-02 15:12:09 INFO  BaseTipiErrorHandler:265 - Retrieved validation.properties from server
2018-03-02 15:12:09 INFO  BaseTipiErrorHandler:265 - Retrieved validation.properties from server
2018-03-02 15:12:09 INFO  TipiContext:1014 - FALLBACK: Using TipiContext classloader to locate.
2018-03-02 15:12:09 INFO  Expression:47 - Compile expressions: true
2018-03-02 15:12:09 INFO  ExpressionCache:133 - Function cache stats. Value hit: 0 expression hit: 0 parse count: 0 cached expression size: 0 cached value size: 0
2018-03-02 15:12:09 INFO  TipiContext:625 - Connecting to server: https://knvb-test.sportlink.com/navajo
2018-03-02 15:12:09 INFO  TipiGeneralAspManager:187 - Setting instanceid to: null

You can mimic the same effect by removing the swingx.jar file from the com.dexels.navajo.tipi.swing.swingx project from the classpath in your launch file

kharybdys commented 6 years ago

Note that the exception doesn't seem to impact the program at all