Announcement Announcement Module
Collapse
No announcement yet.
GSP Editor NullPointerException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • GSP Editor NullPointerException

    The GSP editor has been broken ever since I updated last week. I have updated every day since hoping that the problem would be fixed but alas.

    Here is my error...

    Code:
    Could not open the editor: Editor could not be initialized.
    
    java.lang.NullPointerException
    	at com.springsource.sts.grails.editor.groovy.elements.GrailsProject.findTagLibClassesInFolder(GrailsProject.java:190)
    	at com.springsource.sts.grails.editor.groovy.elements.GrailsProject.getCustomTagLibClasses(GrailsProject.java:176)
    	at com.springsource.sts.grails.editor.gsp.tags.GSPModelQueryCMProvider.initializeAllTags(GSPModelQueryCMProvider.java:284)
    	at com.springsource.sts.grails.editor.gsp.tags.GSPModelQueryCMProvider.<init>(GSPModelQueryCMProvider.java:262)
    	at com.springsource.sts.grails.editor.gsp.tags.GSPModelQueryImpl.<init>(GSPModelQueryImpl.java:33)
    	at com.springsource.sts.grails.editor.gsp.tags.ModelQueryAdapterFactoryForGSP.createModelQuery(ModelQueryAdapterFactoryForGSP.java:111)
    	at com.springsource.sts.grails.editor.gsp.tags.ModelQueryAdapterFactoryForGSP.createAdapter(ModelQueryAdapterFactoryForGSP.java:102)
    	at org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory.adaptNew(AbstractAdapterFactory.java:120)
    	at org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory.adapt(AbstractAdapterFactory.java:64)
    	at org.eclipse.wst.sse.core.internal.provisional.AbstractNotifier.getAdapterFor(AbstractNotifier.java:93)
    	at org.eclipse.jst.jsp.core.internal.modelhandler.JSPModelLoader.preLoadAdapt(JSPModelLoader.java:195)
    	at org.eclipse.wst.sse.core.internal.model.AbstractModelLoader.createModel(AbstractModelLoader.java:124)
    	at org.eclipse.wst.sse.core.internal.FileBufferModelManager.getModel(FileBufferModelManager.java:721)
    	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl._getModelFor(ModelManagerImpl.java:658)
    	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getModelForEdit(ModelManagerImpl.java:1390)
    	at org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(StructuredTextEditor.java:1731)
    	at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3115)
    	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
    	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
    	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
    	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2579)
    	at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3133)
    	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3160)
    	at org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredTextEditor.java:2321)
    	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
    	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:644)
    	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
    	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
    	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
    	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
    	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
    	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
    	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
    	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
    	at org.eclipse.mylyn.internal.resources.ui.ResourceUiBridge.internalOpenEditor(ResourceUiBridge.java:62)
    	at org.eclipse.mylyn.internal.resources.ui.ResourceUiBridge.open(ResourceUiBridge.java:51)
    	at org.eclipse.mylyn.internal.context.ui.ContextEditorManager.openEditorsFromMemento(ContextEditorManager.java:164)
    	at org.eclipse.mylyn.internal.context.ui.ContextEditorManager.contextChanged(ContextEditorManager.java:96)
    	at org.eclipse.mylyn.internal.context.core.InteractionContextManager$6.run(InteractionContextManager.java:688)
    	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.internalActivateContext(InteractionContextManager.java:679)
    	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.activateContext(InteractionContextManager.java:180)
    	at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$1.taskActivated(TasksUiPlugin.java:248)
    	at org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.activateTask(TaskActivityManager.java:427)
    	at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$TasksUiInitializationJob.runInUIThread(TasksUiPlugin.java:417)
    	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
    	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
    	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3342)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3071)
    	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    	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:368)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

  • #2
    Hey onato!

    I have the same problem! Whenever i try to open a GSP-File I get the following error! Has anybody an idea? Thanks!

    I am using:

    SpringSource Tool Suite
    Version: 2.3.0.RELEASE
    Build Id: 200912171331

    Error:
    java.lang.NullPointerException
    at com.springsource.sts.grails.editor.gsp.tags.GSPMod elQueryCMProvider.initializeAllTags(GSPModelQueryC MProvider.java:65)
    at com.springsource.sts.grails.editor.gsp.tags.GSPMod elQueryCMProvider.<init>(GSPModelQueryCMProvider.j ava:50)
    at com.springsource.sts.grails.editor.gsp.tags.GSPMod elQueryImpl.<init>(GSPModelQueryImpl.java:33)
    at com.springsource.sts.grails.editor.gsp.tags.ModelQ ueryAdapterFactoryForGSP.createModelQuery(ModelQue ryAdapterFactoryForGSP.java:111)
    at com.springsource.sts.grails.editor.gsp.tags.ModelQ ueryAdapterFactoryForGSP.createAdapter(ModelQueryA dapterFactoryForGSP.java:102)
    at org.eclipse.wst.sse.core.internal.provisional.Abst ractAdapterFactory.adaptNew(AbstractAdapterFactory .java:120)
    at org.eclipse.wst.sse.core.internal.provisional.Abst ractAdapterFactory.adapt(AbstractAdapterFactory.ja va:64)
    at org.eclipse.wst.sse.core.internal.provisional.Abst ractNotifier.getAdapterFor(AbstractNotifier.java:9 3)
    at org.eclipse.jst.jsp.core.internal.modelhandler.JSP ModelLoader.preLoadAdapt(JSPModelLoader.java:195)
    at org.eclipse.wst.sse.core.internal.model.AbstractMo delLoader.createModel(AbstractModelLoader.java:124 )
    at org.eclipse.wst.sse.core.internal.FileBufferModelM anager.getModel(FileBufferModelManager.java:721)
    at org.eclipse.wst.sse.core.internal.model.ModelManag erImpl._getModelFor(ModelManagerImpl.java:658)
    at org.eclipse.wst.sse.core.internal.model.ModelManag erImpl.getModelForEdit(ModelManagerImpl.java:1390)
    at org.eclipse.wst.sse.ui.StructuredTextEditor.doSetI nput(StructuredTextEditor.java:1731)
    at org.eclipse.ui.texteditor.AbstractTextEditor$19.ru n(AbstractTextEditor.java:3115)
    at org.eclipse.jface.operation.ModalContext.runInCurr entThread(ModalContext.java:464)
    at org.eclipse.jface.operation.ModalContext.run(Modal Context.java:372)
    at org.eclipse.jface.window.ApplicationWindow$1.run(A pplicationWindow.java:759)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(Bus yIndicator.java:70)
    at org.eclipse.jface.window.ApplicationWindow.run(App licationWindow.java:756)
    at org.eclipse.ui.internal.WorkbenchWindow.run(Workbe nchWindow.java:2579)
    at org.eclipse.ui.texteditor.AbstractTextEditor.inter nalInit(AbstractTextEditor.java:3133)
    at org.eclipse.ui.texteditor.AbstractTextEditor.init( AbstractTextEditor.java:3160)
    at org.eclipse.wst.sse.ui.StructuredTextEditor.init(S tructuredTextEditor.java:2321)
    at org.eclipse.ui.internal.EditorManager.createSite(E ditorManager.java:798)
    at org.eclipse.ui.internal.EditorReference.createPart Helper(EditorReference.java:644)
    at org.eclipse.ui.internal.EditorReference.createPart (EditorReference.java:462)
    at org.eclipse.ui.internal.WorkbenchPartReference.get Part(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorReference.getEditor( EditorReference.java:286)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEdit orBatched(WorkbenchPage.java:2857)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEdit or(WorkbenchPage.java:2762)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(Wo rkbenchPage.java:2754)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(Workb enchPage.java:2705)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(Bus yIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(W orkbenchPage.java:2701)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(W orkbenchPage.java:2685)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(W orkbenchPage.java:2676)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
    at org.eclipse.ui.internal.ide.EditorAreaDropAdapter. openNonExternalEditor(EditorAreaDropAdapter.java:1 65)
    at org.eclipse.ui.internal.ide.EditorAreaDropAdapter. asyncDrop(EditorAreaDropAdapter.java:123)
    at org.eclipse.ui.internal.ide.EditorAreaDropAdapter. access$0(EditorAreaDropAdapter.java:87)
    at org.eclipse.ui.internal.ide.EditorAreaDropAdapter$ 1.run(EditorAreaDropAdapter.java:81)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableL ock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessa ges(Synchronizer.java:134)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(D isplay.java:3855)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Di splay.java:3476)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Wor kbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench. java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workben ch.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench. java:500)
    at org.eclipse.core.databinding.observable.Realm.runW ithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWork bench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Pl atformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplica tion.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle. run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication(EclipseAppLauncher.java: 110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework( Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.ja va:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:13 11)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1 287)

    Comment


    • #3
      @Schmettermann,

      It looks like you are trying to open a gsp file in a non-Grails project. Is that right? This is something that we should be accounting for, but currently throws an exception.

      Comment


      • #4
        @onato,

        It looks like your "grails-app/taglib" folder is not on the classpath. I can't be sure that's what it is and it does seem kind of odd since it should be on the classpath by default. Regardless, an NPE should not be thrown here. I will make a change so that the problem is handled gracefully with a log entry added to the error log.

        Comment


        • #5
          I will add both of these fixes to tonight's nightly build. Please try this out and let me know if it fixes your problem.

          Comment


          • #6
            Convert to Grails-Project helped

            Thanks Andrew!

            You were right! In the Package Explorer I opened the context menue and clicked "Configure" | "Convert to Grails-Project". After that my GSP files were displayed perfectly! Thanks a lot!

            Best regards from Berlin, Germany

            Comment

            Working...
            X