0 Replies Latest reply on Jun 12, 2005 4:59 PM by drapierwimATgmailDOTcom

    Hibernate lazy instantiation problem

    drapierwimATgmailDOTcom Newbie

      Can somebody help me I'm having a

      net.sf.hibernate.LazyInitializationException: Hibernate lazy instantiation problem


      Since my junit tests doesnt fail. I think that the answer of my problem lies with the J2ee container.

      I'm using JBoss 4sp1, Hibernate 2.1 and xdoclet1.2.2 and a MySql DB, below is my msql-ds.xml

      <?xml version="1.0" encoding="UTF-8"?>
      
      <datasources>
       <local-tx-datasource>
       <jndi-name>MySqlDS</jndi-name>
       <connection-url>jdbc:mysql://server:3306/les</connection-url>
       <driver-class>com.mysql.jdbc.Driver</driver-class>
       <user-name>root</user-name>
       <password>root</password>
       <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
       <track-statements>false</track-statements>
       <min-pool-size>10</min-pool-size>
       <max-pool-size>30</max-pool-size>
       <blocking-timeout-millis>10000</blocking-timeout-millis>
       <idle-timeout-minutes>15</idle-timeout-minutes>
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
       <check-valid-connection-sql>select LAST_INSERT_ID()</check-valid-connection-sql>
       <metadata>
       <type-mapping>mySQL</type-mapping>
       </metadata>
       </local-tx-datasource>
      </datasources>
      


      Thanks and sorry for my the poor english ;-)