Hi.
i have next error with lazy connection, but in my map file i don´t use this property, why is this??
this is my map file. Please i need fix this quickly.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class dynamic-insert="false" dynamic-update="false"
mutable="true" name="Comercio.Pedimento.CartaCupo"
optimistic-lock="version" polymorphism="implicit"
select-before-update="false" table="CARTA_CUPO">
<id column="FOLIO" name="Folio">
</id>
<property column="EXPEDICION" name="expedicion" type="date"/>
<property column="VENCIMIENTO" name="vencimiento" type="date"/>
<property column="VALOR_DOLARES" name="valorDolares"/>
<property column="CANCELADO" name="cancelado" type="boolean"/>
<property column="FOLIO_PADRE" name="folioPadre"/>
<property column="ID_CLIENTE" name="id_cliente"/>
<property column="ID_ADUANA" name="idAduanaD"/>
<property column="REGISTRO_ENTRADA_ORIGINAL" name="registroEntradaOriginal"/>
<property column="ID_ADUANA_CIRCUNSCRIPCION" name="idAduanaC"/>
<many-to-one cascade="none" class="Mantenimiento.General.Cliente" column="ID_CLIENTE" insert="false" lazy="false" name="cliente" update="false"/>
<many-to-one class="Comercio.Anexo22.Aduana" insert="false" lazy="false" name="aduanaD" update="false">
<column name="ID_ADUANA"/>
<column name="SECCION"/>
</many-to-one>
<many-to-one class="Comercio.Anexo22.Aduana" insert="false" lazy="false" name="aduanaC" update="false">
<column name="ID_ADUANA_CIRCUNSCRIPCION"/>
<column name="SECCION_CIRCUNSCRIPCION"/>
</many-to-one>
<many-to-one class="Comercio.Catalogo.AgenteAduanal" column="PATENTE" insert="false" lazy="false" name="agenteAduanal" update="false"/>
<many-to-one class="Comercio.Pedimento.BodegaSIDEFI" column="CLAVE_SIDEFI" insert="false" lazy="false" name="bodegaSIDEFI" update="false"/>
<set cascade="none" inverse="false" lazy="false" name="fracciones" order-by="SECUENCIA" table="PARTIDA_CARTA_CUPO">
<key column="FOLIO"/>
<one-to-many class="Comercio.Pedimento.PartidaCartaCupo"/>
</set>
<many-to-one class="Comercio.Catalogo.Apoderado" column="CLAVE_APODERADO" insert="false" lazy="false" name="apoderado" update="true"/>
<property column="OBSERVACIONES" name="observaciones" update="true"/>
</class>
</hibernate-mapping>
and this is the error
Code:
StandardWrapperValve[jsp]: PWC1406: Servlet.service() para el servlet jsp desencadenó una excepción
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
at Comercio.Pedimento.CartaCupo$$EnhancerByCGLIB$$97ae472c.getExpedicion(<generated>)
at ALGOSA.Mantenimiento.Reporteo.CartaCupoReporte.<init>(CartaCupoReporte.java:90)
at org.apache.jsp.Mantenimiento.Comercio.CartaCupo.reportes.CartaCupo_jsp._jspService(CartaCupo_jsp.java from :76)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)