Ver Mensaje Individual
  #20 (permalink)  
Antiguo 12/11/2013, 07:26
Avatar de lozanoguido
lozanoguido
 
Fecha de Ingreso: junio-2011
Mensajes: 33
Antigüedad: 13 años, 5 meses
Puntos: 0
Desacuerdo Respuesta: Hibernate - Consulta sobre

Si, después de hacer el save a pedido por medio de debbug me fijo y me autocompleta el valor del id, asi que tranquilamente puedo hacer pedido.getId() para completar el atributo del detalle_pedido, y verifico que al momento de hacer el save de detalle_pedido tenga todos los atributos completos :) peeeeeeeeeeero, aca vuelve el viejo problema :



type Exception report

message Request processing failed; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of local.model.Pedido.codigo

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of local.model.Pedido.codigo
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
javax.servlet.http.HttpServlet.service(HttpServlet .java:723)
root cause

org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of local.model.Pedido.codigo
org.hibernate.property.BasicPropertyAccessor$Basic Getter.get(BasicPropertyAccessor.java:187)
org.hibernate.tuple.entity.AbstractEntityTuplizer. getIdentifier(AbstractEntityTuplizer.java:341)
org.hibernate.persister.entity.AbstractEntityPersi ster.getIdentifier(AbstractEntityPersister.java:43 23)
org.hibernate.persister.entity.AbstractEntityPersi ster.isTransient(AbstractEntityPersister.java:4045 )
org.hibernate.engine.internal.ForeignKeys.isTransi ent(ForeignKeys.java:209)
org.hibernate.engine.internal.ForeignKeys$Nullifie r.isNullifiable(ForeignKeys.java:165)
org.hibernate.engine.internal.ForeignKeys$Nullifie r.access$000(ForeignKeys.java:50)
org.hibernate.engine.internal.ForeignKeys.collectN onNullableTransientEntities(ForeignKeys.java:318)
org.hibernate.engine.internal.ForeignKeys.findNonN ullableTransientEntities(ForeignKeys.java:290)
org.hibernate.action.internal.AbstractEntityInsert Action.findNonNullableTransientEntities(AbstractEn tityInsertAction.java:105)
org.hibernate.engine.spi.ActionQueue.addInsertActi on(ActionQueue.java:180)
org.hibernate.engine.spi.ActionQueue.addAction(Act ionQueue.java:167)
org.hibernate.event.internal.AbstractSaveEventList ener.addInsertAction(AbstractSaveEventListener.jav a:320)
org.hibernate.event.internal.AbstractSaveEventList ener.performSaveOrReplicate(AbstractSaveEventListe ner.java:287)
org.hibernate.event.internal.AbstractSaveEventList ener.performSave(AbstractSaveEventListener.java:19 3)
org.hibernate.event.internal.AbstractSaveEventList ener.saveWithGeneratedId(AbstractSaveEventListener .java:126)
org.hibernate.event.internal.DefaultSaveOrUpdateEv entListener.saveWithGeneratedOrRequestedId(Default SaveOrUpdateEventListener.java:204)
org.hibernate.event.internal.DefaultSaveEventListe ner.saveWithGeneratedOrRequestedId(DefaultSaveEven tListener.java:55)
org.hibernate.event.internal.DefaultSaveOrUpdateEv entListener.entityIsTransient(DefaultSaveOrUpdateE ventListener.java:189)
org.hibernate.event.internal.DefaultSaveEventListe ner.performSaveOrUpdate(DefaultSaveEventListener.j ava:49)
org.hibernate.event.internal.DefaultSaveOrUpdateEv entListener.onSaveOrUpdate(DefaultSaveOrUpdateEven tListener.java:90)
org.hibernate.internal.SessionImpl.fireSave(Sessio nImpl.java:757)
org.hibernate.internal.SessionImpl.save(SessionImp l.java:749)
org.hibernate.internal.SessionImpl.save(SessionImp l.java:745)
local.dao.ProductoFormDao.save(ProductoFormDao.jav a:32)
local.dao.ProductoFormDao$$FastClassByCGLIB$$52749 2f.invoke(<generated>)
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy. java:191)
org.springframework.aop.framework.Cglib2AopProxy$C glibMethodInvocation.invokeJoinpoint(Cglib2AopProx y.java:689)
org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :150)
org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:110)
org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
org.springframework.aop.framework.Cglib2AopProxy$D ynamicAdvisedInterceptor.intercept(Cglib2AopProxy. java:622)
local.dao.ProductoFormDao$$EnhancerByCGLIB$$99dc6e 9c_2.save(<generated>)
local.controller.PedidoController.finishP(PedidoCo ntroller.java:262)
sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:213 )
org.springframework.web.method.support.InvocableHa ndlerMethod.invokeForRequest(InvocableHandlerMetho d.java:126)
org.springframework.web.servlet.mvc.method.annotat ion.ServletInvocableHandlerMethod.invokeAndHandle( ServletInvocableHandlerMethod.java:96)
org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.invokeHandlerMeth od(RequestMappingHandlerAdapter.java:617)
org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.handleInternal(Re questMappingHandlerAdapter.java:578)
org.springframework.web.servlet.mvc.method.Abstrac tHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:80)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
javax.servlet.http.HttpServlet.service(HttpServlet .java:723)