|org.eclipse.persistence.exceptions.ValidationException [message #791989]
||Mon, 06 February 2012 13:48
| Slawomir Korbas
Registered: February 2012
I am new to Eclipse. I stuck since 3 days on strange problem. What I have done:
1. Downloaded and installed Eclipse (eclipse-jee-indigo-SR1-win32-x86_64.zip)
2. Installed GlassFish (glassfish-3.1.1-windows.exe)
3. Installed plugin for Glassfish (for Eclipse Indigio IDE)
4. Created EJB project with facets: Java,EJB,JPA 2.0
5. GlassFish target platform: "GlassFish Server Open Source(Java EE6)"
6. JPA settings - selected as Platform "EclipseLink 2.3"
7. Generated "JPA Entities form Tables"
When I am trying to deploy this application to server I receive following exception:
Exception Description: Predeployment of PersistenceUnit [MegajanServerApp] failed.
Internal Exception: Exception [EclipseLink-7333] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The reference column name [name] mapped on the element [field products] does not correspond to a valid field on the mapping reference.. Please see server.log for more details.
Here is the mapping definition generated in one of my classe:
//bi-directional many-to-many association to Product
@JoinColumn(name="product_name", referencedColumnName="name", nullable=false)
private List<Product> products;
In my opinion there is no problem with mapping definition but there is a bug in EclipseLink in this validation. I found no solution for this problem on the Web. What I tried:
1. Some people calimed this is case-sensitivity issue in mapping definition but this is not my case. (included in persistence.xml following line <property name="eclipselink.jpa.uppercase-column-names" value="false"/> and problem still exists)
2. Updated everything what I supposed to cause this error. Even EclipseLink 2.4.0 night build.
3. Reinstalled many times GlassFish server 3.1, Eclipse Indigio IDE
4. The strangest thing is that about 2 month ago I did the same things but on other PC machine and it worked fine. ???
I am so disappointed... How can I design reliable, distributed applications with EJB 3.1 if mentioned bugs occur? Maybe I will try NetBeans IDE.
Please, give me any solution to this problem.
Powered by FUDForum
. Page generated in 0.01977 seconds