Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Could not update project NullPointerException
Could not update project NullPointerException [message #1781493] Wed, 07 February 2018 20:41 Go to next message
Tom Brey is currently offline Tom BreyFriend
Messages: 2
Registered: February 2018
Junior Member
I have been fighting with this for a while now. In short, I cannot deploy a project that had previously always worked to my local Tomcat server. I can deploy it to a DEV server, but that does not allow me to debug the project as I would like. This project does run locally properly on other people's machines, so my best guess is that it is my local configuration / environment.

More background: We store the project in SVN, so I download the project via the SVN plugin. This is a project which includes Spring, although that is legacy code that has not been modified in years. Normally upon Tomcat startup I see the Spring configuration load and configure properly. I have googled many solutions and here are the ones I have tried:

reinstalling Eclipse - I downloaded and installed Eclipse Oxygen. No different.
deleting project .settings and .project folder - Before doing this, I exited Eclipse. Upon starting up Eclipse, it simply created those folders from the repository. No dice. Also deleted these without exiting Eclipse, also same result.
deleting .metadata folder in workspace folder - Needed to exit Eclipse first before deleting, but same result upon re-entry. I was optimistic about that one because the person had the same stack trace (or close enough) that I did, but didn't work.

Now I am really stuck. I can work around this for a time, but I will eventually need to resolve this. I am not a newbie with Eclipse, although I am sure I use it in a limited way.

I have full backups of my workspaces and environments, so any suggestions are welcome. Stack trace and session data are at the bottom.

the stack trace:
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder.getFirstTaggedResource(VirtualFolder.java:185)
at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getDefaultDeploymentDescriptorFolder(J2EEModuleVirtualComponent.java:544)
at org.eclipse.m2e.wtp.WebProjectConfiguratorDelegate.configure(WebProjectConfiguratorDelegate.java:171)
at org.eclipse.m2e.wtp.AbstractProjectConfiguratorDelegate.configureProject(AbstractProjectConfiguratorDelegate.java:95)
at org.eclipse.m2e.wtp.WTPProjectConfigurator.configure(WTPProjectConfigurator.java:68)
at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:120)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:508)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:501)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:439)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:352)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1351)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:349)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:77)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

Session Data:
eclipse.buildId=4.7.2.M20171130-0510
java.version=1.8.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
Re: Could not update project NullPointerException [message #1781619 is a reply to message #1781493] Fri, 09 February 2018 14:00 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
I'm not sure how much this will help, but if you create a plain Dynamic Web Project with the defaults, and then examine the ".settings/org.eclipse.wst.common.component" file, you should see a line like:

<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>

The key is the tag with a value of "defaultRootSource". The NPE you are encountering is because the Maven plug-in is looking for a <wb-resource> with a tag of "defaultRootSource" and isn't finding one. I have no idea why there isn't one with this tag when there should always be at least one with this tag. HTH.

Cheers,
Larry
Re: Could not update project NullPointerException [message #1781623 is a reply to message #1781619] Fri, 09 February 2018 15:48 Go to previous messageGo to next message
Tom Brey is currently offline Tom BreyFriend
Messages: 2
Registered: February 2018
Junior Member
It does. At least I have a better place to focus. Thanks.
UPDATE: It works! Thanks. That was the key. However, I do have another question. Did you just know this, or was there something in my post that should have given me the clue as to the problem?

[Updated on: Fri, 09 February 2018 16:02]

Report message to a moderator

Re: Could not update project NullPointerException [message #1781649 is a reply to message #1781623] Sat, 10 February 2018 14:21 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
I used Google to look up the source code related to the stack trace to see why the NPE was occurring. Since I work on the Tomcat support in WTP, I have some familiarity with what is going on with Dynamic Web projects and was able to easily see the cause. Glad you were able to fix the issue.
Previous Topic:Send Email through admin panel is not working
Next Topic:Problem creating eclipse/projects for WTP/JSDT using eclipse installer (Oomph)
Goto Forum:
  


Current Time: Thu Apr 18 16:16:36 GMT 2024

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

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

Back to the top