[jbosstools-issues] [JBoss JIRA] (JBIDE-26158) Server adapter: NPE when starting adapter into Debug
Andre Dietisheim (Jira)
issues at jboss.org
Wed Oct 17 04:17:02 EDT 2018
[ https://issues.jboss.org/browse/JBIDE-26158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13599765#comment-13599765 ]
Andre Dietisheim edited comment on JBIDE-26158 at 10/17/18 4:16 AM:
--------------------------------------------------------------------
The NPE occurs at the following code in the eclipse platform:
{code:title=org.eclipse.core.internal.resources.CheckMissingNaturesListener#updateRange}
FileUtil.transferStreams(input, output, file.getLocation().toString(), new NullProgressMonitor());
{code}
The culprit is
{code}
file.getLocation()
{code}
The file (<project-name>.project) has no location, but the project for it is accessible.
!image-2018-07-02-23-17-34-099.png!
The file that's being used (*L/nodejs-ex (1)/.project*) is in a project that the chromium tooling created behind the scenes. It is not visible in the project explorer but it is in the navigator (decorated with a chrome tools icon):
!image-2018-07-02-22-49-45-246.png!
This latter project is created and opened by the chromium tools in
{code:title=org.eclipse.wst.jsdt.chromium.debug.core.util.ChromiumDebugPluginUtil#createEmptyProject}
try {
project.create(description, null);
project.open(null);
return project;
} catch (CoreException e) {
ChromiumDebugPlugin.log(e);
return null;
}
{code}
*project.open(null)* causes the *CheckMissingNaturesListener* to check for the missing natures.
{code}
CheckMissingNaturesListener$3(InternalWorkspaceJob).<init>(String) line: 27
CheckMissingNaturesListener$3(WorkspaceJob).<init>(String) line: 63
CheckMissingNaturesListener$3.<init>(CheckMissingNaturesListener, String, Set, IProject, Set) line: 163
CheckMissingNaturesListener.updateMarkers(Collection<IProject>) line: 163
CheckMissingNaturesListener.resourceChanged(IResourceChangeEvent) line: 46
NotificationManager$1.run() line: 297
SafeRunner.run(ISafeRunnable) line: 42
NotificationManager.notify(ResourceChangeListenerList$ListenerEntry[], ResourceChangeEvent, boolean) line: 287
NotificationManager.broadcastChanges(ElementTree, ResourceChangeEvent, boolean) line: 150
Workspace.broadcastPostChange() line: 376
Workspace.endOperation(ISchedulingRule, boolean) line: 1499
Project.open(int, IProgressMonitor) line: 1098
Project.open(IProgressMonitor) line: 1107
ChromiumDebugPluginUtil.createEmptyProject(String) line: 143
VProjectWorkspaceBridge.<init>(String, ConnectedTargetData, JavascriptVm) line: 101
VProjectWorkspaceBridge$FactoryImpl.attachedToVm(ConnectedTargetData, JavascriptVm) line: 78
ConnectedTargetData.initWorkspaceRelations() line: 222
ConnectedTargetData.setVmEmbedder(JavascriptVmEmbedder) line: 85
DebugTargetImpl.attach(DebugTargetImpl, JavascriptVmEmbedder$ConnectionToRemote, DestructingGuard, Runnable, IProgressMonitor) line: 86
StandaloneV8LaunchType(LaunchTypeBase).launch(ILaunchConfiguration, String, ILaunch, IProgressMonitor) line: 101
LaunchConfigurationWorkingCopy(LaunchConfiguration).launch(String, IProgressMonitor, boolean, boolean) line: 859
LaunchConfigurationWorkingCopy(LaunchConfiguration).launch(String, IProgressMonitor, boolean) line: 717
DebugUIPlugin.buildAndLaunch(ILaunchConfiguration, String, IProgressMonitor) line: 1039
DebugUIPlugin$8.run(IProgressMonitor) line: 1256
Worker.run() line: 60
{code}
was (Author: adietish):
The NPE occurs at the following code in the eclipse platform:
{code:title=org.eclipse.core.internal.resources.CheckMissingNaturesListener#updateRange}
FileUtil.transferStreams(input, output, file.getLocation().toString(), new NullProgressMonitor());
{code}
The culprit is
{code}
file.getLocation()
{code}
The file (<project-nam>.project) has no location, but the project for it is accessible.
!image-2018-07-02-23-17-34-099.png!
The file that's being used (*L/nodejs-ex (1)/.project*) is in a project that the chromium tooling created behind the scenes. It is not visible in the project explorer but it is in the navigator (decorated with a chrome tools icon):
!image-2018-07-02-22-49-45-246.png!
This latter project is created and opened by the chromium tools in
{code:title=org.eclipse.wst.jsdt.chromium.debug.core.util.ChromiumDebugPluginUtil#createEmptyProject}
try {
project.create(description, null);
project.open(null);
return project;
} catch (CoreException e) {
ChromiumDebugPlugin.log(e);
return null;
}
{code}
*project.open(null)* causes the *CheckMissingNaturesListener* to check for the missing natures.
{code}
CheckMissingNaturesListener$3(InternalWorkspaceJob).<init>(String) line: 27
CheckMissingNaturesListener$3(WorkspaceJob).<init>(String) line: 63
CheckMissingNaturesListener$3.<init>(CheckMissingNaturesListener, String, Set, IProject, Set) line: 163
CheckMissingNaturesListener.updateMarkers(Collection<IProject>) line: 163
CheckMissingNaturesListener.resourceChanged(IResourceChangeEvent) line: 46
NotificationManager$1.run() line: 297
SafeRunner.run(ISafeRunnable) line: 42
NotificationManager.notify(ResourceChangeListenerList$ListenerEntry[], ResourceChangeEvent, boolean) line: 287
NotificationManager.broadcastChanges(ElementTree, ResourceChangeEvent, boolean) line: 150
Workspace.broadcastPostChange() line: 376
Workspace.endOperation(ISchedulingRule, boolean) line: 1499
Project.open(int, IProgressMonitor) line: 1098
Project.open(IProgressMonitor) line: 1107
ChromiumDebugPluginUtil.createEmptyProject(String) line: 143
VProjectWorkspaceBridge.<init>(String, ConnectedTargetData, JavascriptVm) line: 101
VProjectWorkspaceBridge$FactoryImpl.attachedToVm(ConnectedTargetData, JavascriptVm) line: 78
ConnectedTargetData.initWorkspaceRelations() line: 222
ConnectedTargetData.setVmEmbedder(JavascriptVmEmbedder) line: 85
DebugTargetImpl.attach(DebugTargetImpl, JavascriptVmEmbedder$ConnectionToRemote, DestructingGuard, Runnable, IProgressMonitor) line: 86
StandaloneV8LaunchType(LaunchTypeBase).launch(ILaunchConfiguration, String, ILaunch, IProgressMonitor) line: 101
LaunchConfigurationWorkingCopy(LaunchConfiguration).launch(String, IProgressMonitor, boolean, boolean) line: 859
LaunchConfigurationWorkingCopy(LaunchConfiguration).launch(String, IProgressMonitor, boolean) line: 717
DebugUIPlugin.buildAndLaunch(ILaunchConfiguration, String, IProgressMonitor) line: 1039
DebugUIPlugin$8.run(IProgressMonitor) line: 1256
Worker.run() line: 60
{code}
> Server adapter: NPE when starting adapter into Debug
> -----------------------------------------------------
>
> Key: JBIDE-26158
> URL: https://issues.jboss.org/browse/JBIDE-26158
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.6.0.AM3
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Priority: Major
> Labels: upstream
> Fix For: 4.10.0.AM1
>
> Attachments: image-2018-07-02-22-33-13-396.png, image-2018-07-02-22-49-45-246.png, image-2018-07-02-23-17-34-099.png, image-2018-07-03-00-03-56-346.png, screenshot-1.png, screenshot-2.png
>
>
> steps:
> # EXEC: launch new application wizard, choose nodejs-mongo-persistent template and finish
> # EXEC: when asked import the app and create a server adapter
> # ASSERT: server adapter is created
> # EXEC: start the server adapter
> # ASSERT: server adapter is launched
> # EXEC: restart the server adapter into Debug
> Result:
> Debuggin works, but you get the following error dialog:
> !image-2018-07-02-22-33-13-396.png!
> In the Eclipse log you'll find the following:
> {code}
> java.lang.NullPointerException
> at org.eclipse.core.internal.resources.CheckMissingNaturesListener.updateRange(CheckMissingNaturesListener.java:209)
> at org.eclipse.core.internal.resources.CheckMissingNaturesListener$3.runInWorkspace(CheckMissingNaturesListener.java:179)
> at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
> {code}
> ps. project context menu: Convert > Javascript Project doesn't help.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jbosstools-issues
mailing list