[JBoss Seam] - Re: org.hibernate.exception.DataException: could not initial
by ernest210
I forget ERROR:
| 21:57:30,781 INFO [IntegerType] could not bind value '1' to parameter: 1; Type Conversion not supported
| 21:57:30,796 WARN [JDBCExceptionReporter] SQL Error: -95, SQLState: 22003
| 21:57:30,796 ERROR [JDBCExceptionReporter] Type Conversion not supported
| 21:57:30,812 INFO [ExceptionInterceptor] no exceptions.xml file found
| 21:57:30,812 ERROR [ExceptionInterceptor] redirecting to debug page
| javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not initialize a collection: [pl.test.client.Client.books#1]
| 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.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| 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.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy96.delete(Unknown Source)
| at pl.test.client.ClientManager$$FastClassByCGLIB$$3c4a4ac9.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| at pl.test.client.ClientManager$$EnhancerByCGLIB$$16851c17.delete(<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 org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:59)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:71)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at javax.faces.component.UIData.broadcast(UIData.java:513)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| 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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| 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.persistence.PersistenceException: org.hibernate.exception.DataException: could not initialize a collection: [pl.test.client.Client.books#1]
| at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:641)
| at org.hibernate.ejb.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:251)
| at org.jboss.ejb3.entity.ExtendedEntityManager.remove(ExtendedEntityManager.java:114)
| at pl.test.client.ClientManagerBean.delete(ClientManagerBean.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 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.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 org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.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 org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
| 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.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| 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.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
| 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)
| ... 77 more
| Caused by: org.hibernate.exception.DataException: could not initialize a collection: [pl.test.client.Client.books#1]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.loader.Loader.loadCollection(Loader.java:1925)
| at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
| at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
| at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
| at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
| at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
| at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
| at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:201)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:193)
| at org.hibernate.engine.CascadingAction.getAllElementsIterator(CascadingAction.java:415)
| at org.hibernate.engine.CascadingAction.access$100(CascadingAction.java:27)
| at org.hibernate.engine.CascadingAction$2.getCascadableChildrenIterator(CascadingAction.java:125)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:294)
| at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
| at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:272)
| at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:220)
| at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:128)
| at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:49)
| at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:766)
| at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:744)
| at org.hibernate.ejb.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:245)
| ... 137 more
| Caused by: java.sql.SQLException: Type Conversion not supported
| at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setParameter(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setLongParameter(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setIntParameter(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setInt(Unknown Source)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setInt(WrappedPreparedStatement.java:117)
| at org.hibernate.type.IntegerType.set(IntegerType.java:41)
| at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:83)
| at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:65)
| at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1513)
| at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1575)
| at org.hibernate.loader.Loader.doQuery(Loader.java:661)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| at org.hibernate.loader.Loader.loadCollection(Loader.java:1918)
| ... 161 more
| 21:57:30,875 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
| javax.faces.FacesException: Error calling action method of component with id _idJsp0:_idJsp1:0:_idJsp9
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at javax.faces.component.UIData.broadcast(UIData.java:513)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| 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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| 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: Exception while invoking expression #{clientManager.delete}
| at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:59)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:71)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| ... 26 more
| Caused by: javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not initialize a collection: [pl.test.client.Client.books#1]
| 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.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| 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.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy96.delete(Unknown Source)
| at pl.test.client.ClientManager$$FastClassByCGLIB$$3c4a4ac9.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| at pl.test.client.ClientManager$$EnhancerByCGLIB$$16851c17.delete(<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 org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
| ... 29 more
| Caused by: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not initialize a collection: [pl.test.client.Client.books#1]
| at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:641)
| at org.hibernate.ejb.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:251)
| at org.jboss.ejb3.entity.ExtendedEntityManager.remove(ExtendedEntityManager.java:114)
| at pl.test.client.ClientManagerBean.delete(ClientManagerBean.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 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.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 org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.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 org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
| 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.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| 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.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
| 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)
| ... 77 more
| Caused by: org.hibernate.exception.DataException: could not initialize a collection: [pl.test.client.Client.books#1]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.loader.Loader.loadCollection(Loader.java:1925)
| at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
| at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
| at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
| at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
| at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
| at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
| at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:201)
| at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:193)
| at org.hibernate.engine.CascadingAction.getAllElementsIterator(CascadingAction.java:415)
| at org.hibernate.engine.CascadingAction.access$100(CascadingAction.java:27)
| at org.hibernate.engine.CascadingAction$2.getCascadableChildrenIterator(CascadingAction.java:125)
| at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:294)
| at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
| at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
| at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
| at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:272)
| at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:220)
| at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:128)
| at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:49)
| at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:766)
| at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:744)
| at org.hibernate.ejb.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:245)
| ... 137 more
| Caused by: java.sql.SQLException: Type Conversion not supported
| at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setParameter(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setLongParameter(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setIntParameter(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.setInt(Unknown Source)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setInt(WrappedPreparedStatement.java:117)
| at org.hibernate.type.IntegerType.set(IntegerType.java:41)
| at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:83)
| at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:65)
| at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1513)
| at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1575)
| at org.hibernate.loader.Loader.doQuery(Loader.java:661)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| at org.hibernate.loader.Loader.loadCollection(Loader.java:1918)
| ... 161 more
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005487#4005487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005487
19 years, 3 months
[JNDI/Naming/Network] - < Environment> entry in Tomcat's context file
by BrianR
I'm reposting this, since the first post doesn't even display the Topic title correctly (the use of the greater-than and less-than symbols)....
I'm looking into the possibility of migrating our web applications from standalone Tomcat to JBoss AS. One difference I seem to have encountered arises from an error related to the lookup of values we had defined in entries in our web application contexts... when the WAR file is deployed in JBoss, our servlets can't seem to locate those entries.
The context files included something along the lines of:
<Environment name="importantList" value="1,2,3" type="java.lang.String />
Then, in a servlet that is loaded upon startup of the application, we read in this variable to initialize some important information in the web application that needs to be different between our development, QA, and production environments:
Context ctx = new InitialContext();
Context envCtx = (Context) ctx.lookup("java:comp/env");
String importantList = (String) envCtx.lookup("importantList");
How is something similar to this accomplished with JBoss? In which file would the variable need to be defined? I'd prefer to keep this outside of the WAR file, if possible, as we are able to do in standalone Tomcat. Doing so greatly simplifies our process of moving from Development to QA to Production, as we're able to simply copy the WAR file to the appropriate server as it is approved at each stage of testing, without changing any of the files internal to the WAR.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005486#4005486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005486
19 years, 3 months
[JBoss Seam] - org.hibernate.exception.DataException: could not initialize
by ernest210
My problem.
I have two class Client and Book with relations OneToMany set on cascade "REMOVE".
Now I must change scope "SESSION" on "CONVERSATION".
Now (after the change) when i execute delete method on Client i have error. When scope is set on SESSION everything is ok but when is set on CONVERSATION then I have error. Why? PLEASE HELP!
How it looks:
Client CLASS
| package pl.test.client;
|
| import java.io.Serializable;
| import java.util.HashSet;
| import java.util.Set;
|
| import javax.persistence.CascadeType;
| import javax.persistence.Entity;
| import javax.persistence.GeneratedValue;
| import javax.persistence.Id;
| import javax.persistence.OneToMany;
| import javax.persistence.Table;
|
| import org.jboss.seam.annotations.Name;
|
| @Entity
| @Name("client")
| @Table(name="clients")
| public class Client implements Serializable {
|
| /**
| *
| */
| private static final long serialVersionUID = -3074021688217036261L;
|
| private int id;
| private String name;
| private Set<Investment> books = new HashSet<Investment>();
|
| @Id @GeneratedValue
| public int getId() {
| return id;
| }
| public void setId(int id) {
| this.id = id;
| }
| @OneToMany(cascade=CascadeType.REMOVE, mappedBy="client")
| public Set<Investment> getBooks() {
| return books;
| }
| public void setBooks(Set<Investment> books) {
| this.books = books;
| }
| public String getName() {
| return name;
| }
| public void setName(String name) {
| this.name = name;
| }
| }
|
Book CLASS
| package pl.test.client;
|
| import java.io.Serializable;
|
| import javax.persistence.Entity;
| import javax.persistence.GeneratedValue;
| import javax.persistence.Id;
| import javax.persistence.JoinColumn;
| import javax.persistence.Table;
|
| import org.jboss.seam.annotations.Name;
|
| @Entity
| @Name("book")
| @Table(name="books")
| public class Book implements Serializable{
|
| /**
| *
| */
| private static final long serialVersionUID = 1624659788044987338L;
|
| private int id;
| private String bookname;
| private Client client;
|
| @JoinColumn(name="books")
| public String getBookname() {
| return bookname;
| }
| public void setBookname(String bookname) {
| this.bookname = bookname;
| }
| public Client getClient() {
| return client;
| }
| public void setClient(Client client) {
| this.client = client;
| }
| @Id
| @GeneratedValue
| public int getId() {
| return id;
| }
| public void setId(int id) {
| this.id = id;
| }
| }
|
And MANAGER who i execute
| package pl.test.client;
|
| import static javax.persistence.PersistenceContextType.EXTENDED;
|
| import java.io.Serializable;
| import java.util.List;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import org.jboss.seam.annotations.Begin;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.End;
| import org.jboss.seam.annotations.Factory;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Out;
| import org.jboss.seam.annotations.datamodel.DataModel;
| import org.jboss.seam.log.Log;
|
| @Stateful
| @Name("clientManager")
| public class ClientManagerBean implements Serializable, ClientManager{
|
| /**
| *
| */
| private static final long serialVersionUID = 6887290828466517147L;
|
| @DataModel
| private List<Client> clientsList;
|
| @In(required = false)
| @Out(required = false)
| private Client client;
|
| @PersistenceContext(type=EXTENDED)
| private EntityManager em;
|
| public void delete() {
| if (client!=null){
| client = em.merge(client);
| clientsList.remove(client);
| em.remove(client);
| client=null;
| }
| }
| @Factory("clientsList")
| public void findClients() {
| clientsList = em.createQuery("from Client cli").getResultList();
| }
| @Remove
| @Destroy
| public void destroy() {
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005485#4005485
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005485
19 years, 3 months
[Security & JAAS/JBoss] - Re: JBoss4.0 and JAAS/Login-config.xml
by eschulma
As usual, after banging my head so long that I finally decide to post, the solution comes shortly afterward.
The main problem appears to have been that I had commented out some lines in the Tomcat SAR server.xml that refer to JAAS when JBoss was first installed, over 6 months ago. Not sure *why* I did that to begin with, but reverting back basically solved the problem, at least with respect to the web side of things.
It looks as though the security domain is first loaded into JNDI when an attempt is made to access the restricted web pages.
However, it still does not work for EJBs -- if I refer to the security domain in jboss.xml, the EJB deployments fail with the message "Unable to find security domain." Presumably though this is a dependency issue, and will be easier to solve (I hope).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005483#4005483
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005483
19 years, 3 months
[JNDI/Naming/Network] - <Environment> entry in Tomcat's context file.
by BrianR
I'm looking into the possibility of migrating our web applications from standalone Tomcat to JBoss AS. One difference I seem to have encountered arises from an error related to the lookup of values we had defined in entries in our web application contexts... when the WAR file is deployed in JBoss, our servlets can't seem to locate those entries.
The context files included something along the lines of:
Then, in a servlet that is loaded upon startup of the application, we read in this variable to initialize some important information in the web application that needs to be different between our development, QA, and production environments:
Context ctx = new InitialContext();
Context envCtx = (Context) ctx.lookup("java:comp/env");
String importantList = (String) envCtx.lookup("importantList");
How is something similar to this accomplished with JBoss? In which file would the variable need to be defined? I'd prefer to keep this outside of the WAR file, if possible, as we are able to do in standalone Tomcat. Doing so greatly simplifies our process of moving from Development to QA to Production, as we're able to simply copy the WAR file to the appropriate server as it is approved at each stage of testing, without changing any of the internal settings.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005476#4005476
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005476
19 years, 3 months