org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'sessionFactory' defined in class path resource [databaseSubsystemContext.xml]: Initialization of bean failed; nested exception is net.sf.hibernate.HibernateException: CGLIB Enhancement failed

Samebug tips1

You need to deploy aspectJ (aspectjweaver.jar) together with your application. Add it to your pom.xml

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web19455

  • via Atlassian JIRA by Lars Nielsen, 1 year ago
    Error creating bean with name 'sessionFactory' defined in class path resource [databaseSubsystemContext.xml]: Initialization of bean failed; nested exception is net.sf.hibernate.HibernateException: CGLIB Enhancement failed
  • via Atlassian JIRA by Lars Nielsen, 11 months ago
    Error creating bean with name 'sessionFactory' defined in class path resource [databaseSubsystemContext.xml]: Initialization of bean failed; nested exception is net.sf.hibernate.HibernateException: CGLIB Enhancement failed
  • via Atlassian JIRA by eric, 11 months ago
    Error creating bean with name 'sessionFactory' defined in class path resource [databaseSubsystemContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: null
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [databaseSubsystemContext.xml]: Initialization of bean failed; nested exception is net.sf.hibernate.HibernateException: CGLIB Enhancement failed at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:300)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 6 months ago
    Unknown user
    Once, 9 months ago
    3 times, 9 months ago
    2 times, 11 months ago
    24 times, 1 year ago
    19 more bugmates