[jbosstools-issues] [JBoss JIRA] (JBIDE-22895) NullPointerException below WebUtils.getDefaultDeploymentDescriptorFolder (thrown in VirtualFolder.getFirstTaggedResource)

Viacheslav Kabanovich (JIRA) issues at jboss.org
Fri Aug 5 21:54:00 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-22895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13275950#comment-13275950 ] 

Viacheslav Kabanovich edited comment on JBIDE-22895 at 8/5/16 9:53 PM:
-----------------------------------------------------------------------

The pull request prevents this NPE by preventing KbProject from loading at request of Eclipse SaveManager to save changes if any. Particularly, it happens at Eclipse shut-down, which is a very inappropriate moment to load KbProject, if it has not been loaded yet, it certainly does not need to save anything.

As a positive side-effect, it will make closing Eclipse faster if user has not worked with Kb/CDI/Batch projects and they remained not loaded.


was (Author: scabanovich):
The pull request prevents this NPE by preventing KbProject from loading at request of Eclipse SaveManager to save changes if any. Particularly, it happens at Eclipse shut-down, which is a very inappropriate moment to load KbProject, if it has not been loaded yet, it certainly does not need to save anything.

> NullPointerException below WebUtils.getDefaultDeploymentDescriptorFolder (thrown in VirtualFolder.getFirstTaggedResource)
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-22895
>                 URL: https://issues.jboss.org/browse/JBIDE-22895
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: common/jst/core, upstream
>    Affects Versions: 4.3.0.Final
>            Reporter: Automated Error Reporting Bot
>            Assignee: Viacheslav Kabanovich
>             Fix For: 4.4.x
>
>
> The following problem was reported via the automated error reporting:
> Message: Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
> {noformat}
> java.lang.NullPointerException: null
>     at org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder.getFirstTaggedResource(VirtualFolder.java:185)
>     at org.jboss.tools.common.web.WebUtils.getDefaultDeploymentDescriptorFolder(WebUtils.java:323)
>     at org.jboss.tools.common.web.WebUtils.getWebRootFolders(WebUtils.java:110)
>     at org.jboss.tools.common.web.WebUtils.getWebInfPaths(WebUtils.java:42)
>     at org.jboss.tools.common.model.project.ProjectHome.getWebInfPath(ProjectHome.java:108)
>     at org.jboss.tools.common.model.project.ProjectHome.getLocation(ProjectHome.java:84)
>     at org.jboss.tools.common.model.project.ModelNature.createProject(ModelNature.java:108)
>     at org.jboss.tools.common.model.project.ModelNature.setProject(ModelNature.java:64)
>     at org.eclipse.core.internal.resources.NatureManager.createNature(NatureManager.java:237)
>     at org.eclipse.core.internal.resources.Project.getNature(Project.java:412)
>     at org.jboss.tools.common.model.util.EclipseResourceUtil.getModelNature(EclipseResourceUtil.java:264)
>     at org.jboss.tools.jst.web.model.helpers.InnerModelHelper.createXModel(InnerModelHelper.java:37)
>     at org.jboss.tools.jst.web.kb.internal.scanner.ClassPathMonitor.init(ClassPathMonitor.java:60)
>     at org.jboss.tools.jst.web.kb.internal.KbProject.setProject(KbProject.java:202)
>     at org.eclipse.core.internal.resources.NatureManager.createNature(NatureManager.java:237)
>     at org.eclipse.core.internal.resources.Project.getNature(Project.java:412)
>     at org.jboss.tools.jst.web.kb.KbProjectFactory.getKbProject(KbProjectFactory.java:71)
>     at org.jboss.tools.jst.web.kb.WebKbPlugin$1.saving(WebKbPlugin.java:79)
>     at org.eclipse.core.internal.resources.SaveManager.executeLifecycle(SaveManager.java:387)
>     at org.eclipse.core.internal.resources.SaveManager$1.run(SaveManager.java:196)
>     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>     at org.eclipse.core.internal.resources.SaveManager.broadcastLifecycle(SaveManager.java:199)
>     at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1184)
>     at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1163)
>     at org.eclipse.core.internal.resources.DelayedSnapshotJob.run(DelayedSnapshotJob.java:52)
>     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> {noformat}
> The reporter(s) left the following comment(s):
> --- Zain Imtiaz wrote on [2f20|https://redhat.ctrlflow.com/reviewers/#!/incidents/5758f545e4b06056d2072f20]: ---
> Do you people want me to change my development tool? Are you afraid to take responsibility?
> Bundles:
> | org.eclipse.core.filebuffers | 3.6.0.v20160503-1849 | 3.6.0.v20160503-1849 |
> | org.eclipse.core.jobs | 3.7.0.v20150330-2103 | 3.8.0.v20160509-0411 |
> | org.eclipse.core.resources | 3.10.1.v20150725-1910 | 3.11.0.v20160503-1608 |
> | org.eclipse.core.runtime | 3.11.1.v20150903-1804 | 3.12.0.v20160606-1342 |
> | org.eclipse.debug.core | 3.10.0.v20150303-1130 | 3.10.0.v20150303-1130 |
> | org.eclipse.debug.ui | 3.11.101.v20160203-1230 | 3.11.101.v20160203-1230 |
> | org.eclipse.e4.core.di | 1.5.0.v20150421-2214 | 1.6.0.v20160319-0612 |
> | org.eclipse.e4.ui.services | 1.2.0.v20150422-0725 | 1.2.100.v20160506-0759 |
> | org.eclipse.e4.ui.workbench | 1.3.1.v20160203-0951 | 1.4.0.v20160517-1624 |
> | org.eclipse.e4.ui.workbench.renderers.swt | 0.13.0.v20150901-1347 | 0.14.0.v20160525-0940 |
> | org.eclipse.e4.ui.workbench.swt | 0.13.0.v20150504-0621 | 0.14.0.v20160523-1900 |
> | org.eclipse.emf.common | 2.11.1.v20160208-0816 | 2.12.0.v20160420-0247 |
> | org.eclipse.equinox.event | 1.3.100.v20140115-1647 | 1.3.200.v20160324-1850 |
> | org.eclipse.gef | 3.11.0.201606061308 | 3.11.0.201606061308 |
> | org.eclipse.jdt.ui | 3.11.2.v20151123-1510 | 3.12.0.v20160525-1829 |
> | org.eclipse.jface | 3.11.0.v20150602-1400 | 3.12.0.v20160518-1929 |
> | org.eclipse.jface.text | 3.10.0.v20150603-1752 | 3.11.0.v20160505-1301 |
> | org.eclipse.jst.jee.ui | 1.0.701.v201408251535 | 1.0.701.v201408251535 |
> | org.eclipse.jst.ws.consumption | 1.0.800.v201505131719 | 1.0.800.v201505131719 |
> | org.eclipse.jst.ws.consumption.ui | 1.1.800.v201504152025 | 1.1.800.v201504152025 |
> | org.eclipse.ltk.core.refactoring | 3.7.0.v20160419-0705 | 3.7.0.v20160419-0705 |
> | org.eclipse.ltk.ui.refactoring | 3.8.0.v20160518-1817 | 3.8.0.v20160518-1817 |
> | org.eclipse.m2e.core | 1.6.3.20160209-1446 | 1.7.0.20160603-1933 |
> | org.eclipse.m2e.core.ui | 1.6.3.20160209-1446 | 1.6.3.20160209-1446 |
> | org.eclipse.m2e.wtp | 1.3.0.20160530-2310 | 1.3.0.20160530-2310 |
> | org.eclipse.osgi | 3.10.102.v20160118-1700 | 3.11.0.v20160603-1336 |
> | org.eclipse.swt | 3.104.1.v20150825-0743 | 3.105.0.v20160603-0902 |
> | org.eclipse.ui | 3.107.0.v20150507-1945 | 3.108.0.v20160518-1929 |
> | org.eclipse.ui.editors | 3.10.0.v20160505-0931 | 3.10.0.v20160505-0931 |
> | org.eclipse.ui.ide | 3.11.0.v20150825-2158 | 3.12.0.v20160601-1609 |
> | org.eclipse.ui.navigator | 3.6.0.v20150422-0725 | 3.6.100.v20160518-1929 |
> | org.eclipse.ui.navigator.resources | 3.5.1.v20160128-1644 | 3.5.100.v20160518-1929 |
> | org.eclipse.wst.command.env.core | 1.0.300.v201505131719 | 1.0.300.v201505131719 |
> | org.eclipse.wst.command.env.ui | 1.1.200.v201503231435 | 1.1.200.v201503231435 |
> | org.eclipse.wst.common.frameworks | 1.2.200.v201304241450 | 1.2.200.v201304241450 |
> | org.eclipse.wst.common.project.facet.core | 1.4.300.v201111030423 | 1.4.300.v201111030423 |
> | org.eclipse.wst.common.project.facet.ui | 1.4.600.v201505072140 | 1.4.600.v201505072140 |
> | org.eclipse.wst.jsdt.core | 2.0.0.v201605251700 | 2.0.0.v201605251700 |
> | org.eclipse.wst.jsdt.ui | 1.1.601.v201512010225 | 1.1.601.v201512010225 |
> | org.eclipse.wst.sse.ui | 1.3.401.v201510130005 | 1.3.500.v201605120129 |
> | org.eclipse.wst.validation | 1.2.700.v201508251749 | 1.2.700.v201508251749 |
> | org.eclipse.wst.validation.ui | 1.2.500.v201310231452 | 1.2.500.v201310231452 |
> | org.eclipse.wst.xml.ui | 1.1.501.v201501212057 | 1.1.700.v201604272318 |
> | org.jboss.tools.batch.core | 1.7.1.Final-v20160330-2256-B84 | 1.8.1.v20160701-0417 |
> | org.jboss.tools.batch.ui | 1.7.1.Final-v20160330-2256-B84 | 1.8.1.v20160615-1816 |
> | org.jboss.tools.cdi.core | 1.7.1.Final-v20160330-2256-B84 | 1.8.0.Final-v20160610-0126-B1 |
> | org.jboss.tools.cdi.ui | 1.7.1.Final-v20160330-2256-B84 | 1.8.0.Final-v20160610-0126-B1 |
> | org.jboss.tools.central | 2.1.0.Final-v20160613-2000-B8 | 2.1.0.Final-v20160613-2000-B8 |
> | org.jboss.tools.common | 3.7.0.Final-v20150924-2213-B38 | 3.8.1.v20160607-2053 |
> | org.jboss.tools.common.core | 3.7.0.Final-v20150924-2213-B38 | 3.8.0.Final-v20160610-1533-B7 |
> | org.jboss.tools.common.el.core | 3.7.1.Final-v20160408-2358-B112 | 3.7.1.Final-v20160408-2358-B112 |
> | org.jboss.tools.common.model | 3.7.0.Final-v20150924-2213-B38 | 3.8.1.v20160607-2053 |
> | org.jboss.tools.common.model.ui | 3.7.1.Final-v20160408-2358-B112 | 3.8.0.Final-v20160610-1533-B7 |
> | org.jboss.tools.common.text.xml | 3.7.1.Final-v20160408-2358-B112 | 3.8.0.Final-v20160610-1533-B7 |
> | org.jboss.tools.common.validation | 3.7.0.Final-v20150924-2213-B38 | 3.8.1.v20160624-2216 |
> | org.jboss.tools.jsf | 3.7.1.Final-v20160330-2256-B84 | 3.8.1.v20160607-2131 |
> | org.jboss.tools.jsf.ui | 3.7.1.Final-v20160330-2256-B84 | 3.8.0.Final-v20160610-0126-B1 |
> | org.jboss.tools.jst.web | 3.7.0.Final-v20150924-2233-B43 | 3.8.1.v20160607-2115 |
> | org.jboss.tools.jst.web.kb | 3.7.0.Final-v20150924-2233-B43 | 3.8.1.v20160607-2115 |
> | org.jboss.tools.jst.web.ui | 3.7.0.Final-v20150924-2233-B43 | 3.8.1.v20160628-0959 |
> | org.jboss.tools.maven.cdi | 1.7.1.Final-v20160401-1059-B103 | 1.7.1.Final-v20160401-1059-B103 |
> | org.jboss.tools.seam.core | 3.7.1.Final-v20160330-2256-B84 | 3.8.0.Final-v20160610-0126-B1 |
> | org.jboss.tools.seam.ui | 3.7.1.Final-v20160330-2256-B84 | 3.7.1.Final-v20160330-2256-B84 |
> | org.jboss.tools.vpe | 3.7.1.Final-v20160331-0327-B91 | 3.7.1.Final-v20160331-0327-B91 |
> | org.jboss.tools.vpe.preview.core | 3.7.1.Final-v20160331-0327-B91 | 3.8.0.Final-v20160609-2229-B3 |
> | org.jboss.tools.vpe.preview.editor | 3.7.1.Final-v20160331-0327-B91 | 3.8.0.Final-v20160609-2229-B3 |
> | org.jboss.tools.ws.jaxrs.ui | 1.8.1.Final-v20160331-0952-B76 | 1.9.0.Final-v20160610-0003-B1 |
> Operating Systems:
> | Linux | 3.13.0 | 4.6.2 |
> | MacOSX | 10.10.0 | 10.11.6 |
> | Windows | 5.1.0 | 10.0.0 |
> The above information is a snapshot of the collected data. Visit [this page|https://redhat.ctrlflow.com/reviewers/#!/problems/5719a53ae4b04d6a2b175a3b] for the latest data.
> Thank you for your assistance.
>  Your friendly error-reports-inbox.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list