-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: problem with many-to-one SerializableProxy
PostPosted: Wed Mar 05, 2008 6:00 pm 
Newbie

Joined: Wed Mar 05, 2008 2:19 pm
Posts: 2
Hi,

First of all, congratulations for the work you are doing, I think it is excellent.

I’m implementing Hibernate using EJB3 with a persistence unit.

The environment of development we are using is JDeveloper 10.1.3.1

When I want to query an object than is participating in a one-to-many relation, I mean, the object at the many end, I get the following exception:

“java.lang.ClassCastException: cannot assign instance of org.hibernate.proxy.pojo.cglib.SerializableProxy to field penoles.infraestructura.modelo.Configuracion.aplicacion of type penoles.infraestructura.modelo.Aplicacion in instance of penoles.infraestructura.modelo.Configuracion”

Although I have been looking in the forum, I haven’t found exactly the same problem to solve it…

I though it was because of the cglib version, I tried with the 1.2.1, but I get the same Exception.

Could it be because of compatibility with the embedded OC4J Server in JDeveloper??

This are files in my Class Path:
    antlr-2.7.6.jar
    hibernate-annotations.jar
    hibernate-commons.annotations.jar
    hibernate-entitymanager.jar
    hibernate3.jar
    jboss.archive-browsing.jar
    asm.jar
    c3p0-0.9.1-jar
    commons-collections-2.1.1.jar
    commons-logging-1.0.4.jar
    concurrent-1.3.2.jar
    dom4j-1.6.1.jar
    ehcache-1.2.3.jar
    javassist.jar
    log4j-1.2.11.jar
    cglib-2.1.3.jar

I have the next libraries too:
    EJB 3.0
    TopLink Essentials JPA
    Oracle XML parser v2
    JAX RPC Client

What is weirder to me is “cglib” reference in the Exception.

I debug my code, and I found than the exception occurs when the application attribute in my class Configuracion is setted.

I hope you could help to find what I’m doing wrong.

Thnks


Hibernate version: 3.2.5

Mapping documents:

Aplicacion.hbm.xml:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"   
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="penoles.infraestructura.modelo">
  <class name="Aplicacion" table="APLICACION">
    <id name="aplicacionId" type="int" column="APL_ID">
        <generator class="sequence">
            <param name="sequence">APLICACION_APL_ID_SEQ</param>
        </generator>
    </id>
    <property name="aplicacionClave" column="APL_CLAVE"/>
    <property name="aplicacionNombre" column="APL_NOMBRE"/>
    <property name="aplicacionStatus" column="APL_STATUS"/>
    <property name="aplicacionModluloSegridad" column="APL_MOD_SEG"/>       
    <set name="listConfiguraciones" lazy="false" inverse="true">
        <key column="APL_ID"/>
        <one-to-many class="Configuracion"/>
    </set>
  </class>
</hibernate-mapping>


Configuracion.hbm.xml
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"   
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="penoles.infraestructura.modelo">
  <class name="Configuracion" table="CONFIGURACION">
    <id name="configuracionId" type="int" column="CON_ID">
        <generator class="sequence">
            <param name="sequence">CONFIGURACION_CON_ID_SEQ</param>
        </generator>
    </id>
    <property name="configuraciponClave" column="CON_CVE"/>
    <property name="configuracionNombre" column="CON_NOMBRE"/>
    <property name="configuracionDescripcion" column="CON_DESC"/>       
    <many-to-one name="aplicacion" class="Aplicacion" column="APL_ID" not-null="true"/>
    <property name="configuracionStatus" column="CON_STATUS"/>
  </class>
</hibernate-mapping>


Persistence.xml
Code:
<?xml version="1.0" encoding="windows-1252" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
             version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
  <persistence-unit name="InfraestructuraHibernate" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>jdbc/DBConnectionInfraestructuraDS</jta-data-source>
    <properties>
        <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManagerLookup"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" />
        <property name="hibernate.show_sql" value="true" />
        <property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/>
    </properties>
  </persistence-unit>
</persistence>



orion-application.xml
Code:
<?xml version = '1.0' encoding = 'windows-1252'?>
<orion-application  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd"
                   default-data-source="jdbc/DBConnectionInfraestructuraDS">
    <imported-shared-libraries>
        <remove-inherited name="oracle.toplink"/>
        <import-shared-library name="hibernate" max-version="3.2"/>
    </imported-shared-libraries>
</orion-application>


Code between sessionFactory.openSession() and session.close():

Tihs my method in my SessionFacadeBean
Code:
List<Configuracion> listaConfig= new ArrayList<Configuracion>();
    public List<Configuracion> findAllConfByAppConfId(Aplicacion app) {
        try{
            List<Configuracion> listaConfig= new ArrayList<Configuracion>();
            Query q=em.createQuery("select configs from Aplicacion as app left join app.listConfiguraciones as configs where app.aplicacionId=?");
            q.setParameter(1,app.getAplicacionId());
            listaConfig =q.getResultList();
            return listaConfig;
        }catch(Exception e){
            new ManejadorErroresException("System","System",false);
            return null;
        }
    }

Full stack trace of any exception that occurs:

java.lang.ClassCastException: cannot assign instance of org.hibernate.proxy.pojo.cglib.SerializableProxy to field penoles.infraestructura.modelo.Configuracion.aplicacion of type penoles.infraestructura.modelo.Aplicacion in instance of penoles.infraestructura.modelo.Configuracion
08/03/05 21:14:04 at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1977)
08/03/05 21:14:04 at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1157)
08/03/05 21:14:04 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1918)
08/03/05 21:14:04 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
08/03/05 21:14:04 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
08/03/05 21:14:04 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
08/03/05 21:14:04 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.cloneSerialize(EJBUtils.java:534)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.unprivileged_cloneObject(EJBUtils.java:517)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.cloneObject(EJBUtils.java:422)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(EJBUtils.java:552)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.cloneArrayList(EJBUtils.java:717)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.unprivileged_cloneObject(EJBUtils.java:491)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.cloneObject(EJBUtils.java:422)
08/03/05 21:14:04 at com.evermind.server.ejb.EJBUtils.cloneLocalObject(EJBUtils.java:726)
08/03/05 21:14:04 at com.evermind.server.ejb.AbstractEJBObject.OC4J_cloneParameter(AbstractEJBObject.java:380)
08/03/05 21:14:04 at InfraestructuraSessionFacade_RemoteProxy_32ihog7.findAllConfByAppConfId(Unknown Source)
08/03/05 21:14:04 at penoles.infraestructura.negocio.delegados.AplicacionesDelegado.getListConfiguraciones(AplicacionesDelegado.java:169)
08/03/05 21:14:04 at penoles.infraestructura.vistacontrolador.backing.core.BackingConfiguraciones.getListaConfiguraciones(BackingConfiguraciones.java:247)
08/03/05 21:14:04 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08/03/05 21:14:04 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
08/03/05 21:14:04 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08/03/05 21:14:04 at java.lang.reflect.Method.invoke(Method.java:585)
08/03/05 21:14:04 at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
08/03/05 21:14:04 at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
08/03/05 21:14:04 at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
08/03/05 21:14:04 at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
08/03/05 21:14:04 at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
08/03/05 21:14:04 at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
08/03/05 21:14:04 at javax.faces.component.UIData.getValue(UIData.java:547)
08/03/05 21:14:04 at javax.faces.component.UIData.getDataModel(UIData.java:876)
08/03/05 21:14:04 at javax.faces.component.UIData.setRowIndex(UIData.java:399)
08/03/05 21:14:04 at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:85)
08/03/05 21:14:04 at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:703)
08/03/05 21:14:04 at javax.faces.component.UIData.encodeBegin(UIData.java:701)
08/03/05 21:14:04 at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:463)
08/03/05 21:14:04 at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:253)
08/03/05 21:14:04 at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
08/03/05 21:14:04 at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:629)
08/03/05 21:14:04 at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:566)
08/03/05 21:14:04 at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
08/03/05 21:14:04 at _core._Configuraciones_jspx._jspService(_Configuraciones_jspx.java:686)
08/03/05 21:14:04 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
08/03/05 21:14:04 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
08/03/05 21:14:04 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
08/03/05 21:14:04 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
08/03/05 21:14:04 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
08/03/05 21:14:04 at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
08/03/05 21:14:04 at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
08/03/05 21:14:04 at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
08/03/05 21:14:04 at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
08/03/05 21:14:04 at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
08/03/05 21:14:04 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
08/03/05 21:14:04 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
08/03/05 21:14:04 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
08/03/05 21:14:04 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
08/03/05 21:14:04 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
08/03/05 21:14:04 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
08/03/05 21:14:04 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
08/03/05 21:14:04 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
08/03/05 21:14:04 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
08/03/05 21:14:04 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
08/03/05 21:14:04 at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
08/03/05 21:14:04 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
08/03/05 21:14:04 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
08/03/05 21:14:04 at java.lang.Thread.run(Thread.java:595)

Name and version of the database you are using:

Oracle 10g XE

The generated SQL (show_sql=true):

InfraestructuraSessionFacadeBean.java.
08/03/05 21:13:52 Hibernate:
select
listconfig1_.CON_ID as CON1_1_,
listconfig1_.CON_CVE as CON2_1_,
listconfig1_.CON_NOMBRE as CON3_1_,
listconfig1_.CON_DESC as CON4_1_,
listconfig1_.APL_ID as APL5_1_,
listconfig1_.CON_STATUS as CON6_1_
from
APLICACION aplicacion0_
left outer join
CONFIGURACION listconfig1_
on aplicacion0_.APL_ID=listconfig1_.APL_ID
where
(
aplicacion0_.APL_ID=?
)


Debug level Hibernate log excerpt:

22:27:10,718 DEBUG SessionImpl:220 - opened session at timestamp: 12047560307
22:27:10,718 DEBUG JDBCContext:160 - TransactionFactory reported no active transaction; Synchronization not registered
22:27:10,718 DEBUG AbstractEntityManagerImpl:451 - Looking for a JTA transaction to join
22:27:10,718 DEBUG JDBCContext:172 - successfully registered Synchronization
22:27:10,734 DEBUG AbstractEntityManagerImpl:481 - Adding flush() and close() synchronization
22:27:10,734 DEBUG AbstractEntityManagerImpl:451 - Looking for a JTA transaction to join
22:27:10,734 DEBUG AbstractEntityManagerImpl:459 - Transaction already joined
22:27:10,734 DEBUG QueryPlanCache:70 - unable to locate HQL query plan in cache; generating (select configs from Aplicacion as app left join app.listConfiguraciones as configs where app.aplicacionId=?)
22:27:10,734 DEBUG QueryTranslatorImpl:214 - compiling query
22:27:10,796 DEBUG HQLQueryPlan:269 - HQL param location recognition took 0 mills (select configs from Aplicacion as app left join app.listConfiguraciones as configs where app.aplicacionId=?)
22:27:10,843 DEBUG QueryPlanCache:76 - located HQL query plan in cache (select configs from Aplicacion as app left join app.listConfiguraciones as configs where app.aplicacionId=?)
22:27:10,843 DEBUG HQLQueryPlan:150 - find: select configs from Aplicacion as app left join app.listConfiguraciones as configs where app.aplicacionId=?
22:27:10,843 DEBUG QueryParameters:271 - parameters: [2]
22:27:10,843 DEBUG QueryParameters:277 - named parameters: {}
22:27:10,843 DEBUG QueryTranslatorImpl:284 - HQL: select configs from penoles.infraestructura.modelo.Aplicacion as app left join app.listConfiguraciones as configs where app.aplicacionId=?
22:27:10,843 DEBUG QueryTranslatorImpl:285 - SQL: select listconfig1_.CON_ID as CON1_1_, listconfig1_.CON_CVE as CON2_1_, listconfig1_.CON_NOMBRE as CON3_1_, listconfig1_.CON_DESC as CON4_1_, listconfig1_.APL_ID as APL5_1_, listconfig1_.CON_STATUS as CON6_1_ from APLICACION aplicacion0_ left outer join CONFIGURACION listconfig1_ on aplicacion0_.APL_ID=listconfig1_.APL_ID where (aplicacion0_.APL_ID=? )
22:27:10,843 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
22:27:10,843 DEBUG ConnectionManager:421 - opening JDBC connection
22:27:10,843 DEBUG SQL:401 -
select
listconfig1_.CON_ID as CON1_1_,
listconfig1_.CON_CVE as CON2_1_,
listconfig1_.CON_NOMBRE as CON3_1_,
listconfig1_.CON_DESC as CON4_1_,
listconfig1_.APL_ID as APL5_1_,
listconfig1_.CON_STATUS as CON6_1_
from
APLICACION aplicacion0_
left outer join
CONFIGURACION listconfig1_
on aplicacion0_.APL_ID=listconfig1_.APL_ID
where
(
aplicacion0_.APL_ID=?
)
22:27:10,859 DEBUG AbstractBatcher:484 - preparing statement
22:27:10,859 DEBUG IntegerType:133 - binding '2' to parameter: 1
22:27:10,859 DEBUG AbstractBatcher:382 - about to open ResultSet (open ResultSets: 0, globally: 0)
22:27:10,859 DEBUG Loader:694 - processing result set
22:27:10,859 DEBUG Loader:699 - result set row: 0
22:27:10,859 DEBUG IntegerType:172 - returning '9' as column: CON1_1_
22:27:10,875 DEBUG Loader:1173 - result row: EntityKey[penoles.infraestructura.modelo.Configuracion#9]
22:27:10,875 DEBUG Loader:1355 - Initializing object from ResultSet: [penoles.infraestructura.modelo.Configuracion#9]
22:27:10,875 DEBUG AbstractEntityPersister:2031 - Hydrating entity: [penoles.infraestructura.modelo.Configuracion#9]
22:27:10,875 DEBUG StringType:172 - returning '123' as column: CON2_1_
22:27:10,875 DEBUG StringType:172 - returning '123' as column: CON3_1_
22:27:10,875 DEBUG StringType:172 - returning '123' as column: CON4_1_
22:27:10,875 DEBUG IntegerType:172 - returning '2' as column: APL5_1_
22:27:10,875 DEBUG IntegerType:172 - returning '1' as column: CON6_1_
22:27:10,875 DEBUG Loader:699 - result set row: 1
22:27:10,890 DEBUG IntegerType:172 - returning '10' as column: CON1_1_
22:27:10,890 DEBUG Loader:1173 - result row: EntityKey[penoles.infraestructura.modelo.Configuracion#10]
22:27:10,890 DEBUG Loader:1355 - Initializing object from ResultSet: [penoles.infraestructura.modelo.Configuracion#10]
22:27:10,890 DEBUG AbstractEntityPersister:2031 - Hydrating entity: [penoles.infraestructura.modelo.Configuracion#10]
22:27:10,890 DEBUG StringType:172 - returning 'asas' as column: CON2_1_
22:27:10,890 DEBUG StringType:172 - returning 'asas' as column: CON3_1_
22:27:10,890 DEBUG StringType:172 - returning 'asas' as column: CON4_1_
22:27:10,890 DEBUG IntegerType:172 - returning '2' as column: APL5_1_
22:27:10,906 DEBUG IntegerType:172 - returning '1' as column: CON6_1_
22:27:10,906 DEBUG Loader:699 - result set row: 2
22:27:10,906 DEBUG IntegerType:172 - returning '11' as column: CON1_1_
22:27:10,906 DEBUG Loader:1173 - result row: EntityKey[penoles.infraestructura.modelo.Configuracion#11]
22:27:10,906 DEBUG Loader:1355 - Initializing object from ResultSet: [penoles.infraestructura.modelo.Configuracion#11]
22:27:10,906 DEBUG AbstractEntityPersister:2031 - Hydrating entity: [penoles.infraestructura.modelo.Configuracion#11]
22:27:10,906 DEBUG StringType:172 - returning 'df' as column: CON2_1_
22:27:10,906 DEBUG StringType:172 - returning 'df' as column: CON3_1_
22:27:10,906 DEBUG StringType:172 - returning 'df' as column: CON4_1_
22:27:10,906 DEBUG IntegerType:172 - returning '2' as column: APL5_1_
22:27:10,906 DEBUG IntegerType:172 - returning '1' as column: CON6_1_
22:27:10,921 DEBUG Loader:721 - done processing result set (3 rows)
22:27:10,921 DEBUG AbstractBatcher:389 - about to close ResultSet (open ResultSets: 1, globally: 1)
22:27:10,921 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
22:27:10,921 DEBUG AbstractBatcher:533 - closing statement
22:27:10,921 DEBUG ConnectionManager:404 - aggressively releasing JDBC connection
22:27:10,921 DEBUG ConnectionManager:441 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
22:27:10,921 DEBUG Loader:851 - total objects hydrated: 3
22:27:10,921 DEBUG TwoPhaseLoad:107 - resolving associations for [penoles.infraestructura.modelo.Configuracion#9]
22:27:10,921 DEBUG DefaultLoadEventListener:171 - loading entity: [penoles.infraestructura.modelo.Aplicacion#2]
22:27:10,921 DEBUG DefaultLoadEventListener:255 - creating new proxy for entity
22:27:10,953 DEBUG TwoPhaseLoad:206 - done materializing entity [penoles.infraestructura.modelo.Configuracion#9]
22:27:10,953 DEBUG TwoPhaseLoad:107 - resolving associations for [penoles.infraestructura.modelo.Configuracion#10]
22:27:10,968 DEBUG DefaultLoadEventListener:171 - loading entity: [penoles.infraestructura.modelo.Aplicacion#2]
22:27:10,968 DEBUG DefaultLoadEventListener:214 - entity proxy found in session cache
22:27:10,968 DEBUG TwoPhaseLoad:206 - done materializing entity [penoles.infraestructura.modelo.Configuracion#10]
22:27:10,968 DEBUG TwoPhaseLoad:107 - resolving associations for [penoles.infraestructura.modelo.Configuracion#11]
22:27:10,968 DEBUG DefaultLoadEventListener:171 - loading entity: [penoles.infraestructura.modelo.Aplicacion#2]
22:27:10,968 DEBUG DefaultLoadEventListener:214 - entity proxy found in session cache
22:27:10,968 DEBUG TwoPhaseLoad:206 - done materializing entity [penoles.infraestructura.modelo.Configuracion#11]
22:27:10,968 DEBUG StatefulPersistenceContext:790 - initializing non-lazy collections
22:27:10,968 DEBUG CacheSynchronization:40 - transaction before completion callback
22:27:10,984 DEBUG JDBCContext:201 - before transaction completion
22:27:10,984 DEBUG SessionImpl:393 - before transaction completion
22:27:10,984 DEBUG AbstractEntityManagerImpl:515 - automatically flushing session
22:27:10,984 DEBUG SessionImpl:337 - automatically flushing session
22:27:10,984 DEBUG AbstractFlushingEventListener:58 - flushing session
22:27:10,984 DEBUG AbstractFlushingEventListener:111 - processing flush-time cascades
22:27:10,984 DEBUG Cascade:115 - processing cascade ACTION_PERSIST_ON_FLUSH for: penoles.infraestructura.modelo.Configuracion
22:27:10,984 DEBUG Cascade:150 - done processing cascade ACTION_PERSIST_ON_FLUSH for: penoles.infraestructura.modelo.Configuracion
22:27:10,984 DEBUG Cascade:115 - processing cascade ACTION_PERSIST_ON_FLUSH for: penoles.infraestructura.modelo.Configuracion
22:27:10,984 DEBUG Cascade:150 - done processing cascade ACTION_PERSIST_ON_FLUSH for: penoles.infraestructura.modelo.Configuracion
22:27:10,984 DEBUG Cascade:115 - processing cascade ACTION_PERSIST_ON_FLUSH for: penoles.infraestructura.modelo.Configuracion
22:27:10,984 DEBUG Cascade:150 - done processing cascade ACTION_PERSIST_ON_FLUSH for: penoles.infraestructura.modelo.Configuracion
22:27:11,000 DEBUG AbstractFlushingEventListener:154 - dirty checking collections
22:27:11,000 DEBUG AbstractFlushingEventListener:171 - Flushing entities and processing referenced collections
22:27:11,000 DEBUG AbstractFlushingEventListener:210 - Processing unreferenced collections
22:27:11,000 DEBUG AbstractFlushingEventListener:224 - Scheduling collection removes/(re)creates/updates
22:27:11,000 DEBUG AbstractFlushingEventListener:85 - Flushed: 0 insertions, 0 updates, 0 deletions to 3 objects
22:27:11,000 DEBUG AbstractFlushingEventListener:91 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
22:27:11,000 DEBUG Printer:83 - listing entities:
22:27:11,000 DEBUG Printer:90 - penoles.infraestructura.modelo.Configuracion{configuracionStatus=1, aplicacion=penoles.infraestructura.modelo.Aplicacion#2, configuracionNombre=df, configuraciponClave=df, configuracionDescripcion=df, configuracionId=11}
22:27:11,000 DEBUG Printer:90 - penoles.infraestructura.modelo.Configuracion{configuracionStatus=1, aplicacion=penoles.infraestructura.modelo.Aplicacion#2, configuracionNombre=asas, configuraciponClave=asas, configuracionDescripcion=asas, configuracionId=10}
22:27:11,000 DEBUG Printer:90 - penoles.infraestructura.modelo.Configuracion{configuracionStatus=1, aplicacion=penoles.infraestructura.modelo.Aplicacion#2, configuracionNombre=123, configuraciponClave=123, configuracionDescripcion=123, configuracionId=9}
22:27:11,000 DEBUG AbstractFlushingEventListener:290 - executing flush
22:27:11,000 DEBUG ConnectionManager:469 - registering flush begin
22:27:11,000 DEBUG ConnectionManager:478 - registering flush end
22:27:11,000 DEBUG ConnectionManager:404 - aggressively releasing JDBC connection
22:27:11,015 DEBUG AbstractFlushingEventListener:321 - post flush
22:27:11,015 DEBUG CacheSynchronization:82 - transaction after completion callback, status: 3
22:27:11,015 DEBUG JDBCContext:215 - after transaction completion
22:27:11,015 DEBUG SessionImpl:422 - after transaction completion
22:27:11,015 DEBUG JDBCContext:160 - TransactionFactory reported no active transaction; Synchronization not registered
22:27:11,015 DEBUG JDBCContext:160 - TransactionFactory reported no active transaction; Synchronization not registered
22:27:11,015 DEBUG SessionImpl:273 - closing session


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Top
 Profile  
 
 Post subject: I solve it
PostPosted: Thu Mar 06, 2008 11:55 am 
Newbie

Joined: Wed Mar 05, 2008 2:19 pm
Posts: 2
Ey guys...

I found the problem...

Ichanged the red line in mt mapping file...



Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"   
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="penoles.infraestructura.modelo">
  <class name="Configuracion" table="CONFIGURACION">
    <id name="configuracionId" type="int" column="CON_ID">
        <generator class="sequence">
            <param name="sequence">CONFIGURACION_CON_ID_SEQ</param>
        </generator>
    </id>
    <property name="configuraciponClave" column="CON_CVE"/>
    <property name="configuracionNombre" column="CON_NOMBRE"/>
    <property name="configuracionDescripcion" column="CON_DESC"/>       
    [color=red]<many-to-one name="aplicacion" class="Aplicacion" column="APL_ID" lazy="false"/>[/color]
    <property name="configuracionStatus" column="CON_STATUS"/>
  </class>
</hibernate-mapping>


Thnks...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.