Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325775 - ResourceException while deleting a JPA project added to an EAR
Summary: ResourceException while deleting a JPA project added to an EAR
Status: RESOLVED INVALID
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-20 12:32 EDT by Salvador Zalapa CLA
Modified: 2011-02-21 09:35 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Salvador Zalapa CLA 2010-09-20 12:32:05 EDT
Build Identifier:  M20100909-0800

Deleting a JPA project added to an EAR the following trace is logged:

org.eclipse.core.internal.resources.ResourceException: Resource '/MyJPA' does not exist.
	at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:326)
	at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:200)
	at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:134)
	at org.eclipse.core.internal.resources.Project.hasNature(Project.java:511)
	at org.eclipse.jpt.core.JptCorePlugin.projectHasPluginNature(JptCorePlugin.java:313)
	at org.eclipse.jpt.core.internal.AbstractJpaProject.getBundleRoot(AbstractJpaProject.java:562)
	at org.eclipse.jpt.core.internal.AbstractJpaProject.isInBundleRoot(AbstractJpaProject.java:550)
	at org.eclipse.jpt.core.internal.AbstractJpaProject.externalProjectChanged(AbstractJpaProject.java:1518)
	at org.eclipse.jpt.core.internal.AbstractJpaProject.projectChanged(AbstractJpaProject.java:1444)
	at org.eclipse.jpt.core.GenericJpaProjectManager.projectChanged_(GenericJpaProjectManager.java:437)
	at org.eclipse.jpt.core.GenericJpaProjectManager$1.execute_(GenericJpaProjectManager.java:426)
	at org.eclipse.jpt.core.GenericJpaProjectManager$EventHandlerCommand.execute(GenericJpaProjectManager.java:713)
	at org.eclipse.jpt.utility.internal.AsynchronousCommandExecutor$Consumer.execute(AsynchronousCommandExecutor.java:163)
	at org.eclipse.jpt.utility.internal.ConsumerThreadCoordinator$RunnableConsumer.execute_(ConsumerThreadCoordinator.java:226)
	at org.eclipse.jpt.utility.internal.ConsumerThreadCoordinator$RunnableConsumer.execute(ConsumerThreadCoordinator.java:216)
	at org.eclipse.jpt.utility.internal.ConsumerThreadCoordinator$RunnableConsumer.run(ConsumerThreadCoordinator.java:204)
	at java.lang.Thread.run(Unknown Source)


Reproducible: Always

Steps to Reproduce:
1.Create an EAR project with default modules (version 5 or 6)
2.Create a JPA project and add it to the EAR
3.Delete the JPA project from Explorer
Comment 1 Allan Zhang CLA 2010-11-02 16:13:38 EDT
It appears the exception is intentionally logged from (above) at org.eclipse.jpt.core.JptCorePlugin.projectHasPluginNature(JptCorePlugin.java:313)

    public static boolean projectHasPluginNature(IProject project) {
        try {
            return project.hasNature("org.eclipse.pde.PluginNature");
        }
        catch (CoreException ce) {
            // fall through
            log(ce); <---------------------------------------------------------------------------------
        }
        return false;
    }

The method returns false without any problem.
Comment 2 Salvador Zalapa CLA 2011-02-21 09:35:48 EST
Resolving defect by Allan Zhang comment