openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject FW: [jira] Updated: (OPENJPA-229) OpenJPA fails with MappedSuperclasses and Entities with the same short names
Date Wed, 25 Apr 2007 21:49:35 GMT
Any thoughts about this patch? It changes how @Embeddable and
@MappedSuperclass classes are enhanced.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Patrick Linskey (JIRA) [mailto:jira@apache.org] 
> Sent: Wednesday, April 25, 2007 2:40 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: [jira] Updated: (OPENJPA-229) OpenJPA fails with 
> MappedSuperclasses and Entities with the same short names
> 
> 
>      [ 
> https://issues.apache.org/jira/browse/OPENJPA-229?page=com.atl
assian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Patrick Linskey updated OPENJPA-229:
> ------------------------------------
> 
>     Attachment: OPENJPA-229.patch
> 
> This fixes the problem by changing the enhancer to not 
> register aliases for types that are not mapped, as determined 
> by a call to ClassMetaData.isMapped(). Thoughts?
> 
> > OpenJPA fails with MappedSuperclasses and Entities with the 
> same short 
> > names
> > 
> ----------------------------------------------------------------------
> > ------
> >
> >                 Key: OPENJPA-229
> >                 URL: 
> https://issues.apache.org/jira/browse/OPENJPA-229
> >             Project: OpenJPA
> >          Issue Type: Bug
> >          Components: kernel
> >    Affects Versions: 0.9.0, 0.9.6, 0.9.7
> >         Environment: WindowsXP SP2 full updates 2007-04-25, 
> Informix 10, Java 1.6.0
> >            Reporter: Patrick Linskey
> >             Fix For: 0.9.8
> >
> >         Attachments: OPENJPA-229.patch
> >
> >
> > When running the test case from OPENJPA-228 (after a few 
> modifications to get it working), I get the exception 
> included below. If I change the 'Article' mapped superclass 
> to be named 'ArticleBase', things work.
> > It looks like this is happening because multiple classes 
> are registering for the same alias. We should change the 
> enhancer to not register aliases for mapped superclasses.
> > Exception in thread "main" <0.0.0 nonfatal user error> 
> org.apache.openjpa.persistence.ArgumentException: 0
> > 	at 
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:805)
> > 	at 
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:766)
> > 	at 
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:762)
> > 	at 
> org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQu
> ery.java:517)
> > 	at 
> org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:230)
> > 	at 
> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryIm
> pl.java:269)
> > 	at nl.reinders.bm.BMTestOpenJPA.main(BMTestOpenJPA.java:41)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
> > 	at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:585)
> > 	at 
> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> > Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
> > 	at 
> org.apache.openjpa.jdbc.kernel.exps.PCPath.appendTo(PCPath.java:636)
> > 	at 
> org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(F
> ilterValueImpl.java:62)
> > 	at 
> org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(F
> ilterValueImpl.java:58)
> > 	at 
> org.apache.openjpa.jdbc.sql.DBDictionary.appendCast(DBDictiona
> ry.java:2486)
> > 	at 
> org.apache.openjpa.jdbc.sql.DBDictionary.comparison(DBDictiona
> ry.java:2443)
> > 	at 
> org.apache.openjpa.jdbc.kernel.exps.CompareExpression.appendTo
> (CompareExpression.java:75)
> > 	at 
> org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhe
> re(SelectConstructor.java:238)
> > 	at 
> org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate
> (SelectConstructor.java:79)
> > 	at 
> org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelec
> ts(JDBCStoreQuery.java:330)
> > 	at 
> org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDB
> CStoreQuery.java:169)
> > 	at 
> org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecut
or.executeQuery(ExpressionStoreQuery.java:677)
> > 	at 
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:985)
> > 	at 
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:796)
> > 	... 11 more
> 
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA
Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,
 copyrighted  and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete it.

Mime
View raw message