Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE during initial configuration #33

Closed
antimatr0id opened this issue Apr 14, 2013 · 13 comments
Closed

NPE during initial configuration #33

antimatr0id opened this issue Apr 14, 2013 · 13 comments
Labels

Comments

@antimatr0id
Copy link

ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(1227,686),absolute(1230,767),button=1,modifiers=Button1,clickCount=1] on dialog4
java.lang.NullPointerException
at org.sonar.ide.intellij.ui.SonarProjectConfiguration.apply(SonarProjectConfiguration.java:232)
at com.intellij.openapi.options.newEditor.OptionsEditor.apply(OptionsEditor.java:756)
at com.intellij.openapi.options.newEditor.OptionsEditorDialog$ApplyAction.actionPerformed(OptionsEditorDialog.java:274)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:686)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:507)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:334)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1082)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:698)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:397)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1460)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1435)
at com.intellij.ide.actions.ShowSettingsUtilImpl.a(ShowSettingsUtilImpl.java:64)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:51)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:57)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:151)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:169)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:132)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:310)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:686)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:507)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:334)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
[ 194239] ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 12.1.1 Build #IU-129.239
[ 194239] ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.7.0_17
[ 194239] ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) 64-Bit Server VM
[ 194239] ERROR - com.intellij.ide.IdeEventQueue - Vendor: Oracle Corporation
[ 194240] ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
[ 194240] ERROR - com.intellij.ide.IdeEventQueue - Last Action: WelcomeScreen.Settings
npe

@aheusingfeld
Copy link
Collaborator

Hi Dilius, which Version of the plugin are you using? Cheers, Alex

@antimatr0id
Copy link
Author

hey ho. the one available in intellij plugin repo - 1.0.7

@aheusingfeld
Copy link
Collaborator

Hi Dilius, would you be so kind and check my bugfix? https://github.com/aheusingfeld/sonar-intellij-plugin/tree/master/download
If it works for you, I will create a pull-request.

Cheers, Alex

@gshakhn
Copy link
Owner

gshakhn commented Apr 16, 2013

@aheusingfeld Thanks for the potential fix. If it ends up working for @diliuskh, could you cut a separate branch for a pull request? I'd prefer not to merge in the zip file.

Thanks,
George

@aheusingfeld
Copy link
Collaborator

@gshakhn of course, George! It's just for him to try this out ;)

@antimatr0id
Copy link
Author

now there is no npe stacktrace, but i still can't use it(test connection shows nothing; i can save configs, but it seems that plugin doesn't see server; saved config discards after restarting ide).

@aheusingfeld
Copy link
Collaborator

@diliuskh I am still not able to reproduce this bug. Can you provide additional information?

  • Is the project/ module already present in your local sonar instance?
  • Did you double check the credentials?
  • Is there any other output in the event log?

@antimatr0id
Copy link
Author

i'm starting idea like "sh idea.sh"; there is no projects in idea or in sonar(db mysql; one default user admin:admin, one custom); then i go to Configure -> Settings -> Sonar Configuration. Intellij Idea 12.1.1 Build 129.239.
When i create or import project i do the same thing, but there is no npe, just empty plugin tabs "current file" and "last inspection". still no feedback on "test connection". other plugins like teamcity integration work fine. perhaps i should try out prev version of idea.

@gshakhn
Copy link
Owner

gshakhn commented Apr 17, 2013

Not sure if it's related, but the plugin in depends on an analysis already being done in Sonar. The plugin doesn't actually run an analysis itself. Can you run an analysis so that a project shows up in Sonar and try again?

@aheusingfeld
Copy link
Collaborator

I'm currently adding MessageDialogs to the plugin to provide user feedback whether the connection to Sonar could be established. If not, the error will be shown.
Currently only stores the settings if the connection was successful. So if you reopen the project settings and your credentials are empty, the connection wasn't successful.

I'll get back to you later today with a new Zip! ;)

@aheusingfeld
Copy link
Collaborator

Sorry, @diliuskh it took a bit longer. Can you check out this snapshot? https://github.com/aheusingfeld/sonar-intellij-plugin/blob/867cb2a0fcea3585e0444500d2fae323870c7ffa/download/sonar-intellij-plugin-1.0.8-SNAPSHOT.zip

When an error/ exception occurs during "Test Connection", this will show up in a message popup.

@antimatr0id
Copy link
Author

yay! it works fine now. thank you for quick response and support.

@aheusingfeld
Copy link
Collaborator

Great. So there is no error dialog showing up anymore?
Well, that's what we're here for: help and support to improve the plugin for everybody! Please feel encouraged to provide further feedback. ;-)

@gshakhn I will clean up some things and issue a pull-request tomorrow.

aheusingfeld added a commit to aheusingfeld/sonar-intellij-plugin that referenced this issue Apr 21, 2013
* prevented potential NPE
* added dialog box for sonar connection errors

Issues: gshakhn#33
aheusingfeld added a commit to aheusingfeld/sonar-intellij-plugin that referenced this issue Apr 24, 2013
* removed unnecessary whitespace

Issues: gshakhn#33
gshakhn added a commit that referenced this issue Apr 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants