You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-06 17:13:23
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-361?page=all ] Emmanuel Bernard resolved ANN-361: ---------------------------------- Resolution: Rejected > @Column(name="xxxx") does not work when composit key is used > ------------------------------------------------------------ > > Key: ANN-361 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-361 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Reporter: Thomas Risberg > > > When using a composit key and specifying name of id column - the specified name is ignored and a column with the name of the field is generated. > This: > ------------- > import java.io.Serializable; > public class ProductItemPK implements Serializable { > private Long productId; > private Long itemId; > } > ------------- > import javax.persistence.*; > @Entity > @IdClass(value=ProductItemPK.class) > public class ProductItem { > @Id > @Column(name="product_id") > private Long productId; > @Id > @Column(name="item_id") > private Long itemId; > private String name; > } > ------------- > results in: > create table ProductItem ( > productId number(19,0) not null, > itemId number(19,0) not null, > name varchar2(255 char), > primary key (productId, itemId) > ) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-06 17:11:42
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-361?page=all ] Emmanuel Bernard reopened ANN-361: ---------------------------------- > @Column(name="xxxx") does not work when composit key is used > ------------------------------------------------------------ > > Key: ANN-361 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-361 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Reporter: Thomas Risberg > > > When using a composit key and specifying name of id column - the specified name is ignored and a column with the name of the field is generated. > This: > ------------- > import java.io.Serializable; > public class ProductItemPK implements Serializable { > private Long productId; > private Long itemId; > } > ------------- > import javax.persistence.*; > @Entity > @IdClass(value=ProductItemPK.class) > public class ProductItem { > @Id > @Column(name="product_id") > private Long productId; > @Id > @Column(name="item_id") > private Long itemId; > private String name; > } > ------------- > results in: > create table ProductItem ( > productId number(19,0) not null, > itemId number(19,0) not null, > name varchar2(255 char), > primary key (productId, itemId) > ) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-06 17:11:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-361?page=all ] Emmanuel Bernard resolved ANN-361: ---------------------------------- Resolution: Fixed Put your @Column in the actual @IdClass > @Column(name="xxxx") does not work when composit key is used > ------------------------------------------------------------ > > Key: ANN-361 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-361 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Reporter: Thomas Risberg > > > When using a composit key and specifying name of id column - the specified name is ignored and a column with the name of the field is generated. > This: > ------------- > import java.io.Serializable; > public class ProductItemPK implements Serializable { > private Long productId; > private Long itemId; > } > ------------- > import javax.persistence.*; > @Entity > @IdClass(value=ProductItemPK.class) > public class ProductItem { > @Id > @Column(name="product_id") > private Long productId; > @Id > @Column(name="item_id") > private Long itemId; > private String name; > } > ------------- > results in: > create table ProductItem ( > productId number(19,0) not null, > itemId number(19,0) not null, > name varchar2(255 char), > primary key (productId, itemId) > ) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Bulto (JIRA) <no...@at...> - 2006-06-06 16:15:29
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1669?page=comments#action_23274 ] Bulto commented on HHH-1669: ---------------------------- Hello, It's a serious bug. ligne 181 : [code] finally { if ( wasAutoCommit ) { try { connection.setAutoCommit( true ); } catch( Throwable ignore ) { log.trace( "was unable to reset connection back to auto-commit" ); } session.getBatcher().closeConnection( connection ); } } [/code] The connection is closed only if it was AutoCommit. Hibernate must always close the connection. The correct code : [code] finally { if ( wasAutoCommit ) { try { connection.setAutoCommit( true ); } catch( Throwable ignore ) { log.trace( "was unable to reset connection back to auto-commit" ); } } session.getBatcher().closeConnection( connection ); } [/code] > TransactionHelper leaves JDBC connections unclosed, when the connection is set to autocommit false > -------------------------------------------------------------------------------------------------- > > Key: HHH-1669 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1669 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0 cr1 > Environment: Hibernate 3.2.0 CR1 > Reporter: julio rincon > > > The Isolater.JdbcDelegate class's delegateWork(...) method leaves the JDBC Connection open causing a lekage. Specifically, the connection is left open only when the Connection was set to autocommit false. > The escenario in which the problem is experienced is when a TransactionHelper subclass is implemented for instance to generate custom identifiers, the TransactionHelper provides the doWorkInNewTransaction method to ensure that the ID generation is done in a separate transaction and always commited. The mentioned method uses the Isolater class for this purpose. > This is the patch: > Index: src/org/hibernate/engine/transaction/Isolater.java > =================================================================== > --- src/org/hibernate/engine/transaction/Isolater.java (revision 9747) > +++ src/org/hibernate/engine/transaction/Isolater.java (working copy) > @@ -185,9 +185,9 @@ > } > catch( Throwable ignore ) { > log.trace( "was unable to reset connection back to auto-commit" ); > - } > - session.getBatcher().closeConnection( connection ); > + } > } > + session.getBatcher().closeConnection( connection ); > } > } > } > Cheers > Julio. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jeff S. (JIRA) <no...@at...> - 2006-06-06 09:18:20
|
@Email validator failed a valid email address --------------------------------------------- Key: HBX-684 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-684 Project: Hibernate Tools Type: Bug Environment: JBoss 4.0.4.GA Reporter: Jeff Schnitzer @Email validation failed this email adddress: SRS0=aHFE=YF=pobox.com=fr...@bo... It looks valid to me. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-06-06 05:32:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1815?page=all ] Max Rydahl Andersen closed HHH-1815: ------------------------------------ Resolution: Rejected stateless.createQuery("bla bla").executeUpdate() > Add support for batch operations in StatelessSession > ---------------------------------------------------- > > Key: HHH-1815 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1815 > Project: Hibernate3 > Type: Improvement > Components: core > Environment: all > Reporter: Eric Williams > Priority: Minor > > > The principal use cases for StatelessSession seems to be in batch-oriented processing. However, there is no support for batch inserts or updates of persistent entities in the StatelessSession interface. This severely handicaps its usefulness for batch data loading. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-06 05:21:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-357?page=all ] Christian Bauer resolved ANN-357: --------------------------------- Resolution: Rejected > Hibernate does not respect batch setting (annotation) on collection for loading > ------------------------------------------------------------------------------- > > Key: ANN-357 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-357 > Project: Hibernate Annotations > Type: Bug > Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 > Reporter: neelabh > Priority: Minor > > > I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations > Bu#1 > When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like > portfolio1 > entry1 > permission1 > query1 > portfolio2 > entry2 > permission2 > query2 > Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? > Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? > Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? > I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. > Can you please check > This is affecting performance of huge portfolio. > Bug#2 > Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-06 05:21:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1812?page=all ] Christian Bauer resolved HHH-1812: ---------------------------------- Resolution: Rejected http://forum.hibernate.org/ > Hibernate many-to-one collections vs dropdown > --------------------------------------------- > > Key: HHH-1812 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1812 > Project: Hibernate3 > Type: Task > Versions: 3.0 final > Environment: Jboss, Postgres 8.0 > Reporter: Peppe > > Original Estimate: 2 weeks > Remaining: 2 weeks > > Hi, i'm going hell for a problem about hibernate and collections. > I have two mapped classes: > public class Indirizzi implements java.io.Serializable { > private int idIndirizzo; (ID) > private DizNazioni dizNazioni; > private String indirizzo; > .................(other code) > } > public class DizNazioni implements java.io.Serializable { > private String siglanazione; (ID) > private String nazione; > private Set<Indirizzi> indirizzis = new HashSet<Indirizzi>(0); > .................(other code) > } > and hbm mapping files: > <hibernate-mapping> > <class name="unibiblio.dati.anagrafica.DAO.Indirizzi" table="indirizzi"> > <id name="idIndirizzo" type="int"> > <column name="id_indirizzo" /> > <generator class="sequence"> > <param name="sequence">seq_generica</param> > </generator> > </id> > <many-to-one name="dizNazioni" class="unibiblio.dati.anagrafica.DAO.DizNazioni" fetch="select"> > <column name="siglanazione" length="2" not-null="true" /> > </many-to-one> > <property name="indirizzo" type="string"> > <column name="indirizzo" length="40" /> > </property> > </class> > </hibernate-mapping> > <hibernate-mapping> > <class name="unibiblio.dati.anagrafica.DAO.DizNazioni" table="diz_nazioni"> > <id name="siglanazione" type="string"> > <column name="siglanazione" length="2" /> > <generator class="assigned" /> > </id> > <property name="nazione" type="string"> > <column name="nazione" length="50" not-null="true" /> > </property> > <set name="indirizzis" inverse="true"> > <key> > <column name="siglanazione" length="2" not-null="true" /> > </key> > <one-to-many class="unibiblio.dati.anagrafica.DAO.Indirizzi" /> > </set> > </class> > </hibernate-mapping> > Well, I'll have a DizNazioni record associated to 1..n indirizzi, and I can associate a DizNazioni record to an Indirizzi one choosing from lot DizNazioni. > I made a form to insert and modify Indirizzi data: > edit: Indirizzi.indirizzo > dropdown: Indirizzi.DizNazioni > When I insert it works but if I try to modify it throw error: > identifier of an instance of unibiblio.dati.anagrafica.DAO.DizNazioni was altered from IL to IT > It seems to try to change ID for DizNazioni record instead of change reference in Indirizzi record of it. > How do I have to work? Where's my mistake? > Thanks > Peppe > Below error details: > Full stack trace of any exception that occurs:11:32:17,406 ERROR [SeamExceptionFilter] uncaught exception handled by Seam > javax.servlet.ServletException: Error calling action method of component with id _tagId0:_tagId131 > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) > at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54) > at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174) > at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) > at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) > at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) > at java.lang.Thread.run(Thread.java:595) > 11:32:17,406 INFO [SeamExceptionFilter] killing transaction > 11:32:17,406 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception > javax.faces.FacesException: Error calling action method of component with id _tagId0:_tagId131 > at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74) > at javax.faces.component.UICommand.broadcast(UICommand.java:106) > at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) > at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164) > at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) > at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) > at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54) > at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174) > at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) > at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) > at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) > at java.lang.Thread.run(Thread.java:595) > Caused by: javax.faces.el.EvaluationException: /editPersone.xhtml @488,126 action="#{personeEditor.update}": org.hibernate.HibernateException: identifier of an instance of unibiblio.dati.anagrafica.DAO.DizNazioni was altered from IL to IT > at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73) > at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) > ... 31 more > Caused by: org.hibernate.HibernateException: identifier of an instance of unibiblio.dati.anagrafica.DAO.DizNazioni was altered from IL to IT > at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:58) > at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:157) > at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:113) > at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195) > at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) > at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35) > at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:957) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1529) > at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) > at unibiblio.business.anagrafica.BO.PersoneFinder.executeQuery(PersoneFinder.java:114) > at unibiblio.business.anagrafica.BO.PersoneFinder.refresh(PersoneFinder.java:143) > at unibiblio.business.anagrafica.BO.PersoneFinder$$EnhancerByCGLIB$$95043fe2.CGLIB$refresh$2(<generated>) > at unibiblio.business.anagrafica.BO.PersoneFinder$$EnhancerByCGLIB$$95043fe2$$FastClassByCGLIB$$1d69d22d.invoke(<generated>) > at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167) > at org.jboss.seam.interceptors.JavaBeanInterceptor$1.proceed(JavaBeanInterceptor.java:80) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:56) > at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:65) > at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:32) > at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21) > at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:58) > at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:58) > at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at unibiblio.business.anagrafica.Autenticazione.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:31) > at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30) > at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:38) > at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:41) > at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51) > at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39) > at unibiblio.business.anagrafica.BO.PersoneFinder$$EnhancerByCGLIB$$95043fe2.refresh(<generated>) > at unibiblio.business.anagrafica.BO.PersoneEditor.refreshFinder(PersoneEditor.java:282) > at unibiblio.business.anagrafica.BO.PersoneEditor.update(PersoneEditor.java:270) > at unibiblio.business.anagrafica.BO.PersoneEditor$$EnhancerByCGLIB$$17708f69.CGLIB$update$3(<generated>) > at unibiblio.business.anagrafica.BO.PersoneEditor$$EnhancerByCGLIB$$17708f69$$FastClassByCGLIB$$6c7d7296.invoke(<generated>) > at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167) > at org.jboss.seam.interceptors.JavaBeanInterceptor$1.proceed(JavaBeanInterceptor.java:80) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:56) > at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:47) > at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:32) > at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21) > at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:58) > at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:58) > at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at unibiblio.business.anagrafica.Autenticazione.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:31) > at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30) > at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:38) > at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) > at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) > at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) > at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:41) > at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51) > at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39) > at unibiblio.business.anagrafica.BO.PersoneEditor$$EnhancerByCGLIB$$17708f69.update(<generated>) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at com.sun.el.parser.AstValue.invoke(AstValue.java:130) > at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274) > at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) > at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-06 05:19:24
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-1558?page=all ] Christian Bauer resolved HB-1558: --------------------------------- Resolution: Rejected http://forum.hibernate.org./ > wrong generation of class alias > ------------------------------- > > Key: HB-1558 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-1558 > Project: Hibernate2 > Type: Bug > Components: core > Versions: 2.1.1 > Environment: hibernate, oracle10g > Reporter: zaid saeedi khan > > > Hi, > I have a table USERROLE as follows: > USERID ROLEID > 1 1 > 1 2 > 2 2 > 2 3 > 2 1 > I want the following SQL query > select ur1.USERID, (select count(ur2.roleid) from userrole ur2 where ur1.userid=ur2.userid) from userrole ur1 > group by userid > output is: > 1 2 > 2 3 > i.e. I simply want to show the number of roles against each user. > Now when I use hibernate, I make use of derived property and specify the subselect in the formula attribute. > I have GroupBy.hgm.xml mapped to USERROLE and GroupBy.java as model which consists of id and count. > I use > Session session = sessionFactory.openSession(); > String query = "from GroupBy gb group by gb.userId"; > List results = session.find(query); > BUT THE PROBLEM IS HIBERNATE DOES NOT ACCEPT gb AS THE TABLE ALIAS RATHER AS SHOWN BELOW IT GENERATES groupby0_ AS THE ALIAS. > Hibernate: select groupby0_.USERID as USERID, (select count(*) from USERROLE ur1 where ur1.userId=groupby0_.userId) as f0_ from USERROLE groupby0_ group by groupby0_.USERID > SO TO PERFORM MY QUERY I HAD TO HARDCODE(VERY BAD) groupby0_ IN THE FORMULA ATTRIBUTE AS FOLLOWS: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> > <hibernate-mapping> > <class name="com.a.test.model.GroupBy" table="USERROLE"> > <id name="userId" column="USERID"> > <generator class="increment"/> > </id> > <property name="count" formula="(select count(*) from USERROLE ur1 where ur1.userId=groupby0_.userId)" /> > </class> > </hibernate-mapping> > Please help me to workaround this problem. > Thanks in advance. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-06-06 03:53:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1816?page=all ] Steve Ebersole closed HHH-1816: ------------------------------- Resolution: Fixed > serializing session from a named session factory to a different vm broken > ------------------------------------------------------------------------- > > Key: HHH-1816 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1816 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr2 > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.0 > > > It should be possible to serialize a session from a named session factory instance into a different vm in which a session factory with the same name resides. This used to work and was broken by the session serialization performance improvements done earlier. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-06-06 03:48:26
|
serializing session from a named session factory to a different vm broken ------------------------------------------------------------------------- Key: HHH-1816 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1816 Project: Hibernate3 Type: Bug Components: core Versions: 3.2.0.cr2 Reporter: Steve Ebersole Assigned to: Steve Ebersole Fix For: 3.2.0 It should be possible to serialize a session from a named session factory instance into a different vm in which a session factory with the same name resides. This used to work and was broken by the session serialization performance improvements done earlier. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Mark D. (JIRA) <no...@at...> - 2006-06-06 03:08:07
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1012?page=comments#action_23262 ] Mark Daring commented on HHH-1012: ---------------------------------- Please apply the patch. This issue resulted in wasted time of investigation. > index not created by SchemaUpdate > --------------------------------- > > Key: HHH-1012 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1012 > Project: Hibernate3 > Type: Bug > Versions: 3.1 beta 1, 3.1 beta 2, 3.0.5 > Environment: Windows XP, MySQL/PostgreSQL > Reporter: Xavier Farret > Priority: Minor > Attachments: Indexes.patch > > > i'm using an hbm.xml as describe below and the 'hibernate.hbm2ddl.auto' is egal to update. > <class table="featurestat" name="....."> > <id name="id" type="long" column="idFeatureStat"> > <generator class="increment"/> > </id> > <properties name="fsUniqueValue" unique="true"> > .... > </properties> > <property name="frequency" .../> > <property name="idFatherFeature" index="FeatStatDocExtSectFeat" not-null="true" type="long" column="..."/> > .... > </class> > Indexes for pk or unique key are well created, but the index explicity named 'FeatStatDocExtSectFeat' is never created. If i put the property 'hibernate.hbm2ddl.auto' in the cfg.xml as 'create' the index is created. But in my case i have to set my property 'hibernate.hbm2ddl.auto' to update. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Stefan N. (JIRA) <no...@at...> - 2006-06-06 03:02:39
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-192?page=all ] Stefan Norberg updated EJB-192: ------------------------------- Attachment: eager-eager.jar A simple EJB3 app with a client reproducing this issue. > Serialization exception with hashCode() and eager-eager > ------------------------------------------------------- > > Key: EJB-192 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-192 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Environment: JBoss 4.0.4.GA-patch1 and SUN JDK 1.5.0_07 on Windows XP > Reporter: Stefan Norberg > Attachments: eager-eager.jar > > > I have a problem with some weird stuff going on when I implement the equals()/hashCode() methods in my entites. The short version is that I get a NullPointerException on deserialization on the client side after a remote server request when I am using eager fetching in both Team and Player. If I set the player-> team to lazy it works. > More details are on the Hibernate forum: > http://forum.hibernate.org/viewtopic.php?p=2308640#2308640 > I'm going to post the test case here tomorrow when I get the code from work. > All the fields in the entity are null when the the object hits the deserialization code and hence the exception... But the name is of course initialized when shown in my test case app later. What gives? Seems to me the deserialization is broken. Perhaps this is a bug in JBoss remoting, but since I can only get this with the Entity Manager I posted here. > This workaround works fine I think, but something seems terribly broken in either Hibernate or Jboss (remoting?). > public boolean equals(Object obj) { > if (name == null) return super.equals(obj); > if (obj instanceof Team) { > Team other = (Team) obj; > return other.getName().equals(this.getName()); > } > return false; > } > public int hashCode() { > if (name == null) return super.hashCode(obj); > return name.hashCode(); > } > Full stack trace of any exception that occurs: > javax.ejb.EJBException: java.lang.NullPointerException > at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69) > at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83) > at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225) > at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) > at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681) > at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358) > at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412) > at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239) > Caused by: java.lang.NullPointerException > at com.weirdstuff.Player.hashCode(Player.java:83) > at java.util.HashMap.hash(HashMap.java:264) > at java.util.HashMap.put(HashMap.java:382) > at java.util.HashSet.add(HashSet.java:194) > at java.util.AbstractCollection.addAll(AbstractCollection.java:318) > at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273) > at org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183) > at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268) > at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249) > at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866) > at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853) > at org.hibernate.loader.Loader.doQuery(Loader.java:717) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) > at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) > at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48) > at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42) > at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821) > at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370) > at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351) > at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122) > at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178) > at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86) > at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871) > at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:839) > at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266) > at org.hibernate.type.EntityType.resolve(EntityType.java:303) > at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116) > at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842) > at org.hibernate.loader.Loader.doQuery(Loader.java:717) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) > at org.hibernate.loader.Loader.doList(Loader.java:2145) > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) > at org.hibernate.loader.Loader.list(Loader.java:2024) > at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392) > at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333) > at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53) > at com.weirdstuff.FacadeBean.getPlayers(FacadeBean.java:17) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) > at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) > at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) > at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225) > at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) > at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681) > at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358) > at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412) > at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239) > at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190) > at org.jboss.remoting.Client.invoke(Client.java:525) > at org.jboss.remoting.Client.invoke(Client.java:488) > at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102) > at $Proxy0.getPlayers(Unknown Source) > at com.weirdstuff.TestHashCodeClient.testGetPlayer(TestHashCodeClient.java:51) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ali I. (JIRA) <no...@at...> - 2006-06-06 02:49:26
|
Bag associations not translated correctly with hbm2hbmxml --------------------------------------------------------- Key: HBX-683 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-683 Project: Hibernate Tools Type: Bug Versions: 3.1.beta5 Environment: hibernatetools 3.1 beta 5 with Hibernate 3.1 CR1 Reporter: Ali Ibrahim Attachments: bag.hbm.ftl A bag association in a configuration is not translated correctly when generating hbm XML files via hbm2hbmxml. The current code translates the bag association without taking into account the type of element in the collection, whether it is one-to-many or many-to-many, etc. Instead it puts a placeholder of: <element type="string" column="dummy"/> A simple fix would be to replicate most of the functionality in template for set associations. I am not sure if there is extra logic that is specific for bag associations. I have attached a simple template augmentation which allowed for one-to-many relationships to be translated correctly (for my simple case at least). This fix was enough for my purposes of using linguine maps to create a diagram from the model. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: neelabh (JIRA) <no...@at...> - 2006-06-06 02:46:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-357?page=comments#action_23266 ] neelabh commented on ANN-357: ----------------------------- Hi Christian, You can close this issue, I have found the problem. The problem is that one of the setter of collection was making association between child and parent. Example public void setChildren(List<Child> children){ childrenList=chidren; //following code was causing this problem for(Child child:Children){ child.setParent(this); } } > Hibernate does not respect batch setting (annotation) on collection for loading > ------------------------------------------------------------------------------- > > Key: ANN-357 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-357 > Project: Hibernate Annotations > Type: Bug > Environment: hibernate 3.1.3 (2006.03.20) Hibernate annotation 3.1 beta 8, 20.01.2006 > Reporter: neelabh > Priority: Minor > > > I have a list of portfolios and several collections (entries, quries, permissions) mapping. The collection are set for lazy initialization. I am using hibernate annotations > Bu#1 > When I load portfolio first time(a list of portfolio) then entries , queries and permission are not batched for query. Infact they are queried one by one like > portfolio1 > entry1 > permission1 > query1 > portfolio2 > entry2 > permission2 > query2 > Hibernate: select portfolio0_.portfolioId as portfoli1_0_0_, portfolio0_.name as name0_0_, portfolio0_.owner as owner0_0_, portfolio0_.currentDateTime as currentD4_0_0_, portfolio0_.TSportfolioId as TSportfo5_0_0_ from psPortfolio portfolio0_ where portfolio0_.portfolioId in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) > Hibernate: select instrument0_.portfolioId as portfoli5_1_, instrument0_.entryId as entryId1_, instrument0_.entryId as entryId2_0_, instrument0_.portfolioId as portfoli5_2_0_, instrument0_.productType as productT2_2_0_, instrument0_.quantity as quantity2_0_, instrument0_.TSproductId as TSproduc4_2_0_ from psInstrumentEntry instrument0_ where instrument0_.portfolioId=? > Hibernate: select queryentri0_.portfolioId as portfoli4_1_, queryentri0_.entryId as entryId1_, queryentri0_.entryId as entryId1_0_, queryentri0_.portfolioId as portfoli4_1_0_, queryentri0_.name as name1_0_, queryentri0_.comment as comment1_0_ from psQueryEntry queryentri0_ where queryentri0_.portfolioId=? > Hibernate: select portfoliop0_.portfolioId as portfoli6_1_, portfoliop0_.portfolioPermissionId as portfoli1_1_, portfoliop0_.portfolioPermissionId as portfoli1_4_0_, portfoliop0_.portfolioId as portfoli6_4_0_, portfoliop0_.partyRefType as partyRef2_4_0_, portfoliop0_.partyId as partyId4_0_, portfoliop0_.partySubType as partySub4_4_0_, portfoliop0_.accessLevel as accessLe5_4_0_ from psPortfolioPermission portfoliop0_ where portfoliop0_.portfolioId=? > I am not sure what is wrong with setting however, when I delete or amend or insert are batched properly. > Can you please check > This is affecting performance of huge portfolio. > Bug#2 > Even if I wnat to initialize only entry, it loads queries and permissions both, Is there any way to prohibit using annotations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian A. (JIRA) <no...@at...> - 2006-06-06 02:43:53
|
SchemaUpdate should update existing rows when adding columns that map to a primitive type ----------------------------------------------------------------------------------------- Key: HHH-1814 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1814 Project: Hibernate3 Type: Improvement Components: core Versions: 3.1.3 Environment: Hibernate 3.1.3 with different databases, tested with MySQL 5.0.16/ConnectorJ 3.1.13 as well as SapDB/MaxDB and hSQL Reporter: Christian Aust When SchemaUpdate is started to update a table schema to a given set of mapping metadata, it will create columns in existing tables as needed. If such a column maps to a primitive Java type (i.e. int, long, double, boolean) it is important to update this column's values to some default value other than NULL. Failure to do so will result in Exceptions when Hibernate actually tries to load instance data for such a class from the database, and tries to convert a NULL value back to an int, long, double or boolean using the property setter. To avoid this, the result of ALTER statements could include an UPDATE statement as well, updating already existing rows to a reasonable value. ALTER TABLE animals ADD COLUMN (age int); UPDATE animals SET age = 0 WHERE AGE IS NULL; I'd like to see this patch applied to the SchemaUpdate of hibernate, which I happen to use a lot. But since generation of ALTER statements is processed inside org.hibernate.mapping.Table#sqlAlterStrings I can't work around this issue without patching the hibernate core. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Stefan N. (JIRA) <no...@at...> - 2006-06-06 02:43:40
|
Serialization exception with hashCode() and eager-eager ------------------------------------------------------- Key: EJB-192 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-192 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Environment: JBoss 4.0.4.GA-patch1 and SUN JDK 1.5.0_07 on Windows XP Reporter: Stefan Norberg I have a problem with some weird stuff going on when I implement the equals()/hashCode() methods in my entites. The short version is that I get a NullPointerException on deserialization on the client side after a remote server request when I am using eager fetching in both Team and Player. If I set the player-> team to lazy it works. More details are on the Hibernate forum: http://forum.hibernate.org/viewtopic.php?p=2308640#2308640 I'm going to post the test case here tomorrow when I get the code from work. All the fields in the entity are null when the the object hits the deserialization code and hence the exception... But the name is of course initialized when shown in my test case app later. What gives? Seems to me the deserialization is broken. Perhaps this is a bug in JBoss remoting, but since I can only get this with the Entity Manager I posted here. This workaround works fine I think, but something seems terribly broken in either Hibernate or Jboss (remoting?). public boolean equals(Object obj) { if (name == null) return super.equals(obj); if (obj instanceof Team) { Team other = (Team) obj; return other.getName().equals(this.getName()); } return false; } public int hashCode() { if (name == null) return super.hashCode(obj); return name.hashCode(); } Full stack trace of any exception that occurs: javax.ejb.EJBException: java.lang.NullPointerException at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239) Caused by: java.lang.NullPointerException at com.weirdstuff.Player.hashCode(Player.java:83) at java.util.HashMap.hash(HashMap.java:264) at java.util.HashMap.put(HashMap.java:382) at java.util.HashSet.add(HashSet.java:194) at java.util.AbstractCollection.addAll(AbstractCollection.java:318) at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273) at org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183) at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268) at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249) at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853) at org.hibernate.loader.Loader.doQuery(Loader.java:717) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:839) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266) at org.hibernate.type.EntityType.resolve(EntityType.java:303) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842) at org.hibernate.loader.Loader.doQuery(Loader.java:717) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53) at com.weirdstuff.FacadeBean.getPlayers(FacadeBean.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239) at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190) at org.jboss.remoting.Client.invoke(Client.java:525) at org.jboss.remoting.Client.invoke(Client.java:488) at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102) at $Proxy0.getPlayers(Unknown Source) at com.weirdstuff.TestHashCodeClient.testGetPlayer(TestHashCodeClient.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Niko H. (JIRA) <no...@at...> - 2006-06-06 02:42:20
|
Specification of table @Table name with quotes using backticks fails with @OneToMany mapping -------------------------------------------------------------------------------------------- Key: ANN-362 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-362 Project: Hibernate Annotations Type: Bug Versions: 3.2.0.cr1 Environment: Tomcat 5.5 JDK 1.5.0_05-b05 (Win32) PostgreSQL 8.1 Reporter: Niko Horn Priority: Blocker Scenario: Simple one-to-many mapping (1 User has n Roles) User-Class: @Entity() @Table(name = "`Users`") public class User [...] @OneToMany @JoinTable ( name = "UserRoles", joinColumns = { @JoinColumn( name="userId") }, inverseJoinColumns = @JoinColumn( name="roleId") ) private Set<Role> roles; [...] Role-Class: @Entity @Table(name = "`Roles`") public class Role [...] If the User-Table name is given with backticks (for neccessary quotes in PostgreSQL if capitals are used), Tomcat starts with exception org.hibernate.MappingException: Unable to find physical table: Users The problem is in Class org.cfg.hibernate.mappings in the Method getLogicalTableName(). The generated key variable String key = buildTableNameKey( schema, catalog, physicalName ); does not contain the neccessary backticks to determine the value from the tableNameBinding HashMap. A fast fix would be nice :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Stefan N. (JIRA) <no...@at...> - 2006-06-06 02:29:30
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-192?page=comments#action_23261 ] Stefan Norberg commented on EJB-192: ------------------------------------ Client that calls a slsb on the Jboss server: public class TestHashCodeClient extends TestCase { Facade facade = null; public TestHashCodeClient(String name) { super(name); } @Override protected void setUp() throws Exception { super.setUp(); Properties properties = new Properties(); properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces"); properties.put("java.naming.provider.url","localhost:1099"); InitialContext ctx = new InitialContext(properties); facade = (Facade) ctx.lookup( Facade.class.getSimpleName()+ "Bean/remote"); } public void testUpdatePlayer() { Set<Player> players = new HashSet<Player>(); players.add(new Player("Player1")); players.add(new Player("Player2")); players.add(new Player("Player3")); Team t1 = new Team("Team1"); for (Player p : players) { p.setTeam(t1); } t1.setPlayers(players); facade.updateTeam(t1); } public void testGetPlayer() throws Exception { for (Player p : facade.getPlayers()) { System.out.println(p.getFullName()); } } The stateless session bean: public @Stateless class FacadeBean implements Facade { @PersistenceContext EntityManager em; public List<Player> getPlayers() { Query q = em.createQuery("select p from Player p"); return q.getResultList(); } public void updateTeam(Team t) { em.merge(t); } } Two entity classes: Team and Player: @Entity public class Team implements Serializable { private static final long serialVersionUID = 1L; private Long id; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long getId() { return id; } public void setId(Long id) { this.id = id; } /** Optimistic locking */ private Integer version; @Version public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public Team() { } public Team(String name) { setName(name); } private String name; @Basic public String getName() { return name; } public void setName(String name) { this.name = name; } private Set<Player> players = new HashSet<Player>(); @OneToMany(fetch = FetchType.EAGER, mappedBy = "team") @Cascade( { org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN }) public Set<Player> getPlayers() { return players; } public void setPlayers(Set<Player> players) { this.players = players; } public String toString() { return name; } public boolean equals(Object obj) { if (obj instanceof Team) { Team other = (Team) obj; return other.getName().equals(this.getName()); } return false; } public int hashCode() { return name.hashCode(); } } @Entity public class Player implements Serializable { private static final long serialVersionUID = 1L; private Long id; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long getId() { return id; } public void setId(Long id) { this.id = id; } /** Optimistic locking */ private Integer version; @Version public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public Player() { } public Player(String name) { setFullName(name); } private String fullName; public String getFullName() { return fullName; } public void setFullName(String name) { this.fullName = name; } private Team team; @ManyToOne(fetch = FetchType.EAGER) public Team getTeam() { return team; } public void setTeam(Team team) { this.team = team; } public String toString() { return fullName; } public boolean equals(Object obj) { if (obj instanceof Player) { Player other = (Player) obj; return other.getFullName().equals(this.getFullName()); } return false; } public int hashCode() { return fullName.hashCode(); } } > Serialization exception with hashCode() and eager-eager > ------------------------------------------------------- > > Key: EJB-192 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-192 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Environment: JBoss 4.0.4.GA-patch1 and SUN JDK 1.5.0_07 on Windows XP > Reporter: Stefan Norberg > > > I have a problem with some weird stuff going on when I implement the equals()/hashCode() methods in my entites. The short version is that I get a NullPointerException on deserialization on the client side after a remote server request when I am using eager fetching in both Team and Player. If I set the player-> team to lazy it works. > More details are on the Hibernate forum: > http://forum.hibernate.org/viewtopic.php?p=2308640#2308640 > I'm going to post the test case here tomorrow when I get the code from work. > All the fields in the entity are null when the the object hits the deserialization code and hence the exception... But the name is of course initialized when shown in my test case app later. What gives? Seems to me the deserialization is broken. Perhaps this is a bug in JBoss remoting, but since I can only get this with the Entity Manager I posted here. > This workaround works fine I think, but something seems terribly broken in either Hibernate or Jboss (remoting?). > public boolean equals(Object obj) { > if (name == null) return super.equals(obj); > if (obj instanceof Team) { > Team other = (Team) obj; > return other.getName().equals(this.getName()); > } > return false; > } > public int hashCode() { > if (name == null) return super.hashCode(obj); > return name.hashCode(); > } > Full stack trace of any exception that occurs: > javax.ejb.EJBException: java.lang.NullPointerException > at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69) > at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83) > at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225) > at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) > at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681) > at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358) > at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412) > at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239) > Caused by: java.lang.NullPointerException > at com.weirdstuff.Player.hashCode(Player.java:83) > at java.util.HashMap.hash(HashMap.java:264) > at java.util.HashMap.put(HashMap.java:382) > at java.util.HashSet.add(HashSet.java:194) > at java.util.AbstractCollection.addAll(AbstractCollection.java:318) > at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273) > at org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183) > at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268) > at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249) > at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866) > at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853) > at org.hibernate.loader.Loader.doQuery(Loader.java:717) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) > at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) > at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48) > at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42) > at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821) > at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370) > at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351) > at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122) > at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178) > at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86) > at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871) > at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:839) > at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266) > at org.hibernate.type.EntityType.resolve(EntityType.java:303) > at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116) > at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842) > at org.hibernate.loader.Loader.doQuery(Loader.java:717) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) > at org.hibernate.loader.Loader.doList(Loader.java:2145) > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) > at org.hibernate.loader.Loader.list(Loader.java:2024) > at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392) > at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333) > at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53) > at com.weirdstuff.FacadeBean.getPlayers(FacadeBean.java:17) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) > at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) > at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) > at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225) > at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) > at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828) > at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681) > at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358) > at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412) > at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239) > at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190) > at org.jboss.remoting.Client.invoke(Client.java:525) > at org.jboss.remoting.Client.invoke(Client.java:488) > at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65) > at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) > at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102) > at $Proxy0.getPlayers(Unknown Source) > at com.weirdstuff.TestHashCodeClient.testGetPlayer(TestHashCodeClient.java:51) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Peppe (JIRA) <no...@at...> - 2006-06-06 02:29:29
|
Hibernate many-to-one collections vs dropdown --------------------------------------------- Key: HHH-1812 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1812 Project: Hibernate3 Type: Task Versions: 3.0 final Environment: Jboss, Postgres 8.0 Reporter: Peppe Hi, i'm going hell for a problem about hibernate and collections. I have two mapped classes: public class Indirizzi implements java.io.Serializable { private int idIndirizzo; (ID) private DizNazioni dizNazioni; private String indirizzo; .................(other code) } public class DizNazioni implements java.io.Serializable { private String siglanazione; (ID) private String nazione; private Set<Indirizzi> indirizzis = new HashSet<Indirizzi>(0); .................(other code) } and hbm mapping files: <hibernate-mapping> <class name="unibiblio.dati.anagrafica.DAO.Indirizzi" table="indirizzi"> <id name="idIndirizzo" type="int"> <column name="id_indirizzo" /> <generator class="sequence"> <param name="sequence">seq_generica</param> </generator> </id> <many-to-one name="dizNazioni" class="unibiblio.dati.anagrafica.DAO.DizNazioni" fetch="select"> <column name="siglanazione" length="2" not-null="true" /> </many-to-one> <property name="indirizzo" type="string"> <column name="indirizzo" length="40" /> </property> </class> </hibernate-mapping> <hibernate-mapping> <class name="unibiblio.dati.anagrafica.DAO.DizNazioni" table="diz_nazioni"> <id name="siglanazione" type="string"> <column name="siglanazione" length="2" /> <generator class="assigned" /> </id> <property name="nazione" type="string"> <column name="nazione" length="50" not-null="true" /> </property> <set name="indirizzis" inverse="true"> <key> <column name="siglanazione" length="2" not-null="true" /> </key> <one-to-many class="unibiblio.dati.anagrafica.DAO.Indirizzi" /> </set> </class> </hibernate-mapping> Well, I'll have a DizNazioni record associated to 1..n indirizzi, and I can associate a DizNazioni record to an Indirizzi one choosing from lot DizNazioni. I made a form to insert and modify Indirizzi data: edit: Indirizzi.indirizzo dropdown: Indirizzi.DizNazioni When I insert it works but if I try to modify it throw error: identifier of an instance of unibiblio.dati.anagrafica.DAO.DizNazioni was altered from IL to IT It seems to try to change ID for DizNazioni record instead of change reference in Indirizzi record of it. How do I have to work? Where's my mistake? Thanks Peppe Below error details: Full stack trace of any exception that occurs:11:32:17,406 ERROR [SeamExceptionFilter] uncaught exception handled by Seam javax.servlet.ServletException: Error calling action method of component with id _tagId0:_tagId131 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) 11:32:17,406 INFO [SeamExceptionFilter] killing transaction 11:32:17,406 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception javax.faces.FacesException: Error calling action method of component with id _tagId0:_tagId131 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: javax.faces.el.EvaluationException: /editPersone.xhtml @488,126 action="#{personeEditor.update}": org.hibernate.HibernateException: identifier of an instance of unibiblio.dati.anagrafica.DAO.DizNazioni was altered from IL to IT at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) ... 31 more Caused by: org.hibernate.HibernateException: identifier of an instance of unibiblio.dati.anagrafica.DAO.DizNazioni was altered from IL to IT at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:58) at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:157) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:113) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:957) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1529) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at unibiblio.business.anagrafica.BO.PersoneFinder.executeQuery(PersoneFinder.java:114) at unibiblio.business.anagrafica.BO.PersoneFinder.refresh(PersoneFinder.java:143) at unibiblio.business.anagrafica.BO.PersoneFinder$$EnhancerByCGLIB$$95043fe2.CGLIB$refresh$2(<generated>) at unibiblio.business.anagrafica.BO.PersoneFinder$$EnhancerByCGLIB$$95043fe2$$FastClassByCGLIB$$1d69d22d.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167) at org.jboss.seam.interceptors.JavaBeanInterceptor$1.proceed(JavaBeanInterceptor.java:80) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:65) at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:32) at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21) at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:58) at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:58) at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at unibiblio.business.anagrafica.Autenticazione.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:31) at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30) at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:38) at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:41) at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51) at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39) at unibiblio.business.anagrafica.BO.PersoneFinder$$EnhancerByCGLIB$$95043fe2.refresh(<generated>) at unibiblio.business.anagrafica.BO.PersoneEditor.refreshFinder(PersoneEditor.java:282) at unibiblio.business.anagrafica.BO.PersoneEditor.update(PersoneEditor.java:270) at unibiblio.business.anagrafica.BO.PersoneEditor$$EnhancerByCGLIB$$17708f69.CGLIB$update$3(<generated>) at unibiblio.business.anagrafica.BO.PersoneEditor$$EnhancerByCGLIB$$17708f69$$FastClassByCGLIB$$6c7d7296.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167) at org.jboss.seam.interceptors.JavaBeanInterceptor$1.proceed(JavaBeanInterceptor.java:80) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:47) at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:32) at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21) at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:58) at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:58) at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at unibiblio.business.anagrafica.Autenticazione.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:31) at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30) at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:38) at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87) at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60) at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:41) at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51) at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39) at unibiblio.business.anagrafica.BO.PersoneEditor$$EnhancerByCGLIB$$17708f69.update(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.el.parser.AstValue.invoke(AstValue.java:130) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-06-06 02:28:22
|
recursive relationships not supported ------------------------------------- Key: HBX-682 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-682 Project: Hibernate Tools Type: Bug Components: hbm2seam Reporter: Max Rydahl Andersen table category with a parent_id to another category will generate duplicate methods in seam controller code. Does not help to change the name of the association, seam templates seem to take the target entityname instead of the variable name as a root for its variable generation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: zaid s. k. (JIRA) <no...@at...> - 2006-06-06 02:21:42
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-1558?page=comments#action_23264 ] zaid saeedi khan commented on HB-1558: -------------------------------------- Please help. > wrong generation of class alias > ------------------------------- > > Key: HB-1558 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-1558 > Project: Hibernate2 > Type: Bug > Components: core > Versions: 2.1.1 > Environment: hibernate, oracle10g > Reporter: zaid saeedi khan > > > Hi, > I have a table USERROLE as follows: > USERID ROLEID > 1 1 > 1 2 > 2 2 > 2 3 > 2 1 > I want the following SQL query > select ur1.USERID, (select count(ur2.roleid) from userrole ur2 where ur1.userid=ur2.userid) from userrole ur1 > group by userid > output is: > 1 2 > 2 3 > i.e. I simply want to show the number of roles against each user. > Now when I use hibernate, I make use of derived property and specify the subselect in the formula attribute. > I have GroupBy.hgm.xml mapped to USERROLE and GroupBy.java as model which consists of id and count. > I use > Session session = sessionFactory.openSession(); > String query = "from GroupBy gb group by gb.userId"; > List results = session.find(query); > BUT THE PROBLEM IS HIBERNATE DOES NOT ACCEPT gb AS THE TABLE ALIAS RATHER AS SHOWN BELOW IT GENERATES groupby0_ AS THE ALIAS. > Hibernate: select groupby0_.USERID as USERID, (select count(*) from USERROLE ur1 where ur1.userId=groupby0_.userId) as f0_ from USERROLE groupby0_ group by groupby0_.USERID > SO TO PERFORM MY QUERY I HAD TO HARDCODE(VERY BAD) groupby0_ IN THE FORMULA ATTRIBUTE AS FOLLOWS: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> > <hibernate-mapping> > <class name="com.a.test.model.GroupBy" table="USERROLE"> > <id name="userId" column="USERID"> > <generator class="increment"/> > </id> > <property name="count" formula="(select count(*) from USERROLE ur1 where ur1.userId=groupby0_.userId)" /> > </class> > </hibernate-mapping> > Please help me to workaround this problem. > Thanks in advance. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacques M. (JIRA) <no...@at...> - 2006-06-06 02:10:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-26?page=comments#action_23263 ] Jacques Morel commented on HHH-26: ---------------------------------- Is there any resolution on this? We are developing an application that use extensively custom types and we would love to have this. This is the 3rd project that I have had this requirement popup. This time I spent the time to find this request and voted for it ;-) > Default UserType for java classes > --------------------------------- > > Key: HHH-26 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-26 > Project: Hibernate3 > Type: New Feature > Components: core > Versions: 3.0 beta 1 > Reporter: Matthew Inger > Assignee: Michael Gloegl > Priority: Minor > > > It would be nice if the user could automatically assign a particular default UserType when certain java classes are encountered. For example, many shops have special handling for empty strings, since oracle does not allow empty strings, and instead inserts null values. > We, in particular, put a single character string will a null byte (char(0)) into the db field, and when it is read, replace that with the empty string. > In order to do this, we use a UserType, which has to be specified on every nullable string field. What we'd rather do is something like this in hibernate.cfg.xml: > <default-type property-type="java.lang.String" > class="com.synygy.core.hibernate.NullableStringType" /> > Is this possible to be put into the 3.0 release? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Assaf B. (JIRA) <no...@at...> - 2006-06-06 02:09:19
|
2nd level cached collections are locked causing a cache miss ------------------------------------------------------------ Key: HHH-1813 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1813 Project: Hibernate3 Type: Bug Versions: 3.1 Environment: Hibernate 3.1, Oracle 10g, Linux Reporter: Assaf Berg Priority: Critical Attachments: testcase.tar.gz Using the second level cache, collections are fetched from the database due to the cached item being locked. This happens in the most simple use case: 1. Insert an entity with a collection 2. Commit. 3. Fetch the entity I've written a simple test case and see the following in the log file: 11:52:47,159 DEBUG [ReadWriteCache] Invalidating: domain.Cat.kittens#539957 11:52:47,177 DEBUG [ReadWriteCache] Inserting: domain.Cat#539957 11:52:47,179 DEBUG [ReadWriteCache] Inserted: domain.Cat#539957 11:52:47,180 DEBUG [ReadWriteCache] Inserting: domain.Kitten#540214 11:52:47,180 DEBUG [ReadWriteCache] Inserted: domain.Kitten#540214 11:52:47,181 DEBUG [ReadWriteCache] Releasing: domain.Cat.kittens#539957 11:52:49,221 DEBUG [ReadWriteCache] Caching: domain.Cat#539957 11:52:49,221 DEBUG [ReadWriteCache] Item was already cached: domain.Cat#539957 11:52:49,223 DEBUG [ReadWriteCache] Cache lookup: domain.Cat.kittens#539957 11:52:49,223 DEBUG [ReadWriteCache] Cached item was locked: domain.Cat.kittens#539957 11:52:49,229 DEBUG [ReadWriteCache] Caching: domain.Kitten#540214 11:52:49,229 DEBUG [ReadWriteCache] Item was already cached: domain.Kitten#540214 11:52:49,230 DEBUG [ReadWriteCache] Caching: domain.Cat.kittens#539957 11:52:49,231 DEBUG [ReadWriteCache] Cached: domain.Cat.kittens#539957 domain.Cat.kittens [C/H/M/P]: 1/0/1/1 domain.Cat [C/H/M/P]: 1/0/0/1 domain.Kitten [C/H/M/P]: 1/0/0/1 This happens whether the collection is mapped as inverse or not. I've attached the test case source and hbms (although it might need to be tweaked for the proper DB before running, and I didn't include the dependencies JARs). Here's a code excerpt of the interesting part (tx is TransactionTemplate using HibnerateTransactionManager and hibernate is HibernateTemplate from the spring framework): tx.execute(new TransactionCallback() { public Object doInTransaction(TransactionStatus status) { // create a Cat with one Kitten Cat cat = new Cat(); Kitten kitten = new Kitten(); cat.addKitten(kitten); hibernate.save(cat); return null; } }); Thread.sleep(2000L); tx.execute(new TransactionCallback() { public Object doInTransaction(TransactionStatus status) { // load all cats List<Cat> allCats = hibernate.loadAll(Cat.class); return null; } }); I can supply further information if needed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Benjamin Hawkes-L. (JIRA) <no...@at...> - 2006-06-06 02:08:26
|
Make it possible to disable autodiscovery ----------------------------------------- Key: EJB-193 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-193 Project: Hibernate Entity Manager Type: New Feature Versions: 3.2.0.cr1 Reporter: Benjamin Hawkes-Lewis Currently even if hibernate.archive.autodetection is set to an empty string (""), Hibernate still tries to open a zipped EJB packaging. Apparently, it's looking for orm.xml. Given that auto discovery support for Java SE containers is not required by the spec, and therefore may never be complete, it would be good to be able to turn it off. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |