Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339399 - Exception thrown when changing the persistence.xml version to an invalid version
Summary: Exception thrown when changing the persistence.xml version to an invalid version
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Brian Vosburgh CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 12:51 EST by Pascal Filion CLA
Modified: 2011-06-14 11:21 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 Pascal Filion CLA 2011-03-09 12:51:32 EST
Build Identifier: I20110127-2034

Problem when changing the version number.

Reproducible: Always

Steps to Reproduce:
1. Create new Java project
2. Go to the project properties
3. Convert the project to faceted form
4. Add JPA facet
5. Open the persistence.xml and go to the source
6. Insert 1 in the version header, version="2.0" becomes version="12.0"

The following exception is thrown
!ENTRY org.eclipse.core.jobs 4 2 2011-03-09 12:38:15.935
!MESSAGE An internal error occurred during: "Synchronize JPA project: 'Test'".
!STACK 0
java.lang.IllegalArgumentException: Illegal resource type: null
	at org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform.getResourceDefinition(GenericJpaPlatform.java:174)
	at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode.getPersistenceXmlDefinition(AbstractPersistenceXmlContextNode.java:37)
	at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlContextNode.getContextNodeFactory(AbstractPersistenceXmlContextNode.java:45)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml.buildPersistence(GenericPersistenceXml.java:133)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml.synchronizeWithResourceModel(GenericPersistenceXml.java:101)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode.syncPersistenceXml(GenericRootContextNode.java:90)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode.synchronizeWithResourceModel(GenericRootContextNode.java:66)
	at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.synchronizeContextModel(AbstractJpaProject.java:1807)
	at org.eclipse.jpt.jpa.core.GenericJpaProjectManager$1.execute(GenericJpaProjectManager.java:432)
	at org.eclipse.jpt.common.core.internal.utility.JobSynchronizer$SynchronizationJob.run(JobSynchronizer.java:160)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Neil Hauge CLA 2011-05-13 14:27:59 EDT
This is probably tied to the fix for bug 341415.
Comment 2 Brian Vosburgh CLA 2011-05-17 17:26:26 EDT
Patch checked into HEAD for bug 341415 fixes this bug.
Comment 3 Jolene Moffitt CLA 2011-06-14 11:21:05 EDT
Verified in Build I-3.3.0RC4-20110603221533

Verified no errors appear in error log when you change the version header value.  See the link to view test steps for verification.  http://wiki.eclipse.org/Dali_3.0_RC2