Hello there!
I'm developing a webapp and I need to integrate Hibernate and Struts. I used the HibernatePlugin found in the Hibernate website, the struts config is ok (I've added the plugin configuration as mentioned in the website...). The hibernate.cfg.xml file is also ok. The problem is that when I try to load the webapp I get the log messages below.
I have all the jar files in place, in the lib folders of the webapp and of the appserver (Tomcat5).
What is the problem?? What can I do to solve it??
Thanks in advance,
Paulo Ferreira
=========== Tomcat Log ============
SEVERE: Exception while initializing Hibernate.
30-Jul-07 6:25:13 PM srsleiria.aprov.rolDB.HibernatePlugIn initHibernate
SEVERE: Rethrowing exception...
java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Enhancer
at java.lang.Class.initializeClass(libgcj.so.7rh)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at srsleiria.aprov.rolDB.HibernatePlugIn.initHibernate(HibernatePlugIn.java:128)
at srsleiria.aprov.rolDB.HibernatePlugIn.init(HibernatePlugIn.java:105)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapper.loadServlet(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardWrapper.load(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContext.loadOnStartup(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContext.start(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.deployWAR(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.check(catalina-5.5.17.jar.sonsfe88.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.commons.modeler.BaseModelMBean.invoke(jakarta-commons-modeler-1.1.jar.so)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.MX4JMBeanServer.invoke(mx4j-3.0.1.jar.so)
at org.apache.catalina.manager.ManagerServlet.check(catalina-manager-5.5.17.jar.so)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(catalina-manager-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
at java.lang.Thread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Type
at org.apache.catalina.loader.WebappClassLoader.loadClass(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.loader.WebappClassLoader.loadClass(catalina-5.5.17.jar.sonsfe88.so)
at java.lang.Class.initializeClass(libgcj.so.7rh)
...55 more
30-Jul-07 6:25:13 PM org.apache.struts.action.ActionServlet init
SEVERE: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
javax.servlet.ServletException: net.sf.cglib.proxy.Enhancer
at srsleiria.aprov.rolDB.HibernatePlugIn.initHibernate(HibernatePlugIn.java:140)
at srsleiria.aprov.rolDB.HibernatePlugIn.init(HibernatePlugIn.java:105)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapper.loadServlet(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardWrapper.load(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContext.loadOnStartup(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContext.start(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.deployWAR(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.check(catalina-5.5.17.jar.sonsfe88.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.commons.modeler.BaseModelMBean.invoke(jakarta-commons-modeler-1.1.jar.so)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.MX4JMBeanServer.invoke(mx4j-3.0.1.jar.so)
at org.apache.catalina.manager.ManagerServlet.check(catalina-manager-5.5.17.jar.so)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(catalina-manager-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
at java.lang.Thread.run(libgcj.so.7rh)
30-Jul-07 6:25:13 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet action as unavailable
30-Jul-07 6:25:13 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /Rol threw load() exception
javax.servlet.UnavailableException: net.sf.cglib.proxy.Enhancer
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
at javax.servlet.GenericServlet.init(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapper.loadServlet(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardWrapper.load(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContext.loadOnStartup(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContext.start(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.deployWAR(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.startup.HostConfig.check(catalina-5.5.17.jar.sonsfe88.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.commons.modeler.BaseModelMBean.invoke(jakarta-commons-modeler-1.1.jar.so)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so)
at mx4j.server.MX4JMBeanServer.invoke(mx4j-3.0.1.jar.so)
at org.apache.catalina.manager.ManagerServlet.check(catalina-manager-5.5.17.jar.so)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(catalina-manager-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.sonsfe88.so)
at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
at java.lang.Thread.run(libgcj.so.7rh)
30-Jul-07 6:25:33 PM org.hibernate.connection.DriverManagerConnectionProvider close
INFO: cleaning up connection pool: jdbc:mysql://localhost:3306/rol
30-Jul-07 6:25:42 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet action is currently unavailable
|