NullPointerException in unitTest?

I am trying to install unitTest under IDEA 5.1.1 (build 4192) but I get lots of exceptions when I open my project...:

javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.Doc umentBuilderFactoryLocator could not be instantiated: java.lang.NullPointerExcep tion
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderF actory.java:104)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:121)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:83)
at org.intellij.openapi.beans.PluginContext.registerPluginContextBeans(P luginContext.java:145)
at org.intellij.openapi.beans.PluginContext.initContext(PluginContext.ja va:98)
at org.intellij.openapi.beans.PluginContext.init(PluginContext.java:79)
at org.intellij.openapi.beans.PluginContext.]]>(PluginContext.java:52 )
at org.intellij.openapi.beans.PluginBeanFactory.getContext(PluginBeanFac tory.java:44)
at org.intellij.openapi.beans.PluginBeanFactory$1.run(PluginBeanFactory. java:38)
at com.intellij.ide.startup.impl.StartupManagerImpl.a(StartupManagerImpl .java:47)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivi ties(StartupManagerImpl.java:22)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(Proj ectManagerImpl.java:235)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProje ct(ProjectManagerImpl.java:61)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:83)
at com.intellij.ide.RecentProjectsManager$ReopenProjectAction.actionPerf ormed(RecentProjectsManager.java:2)
at com.intellij.openapi.actionSystem.ex.ActionListPopup$1.run(ActionList Popup.java:0)
at com.intellij.ui.ListPopup.closePopup(ListPopup.java:86)
at com.intellij.ui.ListPopup$3.mouseClicked(ListPopup.java:3)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21 2)
at java.awt.Component.processMouseEvent(Component.java:5491)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212 )
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3901)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.jav a:18)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:144)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:143)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_CLICKED,(164,16),button=1,modifiers=Button1,clic kCount=1] on dialog0
ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 5.1.1 Build # 4192
ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.5.0_06
ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) Client VM
ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc .
ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
ERROR - com.intellij.ide.IdeEventQueue - Last Action:
ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_CLICKED,(164,16),button=1,modifiers=Button1,clic kCount=1] on dialog0
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.Doc umentBuilderFactoryLocator could not be instantiated: java.lang.NullPointerExcep tion
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderF actory.java:104)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:121)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:83)
at org.intellij.openapi.beans.PluginContext.registerPluginContextBeans(P luginContext.java:145)
at org.intellij.openapi.beans.PluginContext.initContext(PluginContext.ja va:98)
at org.intellij.openapi.beans.PluginContext.init(PluginContext.java:79)
at org.intellij.openapi.beans.PluginContext.]]>(PluginContext.java:52 )
at org.intellij.openapi.beans.PluginBeanFactory.getContext(PluginBeanFac tory.java:44)
at org.intellij.openapi.beans.PluginBeanFactory$1.run(PluginBeanFactory. java:38)
at com.intellij.ide.startup.impl.StartupManagerImpl.a(StartupManagerImpl .java:47)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivi ties(StartupManagerImpl.java:22)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(Proj ectManagerImpl.java:235)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProje ct(ProjectManagerImpl.java:61)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:83)
at com.intellij.ide.RecentProjectsManager$ReopenProjectAction.actionPerf ormed(RecentProjectsManager.java:2)
at com.intellij.openapi.actionSystem.ex.ActionListPopup$1.run(ActionList Popup.java:0)
at com.intellij.ui.ListPopup.closePopup(ListPopup.java:86)
at com.intellij.ui.ListPopup$3.mouseClicked(ListPopup.java:3)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21 2)
at java.awt.Component.processMouseEvent(Component.java:5491)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212 )
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3901)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.jav a:18)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:144)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:143)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.NullPointerException
at org.intellij.plugins.junit.config.JUnitTestConfiguration.updateRefact orerState(JUnitTestConfiguration.java:104)
at org.intellij.plugins.junit.config.JUnitTestConfiguration.updateIntern alState(JUnitTestConfiguration.java:57)
at org.intellij.plugins.config.Config.configChanged(Config.java:68)
at org.intellij.plugins.config.ConfigEditor.apply(ConfigEditor.java:91)
at org.intellij.plugins.junit.config.JUnitTestConfigurable.apply(JUnitTe stConfigurable.java:279)
at com.intellij.openapi.options.ex.ProjectConfigurableWrapper.apply(Proj ectConfigurableWrapper.java:2)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.doOKAction(S ingleConfigurableEditor.java:33)
at com.intellij.openapi.ui.DialogWrapper$OkAction.actionPerformed(Dialog Wrapper.java:833)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18 49)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav a:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel .java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258 )
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL istener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212 )
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.jav a:18)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:144)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:143)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(Dial ogWrapperPeerImpl.java:2)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapper PeerImpl.java:136)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:730)
at com.intellij.openapi.options.ex.ControlPanelSettingsEditor.b(ControlP anelSettingsEditor.java:17)
at com.intellij.openapi.options.ex.ControlPanelSettingsEditor.access$900 (ControlPanelSettingsEditor.java:54)
at com.intellij.openapi.options.ex.ControlPanelSettingsEditor$MyActionBu tton$1.mouseReleased(ControlPanelSettingsEditor.java:6)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212 )
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.jav a:18)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:144)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:143)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(Dial ogWrapperPeerImpl.java:2)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapper PeerImpl.java:136)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:730)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showControlPanelOptions (ShowSettingsUtilImpl.java:36)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(Show SettingsUtilImpl.java:26)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSetti ngsAction.java:4)
at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(Act ionButton.java:86)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent (ActionButton.java:59)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212 )
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.jav a:18)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:144)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:143)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(810,706),button=1,modifiers=Button1,cl ickCount=1] on dialog2
ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 5.1.1 Build # 4192
ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.5.0_06
ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) Client VM
ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc .
ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
ERROR - com.intellij.ide.IdeEventQueue - Last Action: ShowSettings
ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(810,706),button=1,modifiers=Button1,cl ickCount=1] on dialog2
java.lang.NullPointerException
at org.intellij.plugins.junit.config.JUnitTestConfiguration.updateRefact orerState(JUnitTestConfiguration.java:104)
at org.intellij.plugins.junit.config.JUnitTestConfiguration.updateIntern alState(JUnitTestConfiguration.java:57)
at org.intellij.plugins.config.Config.configChanged(Config.java:68)
at org.intellij.plugins.config.ConfigEditor.apply(ConfigEditor.java:91)
at org.intellij.plugins.junit.config.JUnitTestConfigurable.apply(JUnitTe stConfigurable.java:279)
at com.intellij.openapi.options.ex.ProjectConfigurableWrapper.apply(Proj ectConfigurableWrapper.java:2)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.doOKAction(S ingleConfigurableEditor.java:33)
at com.intellij.openapi.ui.DialogWrapper$OkAction.actionPerformed(Dialog Wrapper.java:833)


Is it a bug or a configuration thing?

Also, an coworker is running this plugin without any problem and the only difference is that he is running Windows and I am running Linux... (and I also have more plugins installed...)

Regards,

BTJ

5 comments
Comment actions Permalink

Hi,

I run under windows so do not see this, but it has been reported before, what has happened is the XML jars are not available. Why i am not 100% sure as Spring does not have a dependancy on particular XML api. The other person reporting the error did not get back to me as to whether putting the XML jars where they are accessible worked. I was under the impression idea shipped with the jars, it certainly does under windows. If i package the jars with the plugin, there will be serious (the usual) xml incompatibility issues. As stated by best suggestion is to check if and where the XML API's are.

Let me know how it goes..
Regards

0
Comment actions Permalink

Which xml jars should I be looking for?

BTJ

0
Comment actions Permalink

Check if you have these in the idea lib directory
-xerces.jar
-xml-apis.jar
-jdom.jar

xml-apis is the one used by spring (according to their dependency list)

The fact it has thrown a NullPointer would seem to indicate that there is no DucumentBuilderFactory to create!

The default classes the factory is trying to find are:
/* The default property name according to the JAXP spec */
"javax.xml.parsers.DocumentBuilderFactory",
/* The fallback implementation class name */
"org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"

I am doing some more research into the matter, hopefully i'll have a definitive answer soon.

0
Comment actions Permalink

Well, all three jar files exists in idea lib directory and xml-apis.jar contains javax.xml.parsers.DocumentBuilderFactory.class


BTJ

0
Comment actions Permalink

hmm so on linux it seems these jars are not available? Let me dig a bit more as to classpath loaders etc and see if i can find the answer.

Regards
Bronwen

0

Please sign in to leave a comment.