java - Getting error during SessionFactory creation -
i keep getting failed.org.hibernate.hibernateexception
when want run hibernate code. i'm using spring 3 mvc
, spring 3 security
in app. idea can cause this?
hibernate part of pom.xml
:
<!-- hibernate + mysql --> <dependency> <groupid>mysql</groupid> <artifactid>mysql-connector-java</artifactid> <version>5.1.9</version> </dependency> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-core</artifactid> <version>3.6.3.final</version> </dependency> <dependency> <groupid>javassist</groupid> <artifactid>javassist</artifactid> <version>3.12.1.ga</version> </dependency> <dependency> <groupid>asm</groupid> <artifactid>asm-all</artifactid> <version>2.2</version> </dependency> <dependency> <groupid>antlr</groupid> <artifactid>antlr</artifactid> <version>2.7.7</version> </dependency>
the stack trace:
initial sessionfactory creation failed.org.hibernate.hibernateexception: unable instantiate default tuplizer [org.hibernate.tuple.entity.pojoentitytuplizer] v 02, 2013 10:18:28 odp. org.apache.catalina.core.standardwrappervalve invoke severe: servlet.service() servlet [mvc-dispatcher] in context path [/fit] threw exception [handler processing failed; nested exception java.lang.exceptionininitializererror] root cause java.lang.classnotfoundexception: javassist.util.proxy.methodfilter @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1711) @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1556) @ org.hibernate.bytecode.javassist.bytecodeproviderimpl.getproxyfactoryfactory(bytecodeproviderimpl.java:49) @ org.hibernate.tuple.entity.pojoentitytuplizer.buildproxyfactoryinternal(pojoentitytuplizer.java:205) @ org.hibernate.tuple.entity.pojoentitytuplizer.buildproxyfactory(pojoentitytuplizer.java:183) @ org.hibernate.tuple.entity.abstractentitytuplizer.<init>(abstractentitytuplizer.java:167) @ org.hibernate.tuple.entity.pojoentitytuplizer.<init>(pojoentitytuplizer.java:77) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:57) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) @ java.lang.reflect.constructor.newinstance(constructor.java:525) @ org.hibernate.tuple.entity.entitytuplizerfactory.constructtuplizer(entitytuplizerfactory.java:105) @ org.hibernate.tuple.entity.entitytuplizerfactory.constructdefaulttuplizer(entitytuplizerfactory.java:133) @ org.hibernate.tuple.entity.entityentitymodetotuplizermapping.<init>(entityentitymodetotuplizermapping.java:80) @ org.hibernate.tuple.entity.entitymetamodel.<init>(entitymetamodel.java:322) @ org.hibernate.persister.entity.abstractentitypersister.<init>(abstractentitypersister.java:485) @ org.hibernate.persister.entity.singletableentitypersister.<init>(singletableentitypersister.java:133) @ org.hibernate.persister.persisterfactory.createclasspersister(persisterfactory.java:84) @ org.hibernate.impl.sessionfactoryimpl.<init>(sessionfactoryimpl.java:286) @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1845) @ util.hibernateutil.buildsessionfactory(hibernateutil.java:13) @ util.hibernateutil.<clinit>(hibernateutil.java:8) @ cz.cvut.fit.genepi.controllers.logincontroller.login(logincontroller.java:33) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:601) @ org.springframework.web.method.support.invocablehandlermethod.invoke(invocablehandlermethod.java:213) @ org.springframework.web.method.support.invocablehandlermethod.invokeforrequest(invocablehandlermethod.java:126) @ org.springframework.web.servlet.mvc.method.annotation.servletinvocablehandlermethod.invokeandhandle(servletinvocablehandlermethod.java:96) @ org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.invokehandlermethod(requestmappinghandleradapter.java:617) @ org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.handleinternal(requestmappinghandleradapter.java:578) @ org.springframework.web.servlet.mvc.method.abstracthandlermethodadapter.handle(abstracthandlermethodadapter.java:80) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:923) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:852) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:882) @ org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:778) @ javax.servlet.http.httpservlet.service(httpservlet.java:621) @ javax.servlet.http.httpservlet.service(httpservlet.java:722) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:186) @ org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:160) @ org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) @ org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:259) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:225) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:169) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:472) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:168) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:98) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:927) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:118) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:407) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:999) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:565) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:309) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603) @ java.lang.thread.run(thread.java:722)
your javaassist.jar version incompatible. should use bundle:
<dependency> <groupid>org.javassist</groupid> <artifactid>javassist</artifactid> <version>3.17.1-ga</version> </dependency>
Comments
Post a Comment