Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.3.0
    • Fix Version/s: 1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      maven 2.2.1
      eclipse (helios/Galileo)
      Sonar: 2.4.1
    • Number of attachments :
      2

      Description

      I've installed the Eclipse plugin in both Helios and Galileo.
      I've configured the Sonar server in Window > Preferences > Sonar . I'm able to see my server configs and the connection tests got success.

      In Eclipse, I've rigth-clicked the mouse on my project > COnfigure > Associate with Sonar. I filled the GroupId and the ArtifactID and click Finish. I got the following exception: (See the atached picture for more details)

      org.eclipse.core.internal.resources.ResourceException(/GifeEJB)[566]: java.lang.NullPointerException
      at org.sonar.ide.eclipse.jdt.internal.JavaElementsAdapterFactory.getAdapter(JavaElementsAdapterFactory.java:83)
      at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:326)
      at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:356)
      at org.sonar.ide.eclipse.utils.PlatformUtils.adapt(PlatformUtils.java:46)
      at org.sonar.ide.eclipse.jobs.RefreshAllViolationsJob.visit(RefreshAllViolationsJob.java:80)
      at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:112)
      at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:64)
      at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
      at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127)
      at org.eclipse.core.internal.resources.Resource.accept(Resource.java:74)
      at org.eclipse.core.internal.resources.Resource.accept(Resource.java:110)
      at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94)
      at org.sonar.ide.eclipse.jobs.AbstractRefreshModelJob.run(AbstractRefreshModelJob.java:72)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      

      And going to Window > Preferences > Sonar again, there's another blank server just created!!!! See the attached picture for more details

      1. anex1.jpg
        23 kB
      2. anexo2.jpg
        33 kB

        Activity

        Hide
        Evgeny Mandrikov added a comment -

        I suppose that you didn't set server in wizard (Project > Configure > Associate with Sonar).

        Show
        Evgeny Mandrikov added a comment - I suppose that you didn't set server in wizard (Project > Configure > Associate with Sonar).
        Hide
        Pedro Dionizio Filho added a comment - - edited

        No! I did it!

        Even thoughi I've selected the server when going to (Project > Configure > Associate with Sonar) I'm not able to retrive the infos from Sonar. The same error still appears.

        At the Error Log I can see:

        SonarJdtPlugin started

        And then, when I click to refresh the violations I get:

        eclipse.buildId=M20100909-0800
        java.version=1.6.0_20
        java.vendor=Sun Microsystems Inc.
        BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR
        Framework arguments:  -product org.eclipse.epp.package.jee.product
        Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
        
        
        Error
        Tue Nov 23 08:33:39 BRST 2010
        An error occurred while traversing resources.
        
        java.lang.NullPointerException
        at org.sonar.ide.eclipse.jdt.internal.JavaElementsAdapterFactory.getAdapter(JavaElementsAdapterFactory.java:83)
        at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:326)
        at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:356)
        at org.sonar.ide.eclipse.utils.PlatformUtils.adapt(PlatformUtils.java:46)
        at org.sonar.ide.eclipse.jobs.RefreshAllViolationsJob.visit(RefreshAllViolationsJob.java:80)
        at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:112)
        at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:64)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
        at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:74)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:110)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94)
        at org.sonar.ide.eclipse.jobs.AbstractRefreshModelJob.run(AbstractRefreshModelJob.java:72)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        
        And this one: 
        
        eclipse.buildId=M20100909-0800
        java.version=1.6.0_20
        java.vendor=Sun Microsystems Inc.
        BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR
        Framework arguments:  -product org.eclipse.epp.package.jee.product
        Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
        
        
        Error
        Tue Nov 23 08:35:49 BRST 2010
        An error occurred while traversing resources.
        
        org.eclipse.core.internal.resources.ResourceException(/ProjectCore)[566]: java.lang.NullPointerException
        	at org.sonar.ide.eclipse.jdt.internal.JavaElementsAdapterFactory.getAdapter(JavaElementsAdapterFactory.java:83)
        	at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:326)
        	at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:356)
        	at org.sonar.ide.eclipse.utils.PlatformUtils.adapt(PlatformUtils.java:46)
        	at org.sonar.ide.eclipse.jobs.RefreshAllViolationsJob.visit(RefreshAllViolationsJob.java:80)
        	at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:112)
        	at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:64)
        	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
        	at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127)
        	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:74)
        	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:110)
        	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94)
        	at org.sonar.ide.eclipse.jobs.AbstractRefreshModelJob.run(AbstractRefreshModelJob.java:72)
        	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        

        What should I do? Did I do something wrong?

        I've analized two projects. One of then I'm able to see some violations, but when I try to refresh then, the error appears. The another one I'm not able to see any violations, neither refresh it.

        Show
        Pedro Dionizio Filho added a comment - - edited No! I did it! Even thoughi I've selected the server when going to (Project > Configure > Associate with Sonar) I'm not able to retrive the infos from Sonar. The same error still appears. At the Error Log I can see: SonarJdtPlugin started And then, when I click to refresh the violations I get: eclipse.buildId=M20100909-0800 java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product Error Tue Nov 23 08:33:39 BRST 2010 An error occurred while traversing resources. java.lang.NullPointerException at org.sonar.ide.eclipse.jdt.internal.JavaElementsAdapterFactory.getAdapter(JavaElementsAdapterFactory.java:83) at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:326) at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:356) at org.sonar.ide.eclipse.utils.PlatformUtils.adapt(PlatformUtils.java:46) at org.sonar.ide.eclipse.jobs.RefreshAllViolationsJob.visit(RefreshAllViolationsJob.java:80) at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:112) at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:64) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82) at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:74) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:110) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94) at org.sonar.ide.eclipse.jobs.AbstractRefreshModelJob.run(AbstractRefreshModelJob.java:72) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) And this one: eclipse.buildId=M20100909-0800 java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product Error Tue Nov 23 08:35:49 BRST 2010 An error occurred while traversing resources. org.eclipse.core.internal.resources.ResourceException(/ProjectCore)[566]: java.lang.NullPointerException at org.sonar.ide.eclipse.jdt.internal.JavaElementsAdapterFactory.getAdapter(JavaElementsAdapterFactory.java:83) at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:326) at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:356) at org.sonar.ide.eclipse.utils.PlatformUtils.adapt(PlatformUtils.java:46) at org.sonar.ide.eclipse.jobs.RefreshAllViolationsJob.visit(RefreshAllViolationsJob.java:80) at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:112) at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:64) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82) at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:74) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:110) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94) at org.sonar.ide.eclipse.jobs.AbstractRefreshModelJob.run(AbstractRefreshModelJob.java:72) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) What should I do? Did I do something wrong? I've analized two projects. One of then I'm able to see some violations, but when I try to refresh then, the error appears. The another one I'm not able to see any violations, neither refresh it.
        Hide
        Evgeny Mandrikov added a comment - - edited

        Ok, could you please try to install latest snapshot version from http://bamboo.ci.codehaus.org/browse/SONARIDE-ECLIPSE-495/artifact/update-site ? Because I've made some fixes for NPE.

        Show
        Evgeny Mandrikov added a comment - - edited Ok, could you please try to install latest snapshot version from http://bamboo.ci.codehaus.org/browse/SONARIDE-ECLIPSE-495/artifact/update-site ? Because I've made some fixes for NPE.
        Hide
        Pedro Dionizio Filho added a comment - - edited

        ok,

        I've installed this version from http://bamboo.ci.codehaus.org/browse/SONARIDE-ECLIPSE-495/artifact/update-site and now it's working!

        But the blank server still appears when I go to Window -> Preferences -> Sonar even selecting the correct one when associating my project with sonar.

        Should I still use this version ?

        Thanks a lot for the support!

        Show
        Pedro Dionizio Filho added a comment - - edited ok, I've installed this version from http://bamboo.ci.codehaus.org/browse/SONARIDE-ECLIPSE-495/artifact/update-site and now it's working! But the blank server still appears when I go to Window -> Preferences -> Sonar even selecting the correct one when associating my project with sonar. Should I still use this version ? Thanks a lot for the support!
        Hide
        Evgeny Mandrikov added a comment -

        Hi,

        So this means that your issue were resolved in version 1.0. My advise is to switch on this version, when it would be available publicly (stay tuned). But for now you can continue to use snapshot, because in fact it can be treated as release candidate.

        Show
        Evgeny Mandrikov added a comment - Hi, So this means that your issue were resolved in version 1.0. My advise is to switch on this version, when it would be available publicly (stay tuned). But for now you can continue to use snapshot, because in fact it can be treated as release candidate.

          People

          • Assignee:
            Evgeny Mandrikov
            Reporter:
            Pedro Dionizio Filho
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: