Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360256 - null pointer deploying dwp to preview with local maven dependency
Summary: null pointer deploying dwp to preview with local maven dependency
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 12:30 EDT by Chuck Paterson CLA
Modified: 2021-04-19 13:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chuck Paterson CLA 2011-10-07 12:30:39 EDT
When deploying/updating a dynamic web project that has a library dependency supplied by maven locally and the
source for the dependency is in a project also open in the work space a null pater exception occurs. If the source
project is closed then the dyanmic web project can be deployed to the preview server successfully.

java.lang.NullPointerException
	at org.eclipse.wst.common.componentcore.internal.util.VirtualReferenceUtilities.getDefaultProjectArchiveName(VirtualReferenceUtilities.java:81)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getJavaClasspathReferences(J2EEModuleVirtualComponent.java:338)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getNonManifestRefs(J2EEModuleVirtualComponent.java:242)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getReferences(J2EEModuleVirtualComponent.java:166)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getReferences(J2EEModuleVirtualComponent.java:214)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getReferences(J2EEModuleVirtualComponent.java:207)
	at org.eclipse.jst.common.internal.modulecore.SingleRootUtil.hasConsumableReferences(SingleRootUtil.java:217)
	at org.eclipse.jst.common.internal.modulecore.SingleRootUtil.validateSingleRoot(SingleRootUtil.java:165)
	at org.eclipse.jst.common.internal.modulecore.SingleRootUtil.isSingleRoot(SingleRootUtil.java:93)
	at org.eclipse.jst.common.internal.modulecore.SingleRootExportParticipant.canOptimize(SingleRootExportParticipant.java:84)
	at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.canOptimize(FlatVirtualComponent.java:136)
	at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.cacheResources(FlatVirtualComponent.java:118)
	at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.fetchResources(FlatVirtualComponent.java:101)
	at org.eclipse.wst.web.internal.deployables.FlatComponentDeployable.members(FlatComponentDeployable.java:147)
	at org.eclipse.wst.server.core.internal.ModulePublishInfo.hasDelta(ModulePublishInfo.java:415)
	at org.eclipse.wst.server.core.internal.ServerPublishInfo.hasDelta(ServerPublishInfo.java:440)
	at org.eclipse.wst.server.core.internal.Server.hasPublishedResourceDelta(Server.java:1534)
	at org.eclipse.wst.server.core.internal.Server$ResourceChangeJob$1.visit(Server.java:214)
	at org.eclipse.wst.server.core.internal.Server.visitModule(Server.java:2910)
	at org.eclipse.wst.server.core.internal.Server.visit(Server.java:2894)
	at org.eclipse.wst.server.core.internal.Server$ResourceChangeJob.run(Server.java:225)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

-- Configuration Details --
Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.jdt 3.7.1.r371_v20110810-0800-7z8gFcoFMLfTabvKsR5Qm9rBGEBK
Comment 1 Igor Fedorenko CLA 2011-10-07 14:04:44 EDT
Please report m2e-wtp integration issues to https://issues.sonatype.org/browse/MECLIPSEWTP
Comment 2 Mirko Raner CLA 2012-06-04 19:59:56 EDT
I'm not sure why this problem was filed under m2e to begin with; I don't see a single m2e class in the original stack trace.
That being said, I'm getting a similar stack trace:

java.lang.NullPointerException
	at org.eclipse.wst.common.componentcore.internal.util.VirtualReferenceUtilities.getDefaultProjectArchiveName(VirtualReferenceUtilities.java:81)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getJavaClasspathReferences(J2EEModuleVirtualComponent.java:338)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getNonManifestRefs(J2EEModuleVirtualComponent.java:242)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getReferences(J2EEModuleVirtualComponent.java:166)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getReferences(J2EEModuleVirtualComponent.java:214)
	at org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent.getReferences(J2EEModuleVirtualComponent.java:207)
	at org.eclipse.jst.common.internal.modulecore.SingleRootUtil.hasConsumableReferences(SingleRootUtil.java:217)
	at org.eclipse.jst.common.internal.modulecore.SingleRootUtil.validateSingleRoot(SingleRootUtil.java:165)
	at org.eclipse.jst.common.internal.modulecore.SingleRootUtil.isSingleRoot(SingleRootUtil.java:93)
	at org.eclipse.jst.common.internal.modulecore.SingleRootExportParticipant.canOptimize(SingleRootExportParticipant.java:88)
	at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.canOptimize(FlatVirtualComponent.java:136)
	at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.cacheResources(FlatVirtualComponent.java:118)
	at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.fetchResources(FlatVirtualComponent.java:101)
	at org.eclipse.wst.web.internal.deployables.FlatComponentDeployable.members(FlatComponentDeployable.java:147)
	at org.eclipse.wst.server.core.internal.ModulePublishInfo.hasDelta(ModulePublishInfo.java:415)
	at org.eclipse.wst.server.core.internal.ServerPublishInfo.hasDelta(ServerPublishInfo.java:440)
	at org.eclipse.wst.server.core.internal.Server.hasPublishedResourceDelta(Server.java:1579)
	at org.eclipse.wst.server.core.internal.Server$ResourceChangeJob$1.visit(Server.java:217)
	at org.eclipse.wst.server.core.internal.Server.visitModule(Server.java:2970)
	at org.eclipse.wst.server.core.internal.Server.visit(Server.java:2954)
	at org.eclipse.wst.server.core.internal.Server$ResourceChangeJob.run(Server.java:228)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The annoying thing is that an error dialog pops up every time I make a change to my project. The project in question is a Spring project, which, as it happens, does use a Maven dependency container, but I'm not at all convinced that this is a Maven or m2e issue.
I suggest that this bug be re-opened and moved to the appropriate project (JST/WST?).
Comment 3 Denis Roy CLA 2021-04-19 13:24:22 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/