JOverseer / joverseer

JOverseer is a desktop application which aims to assist players of the Middle Earth PBM game.
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Fail to start #728

Open GnarlyDave opened 2 years ago

GnarlyDave commented 2 years ago

Seen with java17 on windows. Splash screen appears, then java crashes out. Running joverseer.bat at a command prompt shows that the default look and feel is not being found by the spring framework autowiring. Presumably this is a result of the modularization of Java in version 9 +

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memoryStatusBarItem' defined in class path resource [ctx/jideApplicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jidesoft.status.MemoryStatusBarItem]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: class com.jidesoft.plaf.LookAndFeelFactory (in unnamed module @0x7ce026d3) cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows to unnamed module @0x7ce026d3 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:881) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:837) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.richclient.application.ApplicationLauncher.loadRootApplicationContext(ApplicationLauncher.java:262) at org.springframework.richclient.application.ApplicationLauncher.(ApplicationLauncher.java:158) at org.joverseer.ui.JOverseerJIDEClient.main(Unknown Source) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jidesoft.status.MemoryStatusBarItem]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: class com.jidesoft.plaf.LookAndFeelFactory (in unnamed module @0x7ce026d3) cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows to unnamed module @0x7ce026d3 at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:99) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:875) ... 16 more Caused by: java.lang.IllegalAccessError: class com.jidesoft.plaf.LookAndFeelFactory (in unnamed module @0x7ce026d3) cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows to unnamed module @0x7ce026d3 at com.jidesoft.plaf.LookAndFeelFactory.getDefaultStyle(Unknown Source) at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(Unknown Source) at com.jidesoft.status.StatusBarItem.updateUI(Unknown Source) at com.jidesoft.status.MemoryStatusBarItem.updateUI(Unknown Source) at java.desktop/javax.swing.JPanel.(JPanel.java:89) at java.desktop/javax.swing.JPanel.(JPanel.java:112) at java.desktop/javax.swing.JPanel.(JPanel.java:120) at com.jidesoft.swing.NullPanel.(Unknown Source) at com.jidesoft.status.StatusBarItem.(Unknown Source) at com.jidesoft.status.MemoryStatusBarItem.(Unknown Source) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:84)

GnarlyDave commented 2 years ago

problems start with java 15

GnarlyDave commented 2 years ago

The current solution is to add options to the java VM, by ensuring that jOverseer is started: --add-exports java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED Version 1.16.24+ will correct jOverseer.bat and jOverseer.exe Note that the update process cannot guarantee to find your specific shortcut/link/whatever that you use to start jOverseer. You may find that you have to change the link yourself, or reinstall the latest jOverseer using the appropriate installer instead.