• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

InvocationTargetException

 
Engin OKUCU
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
Here is what i'm getting after having generated my hibernate mapping file.
I use :
1. Spring 2.5
2. Hibernate 3.2.5 GA
3. Tomcat 5.5.25

What i'm pretty sure is that the issue is related to the mapping files and the values objects because without adding any mapping file in the "sessionFactory" Tomcat starts very well.

ERROR :

2008-01-08 09:56:41,426 [main] INFO org.apache.catalina.core.AprLifecycleListener - The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Tools\jre1.5.0_12\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\Tools\jre1.5.0_12\bin\client;D:\Tools\jre1.5.0_12\bin;D:\Tools\Tcl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;D:\Tools\Java\jrockit-R27.3.1-jdk1.5.0_11\bin;D:\Tools\WinCvs 2.0\WinCVS.exe;D:\Tools\wincvs 2.0;D:\Tools\Maven-2.0.7\bin;C:\Program Files\Microsoft SQL Server\90\Tools\binn\
2008-01-08 09:56:41,504 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote HTTP/1.1 on http-8080
2008-01-08 09:56:41,504 [main] INFO org.apache.catalina.startup.Catalina - Initialization processed in 719 ms
2008-01-08 09:56:41,676 [main] INFO org.apache.catalina.core.StandardService - Starting service Catalina
2008-01-08 09:56:41,676 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/5.5.25
2008-01-08 09:56:41,691 [main] INFO org.apache.catalina.core.StandardHost - XML validation disabled
2008-01-08 09:56:42,113 [main] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/GOOGLE] - Initializing Spring root WebApplicationContext
2008-01-08 09:56:42,113 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
2008-01-08 09:56:42,160 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Refreshing org.springframework.web.context.support.XmlWebApplicationContext@6b9c84: display name [Root WebApplicationContext]; startup date [Tue Jan 08 09:56:42 CET 2008]; root of context hierarchy
2008-01-08 09:56:42,270 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-dao-beans.xml]
2008-01-08 09:56:42,426 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]
2008-01-08 09:56:42,551 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]
2008-01-08 09:56:42,582 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'HibernateDataSource': replacing [Root bean: class [org.apache.commons.dbcp.BasicDataSource]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]] with [Root bean: class [org.apache.commons.dbcp.BasicDataSource]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]]
2008-01-08 09:56:42,582 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'WESessionFactory': replacing [Root bean: class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]] with [Root bean: class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]]
2008-01-08 09:56:42,582 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'HibernateProperties': replacing [Root bean: class [org.springframework.beans.factory.config.PropertiesFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]] with [Root bean: class [org.springframework.beans.factory.config.PropertiesFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]]
2008-01-08 09:56:42,582 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be.xml]
2008-01-08 09:56:42,613 [main] INFO org.springframework.web.context.support.XmlWebApplicationContext - Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@6b9c84]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1fcc0a2
2008-01-08 09:56:42,676 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1fcc0a2: defining beans [HibernateDataSource,WESessionFactory,HibernateProperties]; root of factory hierarchy
2008-01-08 09:56:42,848 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.2.5
2008-01-08 09:56:42,863 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
2008-01-08 09:56:42,863 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib
2008-01-08 09:56:42,863 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
2008-01-08 09:56:43,145 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.training.webtime.be.model.UserVO -> WE_USER
2008-01-08 09:56:43,160 [main] INFO org.springframework.orm.hibernate3.LocalSessionFactoryBean - Building new Hibernate SessionFactory
2008-01-08 09:56:43,254 [main] INFO org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
2008-01-08 09:56:43,957 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Microsoft SQL Server, version: 09.00.1399
2008-01-08 09:56:43,957 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase, version: 1.2.2
2008-01-08 09:56:44,098 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.SQLServerDialect
2008-01-08 09:56:44,113 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
2008-01-08 09:56:44,113 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: on_close
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Default schema: webtime
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2008-01-08 09:56:44,113 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
2008-01-08 09:56:44,113 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.NoCacheProvider
2008-01-08 09:56:44,129 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
2008-01-08 09:56:44,129 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
2008-01-08 09:56:44,129 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
2008-01-08 09:56:44,129 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
2008-01-08 09:56:44,129 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
2008-01-08 09:56:44,129 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
2008-01-08 09:56:44,129 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
2008-01-08 09:56:44,176 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
2008-01-08 09:56:44,582 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1fcc0a2: defining beans [HibernateDataSource,WESessionFactory,HibernateProperties]; root of factory hierarchy
2008-01-08 09:56:44,582 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'WESessionFactory' defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]: Invocation of init method failed; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
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 org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:245)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
... 53 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
... 59 more
2008-01-08 09:56:44,582 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/GOOGLE] - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'WESessionFactory' defined in ServletContext resource [/WEB-INF/classes/com/training/webtime/be/spring/spring-be-hibernate.xml]: Invocation of init method failed; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
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 org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:245)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
... 53 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
... 59 more
2008-01-08 09:56:44,582 [main] ERROR org.apache.catalina.core.StandardContext - Error listenerStart
2008-01-08 09:56:44,582 [main] ERROR org.apache.catalina.core.StandardContext - Context [/GOOGLE] startup failed due to previous errors
2008-01-08 09:56:44,582 [main] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/GOOGLE] - Closing Spring root WebApplicationContext
2008-01-08 09:56:44,910 [main] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/balancer] - org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2008-01-08 09:56:45,020 [main] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jsp-examples] - ContextListener: contextInitialized()
2008-01-08 09:56:45,020 [main] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jsp-examples] - SessionListener: contextInitialized()
2008-01-08 09:56:45,145 [main] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/servlets-examples] - ContextListener: contextInitialized()
2008-01-08 09:56:45,145 [main] INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/servlets-examples] - SessionListener: contextInitialized()
2008-01-08 09:56:45,379 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1 on http-8080
2008-01-08 09:56:45,504 [main] INFO org.apache.jk.common.ChannelSocket - JK: ajp13 listening on /0.0.0.0:8009
2008-01-08 09:56:45,504 [main] INFO org.apache.jk.server.JkMain - Jk running ID=0 time=0/16 config=null
2008-01-08 09:56:45,551 [main] INFO org.apache.catalina.storeconfig.StoreLoader - Find registry server-registry.xml at classpath resource
2008-01-08 09:56:45,613 [main] INFO org.apache.catalina.startup.Catalina - Server startup in 4109 ms



---->User.hbm.xml :

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 01-janv.-2008 13:45:53 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping default-lazy="false">
<class name="com.training.webtime.be.model.UserVO" table="WE_USER" schema="dbo" catalog="webtime">
<id name="userId" type="int" column="user_id" >
<generator class="native"/>
</id>
<property name="userFirstname" type="string">
<column name="user_firstname" length="50" not-null="true" />
</property>
<property name="userLastname" type="string">
<column name="user_lastname" length="50" not-null="true" />
</property>
<property name="userLogin" type="string">
<column name="user_login" length="50" not-null="true" />
</property>
<property name="userPassword" type="string">
<column name="user_password" length="50" not-null="true" />
</property>
<set name="groups" inverse="false" table="WE_USER_GROUP">
<key>
<column name="user_group_user_id" not-null="true" />
</key>
<many-to-many entity-name="com.training.webtime.be.model.GroupVO">
<column name="user_group_group_id" not-null="true" />
</many-to-many>
</set>
<set name="timesheets" inverse="true">
<key>
<column name="timesheet_user_id" not-null="true" />
</key>
<one-to-many class="com.training.webtime.be.model.TimesheetVO" />
</set>

</class>
</hibernate-mapping>

NOTE : sometimes it works when i add 'default-lazy="false"', if i take it off...of course it's sure it does not work.




----> UserVO.java :




package com.training.webtime.be.model;
// Generated 01-janv.-2008 13:45:34 by Hibernate Tools 3.2.0.CR1

import java.util.Set;


/**
* WeUser generated by hbm2java
*/
public class UserVO {

private int userId;
private String userFirstname;
private String userLastname;
private String userLogin;
private String userPassword;
private Set groups = null;
private Set timesheets = null;

public UserVO() {

}

private UserVO(int userId){
this.userId = userId;
}


public int getUserId() {
return this.userId;
}


public void setUserId(int userId) {
this.userId = userId;
}


public String getUserFirstname() {
return this.userFirstname;
}

public void setUserFirstname(String userFirstname) {
this.userFirstname = userFirstname;
}

public String getUserLastname() {
return this.userLastname;
}

public void setUserLastname(String userLastname) {
this.userLastname = userLastname;
}

public String getUserLogin() {
return this.userLogin;
}

public void setUserLogin(String userLogin) {
this.userLogin = userLogin;
}

public String getUserPassword() {
return this.userPassword;
}

public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
}

public Set getGroups() {
return this.groups;
}

public void setGroups(Set groups) {
this.groups = groups;
}

public Set getTimesheets() {
return this.timesheets;
}

public void setTimesheets(Set timesheets) {
this.timesheets = timesheets;
}



}

---> spring-be-hibernate.xml :



<?xml version="1.0" encoding="UTF-8"?>

<!-- Application context definition -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">


<bean id="HibernateDataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"><value>net.sourceforge.jtds.jdbc.Driver</value></property>
<property name="url"><value>jdbc:jtds:sqlserver://localhost:1433/webtime</value></property>
<property name="username"><value>webtime</value></property>
<property name="password"><value>webtime</value></property>
<property name="maxActive" value="20" />
<property name="maxIdle" value="12" />
<property name="minIdle" value="8" />
</bean>

<!-- Hibernate SessionFactory -->
<bean id="WESessionFactory"class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="HibernateDataSource" />
</property>
<property name="hibernateProperties">
<ref bean="HibernateProperties" />
</property>
<property name="mappingDirectoryLocations">
<list>
<value>
classpath:/com/training/webtime/be/hibernate
</value>
</list>
</property>
</bean>

<bean id="HibernateProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.default_schema">webtime</prop>
<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
</props>
</property>
</bean>

</beans>



Thanks for your help.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a jar missing from your classpath

Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy


Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic