Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-2569

NullPointerException in LegacyProjectChecker

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.9.2.RELEASE, 3.0.0.M1
    • Component/s: None
    • Labels:
      None

      Description

      !SESSION 2012-04-02 13:16:19.217 -----------------------------------------------
      eclipse.buildId=2.8.1.201111221000-RELEASE
      java.version=1.6.0_31
      java.vendor=Sun Microsystems Inc.
      BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
      Framework arguments:  -product com.springsource.sts.ide
      Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product com.springsource.sts.ide
       
      !ENTRY org.eclipse.ui.workbench 4 2 2012-04-02 13:25:42.364
      !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
      !STACK 0
      java.lang.NullPointerException
      	at com.springsource.sts.maven.internal.legacyconversion.LegacyProjectChecker.earlyStartup(LegacyProjectChecker.java:29)
      	at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87)
      	at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.ui.internal.Workbench$63.run(Workbench.java:2465)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

        Activity

        ogierke Oliver Gierke created issue -
        mlippert Martin Lippert made changes -
        Field Original Value New Value
        Assignee Martin Lippert [ mlippert ]
        Hide
        mlippert Martin Lippert added a comment -

        The LegacyProjectChecker is registered and called as an early startup extension. It then accesses the plugins default object, which is itself created when the bundle gets started (the usual mechanism). Although the bundle is defined as automatically being activated when one of its classes is accessed, the package of the LegacyProjectChecker is explicitly excluded from this rule. Therefore it looks like the ProjectLegacyChecker could be executed without the bundle being started before, and the NPE happens.

        Assigning to Andrew, he might know more about why that package is explicitly excluded from the bundle activation policy.

        Show
        mlippert Martin Lippert added a comment - The LegacyProjectChecker is registered and called as an early startup extension. It then accesses the plugins default object, which is itself created when the bundle gets started (the usual mechanism). Although the bundle is defined as automatically being activated when one of its classes is accessed, the package of the LegacyProjectChecker is explicitly excluded from this rule. Therefore it looks like the ProjectLegacyChecker could be executed without the bundle being started before, and the NPE happens. Assigning to Andrew, he might know more about why that package is explicitly excluded from the bundle activation policy.
        mlippert Martin Lippert made changes -
        Assignee Martin Lippert [ mlippert ] Andrew Eisenberg [ aeisenberg ]
        Hide
        aeisenberg Andrew Eisenberg added a comment -

        That's probably a bug that LegacyProjectChecker could be executed before the STS maven plugin is started.

        Excluding the legacyconversion package from lazy starting in the manifest is there as an optimization for startup, but obviously this can cause errors if the plugin has not already been started. So, it's apparent that the optimization is useless. I'll remove the lazy startup exclusion from the manifest and the error should go away.

        Show
        aeisenberg Andrew Eisenberg added a comment - That's probably a bug that LegacyProjectChecker could be executed before the STS maven plugin is started. Excluding the legacyconversion package from lazy starting in the manifest is there as an optimization for startup, but obviously this can cause errors if the plugin has not already been started. So, it's apparent that the optimization is useless. I'll remove the lazy startup exclusion from the manifest and the error should go away.
        Hide
        aeisenberg Andrew Eisenberg added a comment -

        I pushed the change and it will be available in the next nightly build.

        Show
        aeisenberg Andrew Eisenberg added a comment - I pushed the change and it will be available in the next nightly build.
        aeisenberg Andrew Eisenberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Complete [ 13 ]
        Fix Version/s 3.0.0.M1 [ 11805 ]
        mlippert Martin Lippert made changes -
        Fix Version/s 2.9.2.RELEASE [ 12092 ]
        Hide
        mlippert Martin Lippert added a comment -

        Added this fix to the 2.9.2 release code base.

        Show
        mlippert Martin Lippert added a comment - Added this fix to the 2.9.2 release code base.
        tmarshall Trevor Marshall made changes -
        Workflow jira [ 42801 ] jira with Pivotal Tracker [ 66564 ]
        tmarshall Trevor Marshall made changes -
        Project Import Thu Apr 06 15:50:53 UTC 2017 [ 1491493853826 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        4d 9h 15m 1 Andrew Eisenberg 16/Apr/12 9:01 AM

          People

          • Assignee:
            aeisenberg Andrew Eisenberg
            Reporter:
            ogierke Oliver Gierke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: