java.lang.NullPointerException

JIRA | Tim Anderson | 4 years ago
  1. 0

    From the mailing list: {noformat} java.lang.NullPointerException at com.izforge.izpack.installer.bootstrap.InstallerGui$1.run(InstallerGui.java:64) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673) at java.awt.EventQueue.access$300(EventQueue.java:96) at java.awt.EventQueue$2.run(EventQueue.java:634) at java.awt.EventQueue$2.run(EventQueue.java:632) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105) at java.awt.EventQueue.dispatchEvent(EventQueue.java:643) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) Caused by: com.izforge.izpack.api.exception.ContainerException: java.lang.NullPointerException at com.izforge.izpack.core.container.AbstractContainer.initialise(AbstractContainer.java:311) at com.izforge.izpack.core.container.AbstractContainer.initialise(AbstractContainer.java:283) at com.izforge.izpack.installer.container.impl.GUIInstallerContainer.<init>(GUIInstallerContainer.java:43) at com.izforge.izpack.installer.bootstrap.InstallerGui$1.run(InstallerGui.java:48) ... 14 more Caused by: java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:204) at com.izforge.izpack.installer.container.provider.IconsProvider.parseXML(IconsProvider.java:99) at com.izforge.izpack.installer.container.provider.IconsProvider.loadCustomIcons(IconsProvider.java:77) at com.izforge.izpack.installer.container.provider.IconsProvider.provide(IconsProvider.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:141) at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:37) at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:125) at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272) at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:132) at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58) at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142) at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96) at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64) at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91) at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:692) at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646) at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:671) at com.izforge.izpack.core.container.AbstractContainer.getComponent(AbstractContainer.java:131) at com.izforge.izpack.installer.container.impl.GUIInstallerContainer.initFrame(GUIInstallerContainer.java:105) at com.izforge.izpack.installer.container.impl.GUIInstallerContainer.resolveComponents(GUIInstallerContainer.java:94) at com.izforge.izpack.installer.container.impl.InstallerContainer.fillContainer(InstallerContainer.java:79) at com.izforge.izpack.core.container.AbstractContainer.initialise(AbstractContainer.java:303) ... 17 more {noformat} This is occuring due to these lines in IconsProvider: {noformat} url = InstallerFrame.class.getResource(icon.getAttribute("res")); img = new ImageIcon(url); {noformat} The URL needs to be checked for null.

    JIRA | 4 years ago | Tim Anderson
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    GitHub comment 29#11666982

    GitHub | 4 years ago | sodanovels
    java.lang.NullPointerException

  1. archenroot 1 times, last 2 weeks ago
  2. rexgreenza 8 times, last 3 months ago
  3. bpbhat77 6 times, last 5 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at javax.swing.ImageIcon.<init>()
  2. Java RT
    ImageIcon.<init>
    1. javax.swing.ImageIcon.<init>(ImageIcon.java:204)
    1 frame
  3. com.izforge.izpack
    IconsProvider.provide
    1. com.izforge.izpack.installer.container.provider.IconsProvider.parseXML(IconsProvider.java:99)
    2. com.izforge.izpack.installer.container.provider.IconsProvider.loadCustomIcons(IconsProvider.java:77)
    3. com.izforge.izpack.installer.container.provider.IconsProvider.provide(IconsProvider.java:35)
    3 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:616)
    4 frames
  5. PicoContainer Core
    DefaultPicoContainer.getComponent
    1. org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:141)
    2. org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:37)
    3. org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:125)
    4. org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272)
    5. org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:132)
    6. org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
    7. org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
    8. org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
    9. org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
    10. org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
    11. org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:692)
    12. org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
    13. org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:671)
    13 frames
  6. com.izforge.izpack
    InstallerGui$1.run
    1. com.izforge.izpack.core.container.AbstractContainer.getComponent(AbstractContainer.java:131)
    2. com.izforge.izpack.installer.container.impl.GUIInstallerContainer.initFrame(GUIInstallerContainer.java:105)
    3. com.izforge.izpack.installer.container.impl.GUIInstallerContainer.resolveComponents(GUIInstallerContainer.java:94)
    4. com.izforge.izpack.installer.container.impl.InstallerContainer.fillContainer(InstallerContainer.java:79)
    5. com.izforge.izpack.core.container.AbstractContainer.initialise(AbstractContainer.java:303)
    6. com.izforge.izpack.core.container.AbstractContainer.initialise(AbstractContainer.java:283)
    7. com.izforge.izpack.installer.container.impl.GUIInstallerContainer.<init>(GUIInstallerContainer.java:43)
    8. com.izforge.izpack.installer.bootstrap.InstallerGui$1.run(InstallerGui.java:48)
    8 frames
  7. Java RT
    EventDispatchThread.run
    1. java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
    2. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
    3. java.awt.EventQueue.access$300(EventQueue.java:96)
    4. java.awt.EventQueue$2.run(EventQueue.java:634)
    5. java.awt.EventQueue$2.run(EventQueue.java:632)
    6. java.security.AccessController.doPrivileged(Native Method)
    7. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    8. java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
    9. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    10. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    11. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    12. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    13. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    14. java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
    14 frames