Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problems with single character entity class names

Yes, this seem to be a bug in our JPA metadata processing, it seems to be
confusing single characters with generics or primitive types.  Please log
this bug.

Are the classes also in the default (no) package?  It may also work if you
give them a package.


Mike Traum-2 wrote:
> 
> Hi,
> I have test projects which use the following entites: A->B->C (where -> 
> represents a bidirectional OneToMany). This worked in eclipselink 1.1.2. 
> After upgrading to eclipselink 1.2, I get the following exception when 
> starting up:
> Internal Exception: javax.persistence.PersistenceException: Exception 
> [EclipseLink-28018] (Eclipse Persistence Services - 
> 1.2.0.v20091016-r5565): 
> org.eclipse.persistence.exceptions.EntityManagerSetupException
> Exception Description: Predeployment of PersistenceUnit [testjparemove] 
> failed.
> Internal Exception: Exception [EclipseLink-7214] (Eclipse Persistence 
> Services - 1.2.0.v20091016-r5565): 
> org.eclipse.persistence.exceptions.ValidationException
> Exception Description: The target entity of the relationship attribute 
> [children] on the class [class A] cannot be determined.  When not using 
> generics, ensure the target entity is defined on the relationship mapping.
>     at 
> org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:123)
> ...
> 
> Generics are being used. If I go ahead and apply the targetEntity to the 
> OneToMany, I get the following exception:
> Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence 
> Services - 1.2.0.v20091016-r5565): 
> org.eclipse.persistence.exceptions.ValidationException
> Exception Description: [class A] uses a non-entity [class byte] as 
> target entity in the relationship attribute [method getChildren].
>     at 
> org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:123)
> ...
> 
> If I rename my classes to be more than one character, as in 
> Atest->Btest->Ctest, no problems exist. Sounds like a bug, no?
> 
> thanks,
> mike
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://old.nabble.com/Problems-with-single-character-entity-class-names-tp27067439p27129006.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top