File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Excpeion in creation of hibernate session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Excpeion in creation of hibernate session " Watch "Excpeion in creation of hibernate session " New topic
Author

Excpeion in creation of hibernate session

Priya Gupta
Greenhorn

Joined: Sep 18, 2007
Posts: 5
Hi All,

I am trying a hibernate program.I m using RAD7.0,websphere 6.1,java 1.5, DB2 8.2.

I have included db2 jars, cglib-full-2.0.2.jar,hibernate3.jar,dom4j-1.5.2.jar

I am getting the error message

Exception in thread "main" java.lang.NoSuchMethodError: net/sf/cglib/proxy/Enhancer.setInterceptDuringConstruction(Z)V
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)

i have also tried hibernate-cglib-repack-2.1_3.jar but it is also not working.


hibernate.cfg.file

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.url">jdbc:db2://192.134.1.6:50000/EXP</property>

<property name="hibernate.connection.username">administ</property>
<property name="hibernate.connection.password">tt</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="testuser.hbm.xml"/>
</session-factory>
</hibernate-configuration>


Please suggest me.where i need to change.

Thanks in advance.

Please reply back.

Regards,
Priya
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Excpeion in creation of hibernate session