instance « Seam « JPA Q&A





1. Could not create instance of org.hibernate.ejb.QueryImpl    seamframework.org

Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not create instance of org.hibernate.ejb.QueryImpl - org.hibernate.ejb.QueryImpl at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postActivate(LifecycleInterceptorHandler.java:152) at org.jboss.ejb3.stateful.StatefulContainer.invokePostActivate(StatefulContainer.java:409) at org.jboss.ejb3.stateful.StatefulBeanContext.postActivate(StatefulBeanContext.java:388) at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:316) at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:387) at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375) at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61) 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:110) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) 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:206) at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119) at $Proxy219.getPesquisaTreinamento(Unknown Source) at sun.reflect.GeneratedMethodAccessor364.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) ...

2. Dirty JPA instance    seamframework.org

Hello.I guess this issue has already discused but here it comes:I have a Home component which edits some entity. User click "save" but persist() and update() methods are overriden to check some business validation against the instance, for exaple: @Override public String update() { Depto d = deptoXCodigo(); if (d != null && !d.getDeptoId().equals(instance.getDeptoId())) { facesMessages.addFromResourceBundle(Severity.ERROR, ...

3. Erro org.hibernate.TransientObjectException: The instance w...    seamframework.org

@Entity @Table(name = "cargo") public class Cargo implements java.io.Serializable { private static final long serialVersionUID = 2632056225124288939L; private int codigoCargo; private String nomeCargo; public Cargo() { } public Cargo(int codigoCargo, String nomeCargo) { this.codigoCargo = codigoCargo; this.nomeCargo = nomeCargo; } @Id @Column(name = "codigo_cargo", unique = true, nullable = false) @NotNull public int getCodigoCargo() { return this.codigoCargo; } public void setCodigoCargo(int ...

4. Use of instance of entity without involvement of hibernate?    seamframework.org

Is there a way to declare nonDbAlteredName of type MyName but with it designated to have nothing to do with the database or hibernate. In other words, is there a way to use the fields and methods of MyName for nonDbAlteredName but without it being considered as a database entity? Or do I need to create a non-entity version of MyName ...