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

Spring Data repository not parsed correctly if annotated with @Repository

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0.RELEASE
    • Component/s: DATA
    • Labels:
      None
    • Environment:
      Latest STS 3.5 integration build

      Description

      When a Spring Data repository is annotated with @Repository (to alter the bean name the repository is registered under) STS fails to parse the repository interface:

      java.lang.NullPointerException
      	at org.springframework.ide.eclipse.data.SpringDataUtils.isRepositoryBean(SpringDataUtils.java:108)
      	at org.springframework.ide.eclipse.data.SpringDataUtils.asText(SpringDataUtils.java:184)
      	at org.springframework.ide.eclipse.data.metadata.ui.RepositoriesBeanMetadata.getValueAsText(RepositoriesBeanMetadata.java:62)
      	at org.springframework.ide.eclipse.data.metadata.ui.RepositoriesBeanMetadataLabelProvider.getText(RepositoriesBeanMetadataLabelProvider.java:42)
      	at org.springframework.ide.eclipse.beans.ui.model.BeansModelLabelProvider.getText(BeansModelLabelProvider.java:108)
      	at org.springframework.ide.eclipse.beans.ui.navigator.BeansNavigatorLabelProvider.getText(BeansNavigatorLabelProvider.java:166)
      	at org.springframework.ide.eclipse.ui.viewers.DecoratingWorkbenchTreePathLabelProvider.getText(DecoratingWorkbenchTreePathLabelProvider.java:57)
      	at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.findStyledText(NavigatorContentServiceLabelProvider.java:171)
      	at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getStyledText(NavigatorContentServiceLabelProvider.java:151)
      	at org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider$StyledLabelProviderAdapter.getStyledText(NavigatorDecoratingLabelProvider.java:68)
      	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getStyledText(DelegatingStyledCellLabelProvider.java:195)
      	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getStyledText(DecoratingStyledCellLabelProvider.java:192)
      	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:103)
      	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
      	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:953)
      	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:113)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1033)
      	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:848)
      	at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:823)
      	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:797)
      	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:768)
      	at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1500)
      	at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:952)
      	at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(AbstractTreeViewer.java:1511)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:132)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
      	at org.eclipse.swt.widgets.TreeItem.sendExpand(TreeItem.java:1025)
      	at org.eclipse.swt.widgets.Tree.expandItem_expandChildren(Tree.java:1248)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5762)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:221)
      	at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1093)
      	at org.eclipse.swt.widgets.Tree.mouseDownSuper(Tree.java:2052)
      	at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1085)
      	at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2538)
      	at org.eclipse.swt.widgets.Tree.mouseDown(Tree.java:2007)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5495)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:221)
      	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2102)
      	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2299)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5559)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5004)
      	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5153)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
      	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3618)
      	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
      	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
      	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
      	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
      	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:601)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
      

        Attachments

          Activity

            People

            Assignee:
            mlippert Martin Lippert
            Reporter:
            ogierke Oliver Gierke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: