Skip to main content



      Home
Home » Language IDEs » PHP Development Tools (PDT) » Error opening editor
Error opening editor [message #49324] Thu, 06 September 2007 10:22 Go to next message
Eclipse UserFriend
I'm getting a java.lang.NullPointerException on certain files when I open
them in PDT. They appear to be the same files that will intermittently get
this error, but I haven't noticed a pattern within the files themselves
that cause the error. The error prevents the file from opening correctly
in the editor, but if I restart Eclipse I can then use the editor on the
file, all though I do get eventually get a build error.

Here are the details from the 'Error opening the editor' error:

----
java.lang.NullPointerException
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createPosition(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createCodeDataAnnotations(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createFileAnnotations(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.updateAdapter(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterHTML.updateAdapter(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterFactoryPHP.createAdapter(Unknown
Source)
at
org.eclipse.wst.sse.core.internal.provisional.AbstractAdapte rFactory.adaptNew(AbstractAdapterFactory.java:120)
at
org.eclipse.wst.sse.core.internal.provisional.AbstractAdapte rFactory.adapt(AbstractAdapterFactory.java:64)
at
org.eclipse.wst.sse.core.internal.provisional.AbstractNotifi er.getAdapterFor(AbstractNotifier.java:93)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.addAdapterToNodeAndChildren(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.addAllAdapters(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.initialize(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.projectionEnabled(Unknown
Source)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.fi reProjectionEnabled(ProjectionViewer.java:481)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.en ableProjection(ProjectionViewer.java:529)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.do Operation(ProjectionViewer.java:1419)
at
org.eclipse.wst.sse.ui.internal.StructuredTextViewer.doOpera tion(StructuredTextViewer.java:502)
at
org.eclipse.php.internal.ui.editor.PHPStructuredTextViewer.d oOperation(Unknown
Source)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.installProjectio nSupport(StructuredTextEditor.java:2777)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.initializeSource Viewer(StructuredTextEditor.java:2722)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.createPartContro l(StructuredTextEditor.java:1726)
at
org.eclipse.php.internal.ui.editor.PHPStructuredEditor.creat ePartControl(Unknown
Source)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:426)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
at
org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:263)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2721)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2633)
at
org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:2625)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2577)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2572)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2556)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2547)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
at org.eclipse.php.internal.ui.util.EditorUtility.openInEditor( Unknown
Source)
at org.eclipse.php.internal.ui.util.EditorUtility.openInEditor( Unknown
Source)
at org.eclipse.php.internal.ui.actions.OpenActionUtil.open(Unkn own Source)
at org.eclipse.php.internal.ui.actions.OpenAction.run(Unknown Source)
at org.eclipse.php.internal.ui.actions.OpenAction.run(Unknown Source)
at
org.eclipse.php.internal.ui.actions.SelectionDispatchAction. dispatchRun(Unknown
Source)
at
org.eclipse.php.internal.ui.actions.SelectionDispatchAction. run(Unknown
Source)
at
org.eclipse.php.internal.ui.explorer.ExplorerActionGroup.han dleOpen(Unknown
Source)
at org.eclipse.php.internal.ui.explorer.ExplorerPart$5.open(Unk nown
Source)
at
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:19 3)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:818)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1079)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1183)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:257)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:297)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
---

And here is the error I get if I re-start eclipse with the file all ready
'open'

Building PHP Projects ... (Time of error ..[etc])
Reason:
java.lang.NullPointerException

.. and under the details

An error occurred while traversing resources.
java.lang.NullPointerException
Re: Error opening editor [message #49354 is a reply to message #49324] Thu, 06 September 2007 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mep_eisen.web.de

I had some similar problems. But they were fixed with M2 and M3. Can You
verify this?
Re: Error opening editor [message #49414 is a reply to message #49324] Thu, 06 September 2007 10:42 Go to previous messageGo to next message
Eclipse UserFriend
Seth,

The first error was a killer for me, but as Martin said, it is fixed in
M2 and above. As far as I know this was a WTP bug, and it is fixed with
the releases of Europa (Eclipse 3.3), which is what PDT is built on now.

What PDT version are you running? I had that error in PDT 0.7.

Seth Thornberry wrote:
> I'm getting a java.lang.NullPointerException on certain files when I
> open them in PDT. They appear to be the same files that will
> intermittently get this error, but I haven't noticed a pattern within
> the files themselves that cause the error. The error prevents the file
> from opening correctly in the editor, but if I restart Eclipse I can
> then use the editor on the file, all though I do get eventually get a
> build error.
>
> Here are the details from the 'Error opening the editor' error:
>
> ----
> java.lang.NullPointerException
> at
> org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createPosition(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createCodeDataAnnotations(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createFileAnnotations(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.updateAdapter(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterHTML.updateAdapter(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterFactoryPHP.createAdapter(Unknown
> Source)
> at
> org.eclipse.wst.sse.core.internal.provisional.AbstractAdapte rFactory.adaptNew(AbstractAdapterFactory.java:120)
>
> at
> org.eclipse.wst.sse.core.internal.provisional.AbstractAdapte rFactory.adapt(AbstractAdapterFactory.java:64)
>
> at
> org.eclipse.wst.sse.core.internal.provisional.AbstractNotifi er.getAdapterFor(AbstractNotifier.java:93)
>
> at
> org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.addAdapterToNodeAndChildren(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.addAllAdapters(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.initialize(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.projectionEnabled(Unknown
> Source)
> at
> org.eclipse.jface.text.source.projection.ProjectionViewer.fi reProjectionEnabled(ProjectionViewer.java:481)
>
> at
> org.eclipse.jface.text.source.projection.ProjectionViewer.en ableProjection(ProjectionViewer.java:529)
>
> at
> org.eclipse.jface.text.source.projection.ProjectionViewer.do Operation(ProjectionViewer.java:1419)
>
> at
> org.eclipse.wst.sse.ui.internal.StructuredTextViewer.doOpera tion(StructuredTextViewer.java:502)
>
> at
> org.eclipse.php.internal.ui.editor.PHPStructuredTextViewer.d oOperation(Unknown
> Source)
> at
> org.eclipse.wst.sse.ui.StructuredTextEditor.installProjectio nSupport(StructuredTextEditor.java:2777)
>
> at
> org.eclipse.wst.sse.ui.StructuredTextEditor.initializeSource Viewer(StructuredTextEditor.java:2722)
>
> at
> org.eclipse.wst.sse.ui.StructuredTextEditor.createPartContro l(StructuredTextEditor.java:1726)
>
> at
> org.eclipse.php.internal.ui.editor.PHPStructuredEditor.creat ePartControl(Unknown
> Source)
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:426)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
>
> at
> org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:263)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2721)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2633)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:2625)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2577)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2572)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2556)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2547)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
> at
> org.eclipse.php.internal.ui.util.EditorUtility.openInEditor( Unknown Source)
> at
> org.eclipse.php.internal.ui.util.EditorUtility.openInEditor( Unknown Source)
> at org.eclipse.php.internal.ui.actions.OpenActionUtil.open(Unkn own
> Source)
> at org.eclipse.php.internal.ui.actions.OpenAction.run(Unknown Source)
> at org.eclipse.php.internal.ui.actions.OpenAction.run(Unknown Source)
> at
> org.eclipse.php.internal.ui.actions.SelectionDispatchAction. dispatchRun(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.actions.SelectionDispatchAction. run(Unknown
> Source)
> at
> org.eclipse.php.internal.ui.explorer.ExplorerActionGroup.han dleOpen(Unknown
> Source)
> at org.eclipse.php.internal.ui.explorer.ExplorerPart$5.open(Unk nown
> Source)
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:820)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:857)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:19 3)
> at
> org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:818)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1079)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1183)
>
> at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:263)
> at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:257)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:297)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> ---
>
> And here is the error I get if I re-start eclipse with the file all
> ready 'open'
> Building PHP Projects ... (Time of error ..[etc])
> Reason:
> java.lang.NullPointerException
>
> . and under the details
> An error occurred while traversing resources.
> java.lang.NullPointerException
>
Re: Error opening editor [message #49473 is a reply to message #49354] Thu, 06 September 2007 10:56 Go to previous messageGo to next message
Eclipse UserFriend
I was running the version from the Eclipse Update site -- which looked to
have been dated 8/16. Does the Update site not keep up with the latest
stable release?

I'm trying downloading the M3 version now.
Re: Error opening editor [message #49503 is a reply to message #49473] Thu, 06 September 2007 11:35 Go to previous message
Eclipse UserFriend
I am afraid I can't help you with the update side thing. I tend to avoid
updating if not to a stable version. The M3 I have is a fresh 3in1
installation.

Try the M3 you are downloading and let me know how it goes.

Seth Thornberry wrote:
> I was running the version from the Eclipse Update site -- which looked
> to have been dated 8/16. Does the Update site not keep up with the
> latest stable release?
>
> I'm trying downloading the M3 version now.
>
Previous Topic:PDT and Hyperlinking
Next Topic:Posted a couple of debug bugs/enancements
Goto Forum:
  


Current Time: Wed Jun 18 09:21:17 EDT 2025

Powered by FUDForum. Page generated in 0.03026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top