Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Spring + Hibernate SessionFactory Problem

  1. #11
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    See if you don't have any hb libraries in your classpath - either in tomcat common/lib, shared/lib or inside WEB-INF/lib. Start your application and make sure hibernate is not found.
    After that get the official Hb3 from hibernate.org (or from Spring-w-deps) and place it in shared/lib. Hibernate has some dependecies - you can read them inside the readme.txt.
    From there everything should go smooth.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  2. #12
    Join Date
    Sep 2005
    Location
    uk
    Posts
    8

    Default

    I tried to do the same way. But still getting following error

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'MySessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/Type
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:355)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
    org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:269)
    org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:317)
    org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:134)
    org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:230)
    org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:156)
    org.springframework.web.context.ContextLoaderServl et.init(ContextLoaderServlet.java:81)
    javax.servlet.GenericServlet.init(GenericServlet.j ava:211)
    org.apache.catalina.manager.ManagerServlet.deploy( ManagerServlet.java:922)
    org.apache.catalina.manager.ManagerServlet.deploy( ManagerServlet.java:652)
    org.apache.catalina.manager.ManagerServlet.doPut(M anagerServlet.java:400)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:712)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

  3. #13
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    That's a totally different error - read the message and stop wasting your and other's time:
    Code:
    org/objectweb/asm/Type
    You need the dependecies libraries - in this case asm library for cglib.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  4. #14
    Join Date
    Sep 2005
    Location
    uk
    Posts
    8

    Default

    Sorry costin to bother you, but I have already added asm library for cglib.
    Nways thanx.

Similar Threads

  1. Spring + Hibernate SessionFactory Problem
    By arumugamkasi in forum Container
    Replies: 3
    Last Post: Sep 12th, 2005, 01:41 AM
  2. Replies: 2
    Last Post: Apr 15th, 2005, 07:02 AM
  3. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM
  4. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  5. Replies: 5
    Last Post: Aug 27th, 2004, 07:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •