Hibernate version: 3
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)
Name and version of the database:Postgres 8.0
Hi everybody, 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>
and
<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 to an Indirizzi choosing from lot DizNazioni.
I made a form to insert and modify Indirizzi data:
edit: indirizzo
dropdown: 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
|