3 Replies Latest reply: Oct 24, 2011 5:26 PM by 817614 RSS

    WebStart loses resources

    894460
      I have a WebStart Swing application and observe some strange effects since Java version 1.6.0_u18.

      The application has <all-permissions/> in its JNLP file, uses several Jar files as <resources>, all Jar files are signed by the same certificate.

      The application can be started without problems. But sometimes it seems to lose resources. This may happen 5 minutes after startup or some days after startup. I have not found any clues what the trigger may be. The effect is that the application does not get the i18n texts from ResourceBundle anymore or classes cannot be created.

      Logs start for example with NullPointerExceptions where resource data (text, icons, etc.) are accessed.

      Also in the log is a line like this:
      CachedJarFile getCacheEntry /home/user/.java/deployment/cache/6.0/18/44e33652-40ea7211.idx != /home/user/.java/deployment/cache/6.0/18/44e33652-6d60fe02.idx for http://localhost:80/Resources/jgoodies-forms.jar

      And then the log has also:
      java.lang.SecurityException: Trusted-Only loader attempted to load sandboxed resource from http://localhost:80/Resources/jgoodies-forms.jar

      Sometimes I get the security dialog "Java has discovered application components that could indicate a security concern.", but this dialog does not show every time.

      This never happened before u18. I understand that u18 introduced an additional security check which might be related to this strange behaviour, but I am still confused. Because the application first starts without problems and actions and GUI elements that have been working fine suddenly behave in a strange way for an ongoing running application. It looks like WebStart loses resources and then stumbles upon its security check when these resources are re-loaded from the server!?

      Unfortunately this cannot be reproduced easily. Sometimes this happens after some minutes, sometimes the application can be used for days without problems.




      Has anyone observed similar things or can give me a hint what the problem might be?

      I'm at a loss here. Any hints are appreciated. If you need more information, just ask.

      Thanks in advance,
      Andreas
        • 1. Re: WebStart loses resources
          817614
          Logs start for example with NullPointerExceptions where resource data (text, icons, etc.) are accessed.
          It would help the deployment team investigation if you post a few sample stacks.
          • 2. Re: WebStart loses resources
            894460
            It would help the deployment team investigation if you post a few sample stacks.
            This is an excerpt from the logs:

            Exception occurred during event dispatching:
            java.lang.NullPointerException
                 at com.jgoodies.looks.plastic.PlasticXPIconFactory$RadioButtonIcon.drawCheck(PlasticXPIconFactory.java:240)
                 at com.jgoodies.looks.plastic.PlasticXPIconFactory$RadioButtonIcon.paintIcon(PlasticXPIconFactory.java:219)
                 at javax.swing.plaf.metal.MetalRadioButtonUI.paint(MetalRadioButtonUI.java:177)
                 at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
                 at javax.swing.JComponent.paintComponent(JComponent.java:752)
                 at javax.swing.JComponent.paint(JComponent.java:1029)
                 at javax.swing.JComponent.paintChildren(JComponent.java:862)
                 at javax.swing.JComponent.paint(JComponent.java:1038)
                 at javax.swing.JComponent.paintChildren(JComponent.java:862)
                 at javax.swing.JComponent.paint(JComponent.java:1038)
                 at javax.swing.JComponent.paintChildren(JComponent.java:862)
                 at javax.swing.JComponent.paint(JComponent.java:1038)
                 at javax.swing.JComponent.paintChildren(JComponent.java:862)
                 at javax.swing.JComponent.paint(JComponent.java:1038)
                 at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
                 at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
                 at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
                 at javax.swing.RepaintManager.paint(RepaintManager.java:1224)
                 at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
                 at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
                 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:785)
                 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
                 at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
                 at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
                 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
                 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
                 at java.awt.EventQueue.access$000(EventQueue.java:84)
                 at java.awt.EventQueue$1.run(EventQueue.java:602)
                 at java.awt.EventQueue$1.run(EventQueue.java:600)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
                 at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
                 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
                 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
                 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
                 at java.awt.Dialog$1.run(Dialog.java:1046)
                 at java.awt.Dialog$3.run(Dialog.java:1098)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.awt.Dialog.show(Dialog.java:1096)
                 at java.awt.Component.show(Component.java:1584)
                 at java.awt.Component.setVisible(Component.java:1536)
                 at java.awt.Window.setVisible(Window.java:842)
                 at java.awt.Dialog.setVisible(Dialog.java:986)
                 at appl.GF.a(StorableExpertFilterDialog.java:409)
                 at appl.GC.actionPerformed(AbstractFilterAction.java:137)
                 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
                 at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
                 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
                 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
                 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
                 at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
                 at java.awt.Component.processMouseEvent(Component.java:6288)
                 at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
                 at java.awt.Component.processEvent(Component.java:6053)
                 at java.awt.Container.processEvent(Container.java:2041)
                 at java.awt.Component.dispatchEventImpl(Component.java:4651)
                 at java.awt.Container.dispatchEventImpl(Container.java:2099)
                 at java.awt.Component.dispatchEvent(Component.java:4481)
                 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
                 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
                 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
                 at java.awt.Container.dispatchEventImpl(Container.java:2085)
                 at java.awt.Window.dispatchEventImpl(Window.java:2478)
                 at java.awt.Component.dispatchEvent(Component.java:4481)
                 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
                 at java.awt.EventQueue.access$000(EventQueue.java:84)
                 at java.awt.EventQueue$1.run(EventQueue.java:602)
                 at java.awt.EventQueue$1.run(EventQueue.java:600)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
                 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
                 at java.awt.EventQueue$2.run(EventQueue.java:616)
                 at java.awt.EventQueue$2.run(EventQueue.java:614)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
                 at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
                 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
                 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
                 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
                 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
                 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
                 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
            CachedJarFile getCacheEntry /home/user/.java/deployment/cache/6.0/18/44e33652-40ea7211.idx != /home/user/.java/deployment/cache/6.0/18/44e33652-6d60fe02.idx for http://localhost:80/Resources/jgoodies-forms.jar
            12-Oct-2011 08:55:14 appl.k a
            SEVERE: Cannot create form object.
            java.lang.reflect.InvocationTargetException
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                 at appl.k.a(FormUtils.java:51)
                 at appl.adO.a(RetrievalRequestForm.java:73)
                 at appl.Cw.a(AbstractEditWindow.java:267)
                 at appl.aet.actionPerformed(AbstractOpenRetrievalAction.java:128)
                 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
                 at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
                 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
                 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
                 at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
                 at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
                 at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
                 at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
                 at java.awt.Component.processMouseEvent(Component.java:6288)
                 at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
                 at java.awt.Component.processEvent(Component.java:6053)
                 at java.awt.Container.processEvent(Container.java:2041)
                 at java.awt.Component.dispatchEventImpl(Component.java:4651)
                 at java.awt.Container.dispatchEventImpl(Container.java:2099)
                 at java.awt.Component.dispatchEvent(Component.java:4481)
                 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
                 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
                 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
                 at java.awt.Container.dispatchEventImpl(Container.java:2085)
                 at java.awt.Window.dispatchEventImpl(Window.java:2478)
                 at java.awt.Component.dispatchEvent(Component.java:4481)
                 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
                 at java.awt.EventQueue.access$000(EventQueue.java:84)
                 at java.awt.EventQueue$1.run(EventQueue.java:602)
                 at java.awt.EventQueue$1.run(EventQueue.java:600)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
                 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
                 at java.awt.EventQueue$2.run(EventQueue.java:616)
                 at java.awt.EventQueue$2.run(EventQueue.java:614)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
                 at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
                 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
                 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
                 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
                 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
                 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
                 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
            Caused by: java.lang.SecurityException: Trusted-Only loader attempted to load sandboxed resource from http://localhost:80/Resources/jgoodies-forms.jar
                 at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(CPCallbackHandler.java:299)
                 at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1500(CPCallbackHandler.java:123)
                 at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(CPCallbackHandler.java:480)
                 at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(DeployURLClassPath.java:804)
                 at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(DeployURLClassPath.java:904)
                 at com.sun.deploy.security.DeployURLClassPath.getResource(DeployURLClassPath.java:231)
                 at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
                 at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:332)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
                 at com.jgoodies.forms.factories.DefaultComponentFactory.createSeparator(DefaultComponentFactory.java:259)
                 at com.jgoodies.forms.factories.DefaultComponentFactory.createSeparator(DefaultComponentFactory.java:218)
                 at com.jgoodies.forms.builder.PanelBuilder.addSeparator(PanelBuilder.java:687)
                 at appl.adD.<init>(RetrievalExpertFilterForm.java:123)
                 at appl.adF.<init>(RetrievalExpertRequestSetupForm.java:66)
                 ... 47 more
            • 3. Re: WebStart loses resources
              817614
              The behavior sounds like these reference bugs:
              http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6805618
              http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6967414

              You could try lower max heap space and initial heap space to see if you could accelerate the reproduction of the bug. If you could, please add comment, details and maybe some actual test case for the bug. There is some work-around there you could try to see if it actually works. The code in question mentioned in bug 6805618 had been fixed since 6u21, so it would be great if you could contribute actual test case and more details, or some way to help reproduce the problems.