Announcement Announcement Module
Collapse
No announcement yet.
java.lang.NoSuchMethodError: org.hibernate.cfg.ExtendedMappings.getReflectionMa nager( Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.NoSuchMethodError: org.hibernate.cfg.ExtendedMappings.getReflectionMa nager(

    Hi guys

    I am pissed off by this error and need an urgent help on the error and dont wanna spend some more days with same thing,......

    I am trying to integerate JPA in spring. Here is the error i am getting ,.......

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/config/web-application-config.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.cfg.ExtendedMappings.getReflectionMa nager()Lorg/hibernate/reflection/ReflectionManager;
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1403)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:513)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:450)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 90)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:287 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:189)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:545)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:871)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:423)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 43)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 59)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:340 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:307)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:241)
    at weblogic.servlet.internal.StubSecurityHelper$Servl etInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.creat eServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.crea teOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<ini t>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareS ervlet(ServletStubImpl.java:531)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlet(WebAppServletContext.java:1915)
    at weblogic.servlet.internal.WebAppServletContext.loa dServletsOnStartup(WebAppServletContext.java:1889)
    at weblogic.servlet.internal.WebAppServletContext.pre loadResources(WebAppServletContext.java:1807)
    at weblogic.servlet.internal.WebAppServletContext.sta rt(WebAppServletContext.java:3045)
    at weblogic.servlet.internal.WebAppModule.startContex ts(WebAppModule.java:1397)
    at weblogic.servlet.internal.WebAppModule.start(WebAp pModule.java:460)
    at weblogic.application.internal.flow.ModuleStateDriv er$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.next State(StateMachineDriver.java:83)
    at weblogic.application.internal.flow.ModuleStateDriv er.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDri ver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerI nvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriv er$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.next State(StateMachineDriver.java:83)
    at weblogic.application.internal.flow.ModuleStateDriv er.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlo w.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.nex t(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.next State(StateMachineDriver.java:83)
    at weblogic.application.internal.BaseDeployment.activ ate(BaseDeployment.java:409)
    at weblogic.application.internal.SingleModuleDeployme nt.activate(SingleModuleDeployment.java:39)
    at weblogic.application.internal.DeploymentStateCheck er.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainer Invoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeploym ent.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeploym ent.activateFromServerLifecycle(BasicDeployment.ja va:361)
    at weblogic.management.deploy.internal.DeploymentAdap ter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdap ter.activate(DeploymentAdapter.java:196)
    at weblogic.management.deploy.internal.AppTransition$ 2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDepl oyments.transitionApps(ConfiguredDeployments.java: 233)
    at weblogic.management.deploy.internal.ConfiguredDepl oyments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDepl oyments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServ erService.resume(DeploymentServerService.java:173)
    at weblogic.management.deploy.internal.DeploymentServ erService.start(DeploymentServerService.java:89)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemReq uest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread. java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java :173)
    Caused by: java.lang.NoSuchMethodError: org.hibernate.cfg.ExtendedMappings.getReflectionMa nager()Lorg/hibernate/reflection/ReflectionManager;
    at org.hibernate.search.event.FullTextIndexEventListe ner.initialize(FullTextIndexEventListener.java:82)
    at org.hibernate.event.EventListeners.initializeListe ners(EventListeners.java:417)
    at org.hibernate.cfg.Configuration.getInitializedEven tListeners(Configuration.java:1310)
    at org.hibernate.cfg.Configuration.buildSessionFactor y(Configuration.java:1300)
    at org.hibernate.cfg.AnnotationConfiguration.buildSes sionFactory(AnnotationConfiguration.java:915)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityMan agerFactory(Ejb3Configuration.java:730)
    at org.hibernate.ejb.HibernatePersistence.createConta inerEntityManagerFactory(HibernatePersistence.java :127)
    at org.springframework.orm.jpa.LocalContainerEntityMa nagerFactoryBean.createNativeEntityManagerFactory( LocalContainerEntityManagerFactoryBean.java:225)
    at org.springframework.orm.jpa.AbstractEntityManagerF actoryBean.afterPropertiesSet(AbstractEntityManage rFactoryBean.java:308)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1460)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1400)


    Following are the contents of my Spring config file.


    <context:component-scan base-package="com.paychex.landing"/>

    <tx:annotation-driven/>

    <bean id="myDataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
    <property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
    <property name="url" value="jdbc:oracle:thin:@undvdbw1:1521:entdevdb"/>
    <property name="username" value="ops$adenysen"/>
    <property name="password" value="sn0wday"/>
    </bean>

    <!-- Persistence Unit Configuration -->
    <bean id="pum"
    class="org.springframework.orm.jpa.persistenceunit .DefaultPersistenceUnitManager">
    <property name="persistenceXmlLocations">
    <list>
    <value>classpath*:META-INF/persistence.xml</value>
    </list>
    </property>
    </bean>

    <!-- Entity Manager Unit Configuration -->
    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerE ntityManagerFactoryBean"
    persistenceUnitManager-ref="pum"
    persistenceUnitName="persist"
    p:dataSource-ref="myDataSource">
    <property name="jpaVendorAdapter">
    <bean class="org.springframework.orm.jpa.vendor.Hibernat eJpaVendorAdapter" >
    <property name="showSql" value="true" />
    <property name="generateDdl" value="true" />
    <property name="databasePlatform" value="org.hibernate.dialect.Oracle10gDialect" />
    </bean>
    </property>

    </bean>

    <!-- Transaction Manager configuration -->
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionM anager"
    p:entityManagerFactory-ref="entityManagerFactory">
    </bean>

    The libraries i am using are,...
    all Hibernate 3.5.2 release jars.
    hibernate3.jar
    hibernate-jpa-2.0-api-1.0.0.Final.jar
    hibernate-annotations.jar
    All Spring release 3.0.1 jars

    Please please please help,...thanks,...

  • #2
    If you are pissed of and want a quick reply at least take the liberty to

    1) Don't post duplicates (you posted the same at least 3 times! )
    2) Obey forum rules and use [ code][/code ] tags when posting code

    that isn't really going to help.

    I suggest check your classpath because imho you are mixing hibernate versions or have at least another hibernate jar somewhere on your classpath.

    Comment


    • #3
      hey Apologies for duplicate posting,...I was really frustrated coz despite of replacing the jars and trying out adding and deleting jars,...its not working out,..

      Will again try different variations,...Thanks,..let me know if there is anything wrong with my code or the spring config file or which are the jars i should use,..

      Thanks

      Comment


      • #4
        Originally posted by Marten Deinum View Post
        If you are pissed of and want a quick reply at least take the liberty to

        1) Don't post duplicates (you posted the same at least 3 times! )
        2) Obey forum rules and use [ code][/code ] tags when posting code

        that isn't really going to help.

        I suggest check your classpath because imho you are mixing hibernate versions or have at least another hibernate jar somewhere on your classpath.

        Hi Marten,..could you please give me the names of the jars required for spring+jpa+hibernate

        Could you please help ,..cannot solve the issue,...
        Last edited by Springbeginner13; Jun 21st, 2010, 12:17 PM.

        Comment


        • #5
          [QUOTE=Springbeginner13;305843]Hi Marten,..could you please give me the names of the jars required for spring+jpa+hibernate

          Could you please help ,..cannot solve the issue,...

          For duplicate post ,..sorry for posting'em

          Comment

          Working...
          X