-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Error Creating SessionFactory
PostPosted: Mon Nov 13, 2006 7:13 am 
Newbie

Joined: Mon Nov 13, 2006 6:39 am
Posts: 1
hi
i am trying to create a SessionFactory in Hibernate Console. I got following error and session can not be generated





Hibernate 3.1.3
hibernate.properties not found
using CGLIB reflection optimizer
using JDK 1.4 java.sql.Timestamp handling
configuring from resource: /hibernate.cfg.xml
Configuration resource: /hibernate.cfg.xml
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsLov.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.RvsLov -> RVS_LOV
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsUsers.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.RvsUsers -> RVS_USERS
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsUserRole.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.RvsUserRole -> RVS_USER_ROLE
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsCaseReq.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.RvsCaseReq -> RVS_CASE_REQ
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsAttachments.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.RvsAttachments -> RVS_ATTACHMENTS
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsActivity.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.RvsActivity -> RVS_ACTIVITY
Reading mappings from resource: com/oxiput/hibernate/mapping/OxiWebsiteContent.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.OxiWebsiteContent -> OXI_WEBSITE_CONTENT
Reading mappings from resource: com/oxiput/hibernate/mapping/OxiHomeSponsoredLink.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.OxiHomeSponsoredLink -> oxi_home_sponsored_link
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsProduct.hbm.xml
Mapping class: com.oxiput.hibernate.mapping.RvsProduct -> RVS_PRODUCT
Reading mappings from resource: com/oxiput/hibernate/mapping/OxiCareerContent.hbm.xml
Don't use old DTDs, read the Hibernate 3.x Migration Guide!
Mapping class: com.oxiput.hibernate.mapping.OxiCareerContent -> OXI_CAREER_CONTENT
Reading mappings from resource: com/oxiput/hibernate/mapping/RvsPerson.hbm.xml
Don't use old DTDs, read the Hibernate 3.x Migration Guide!
Mapping class: com.oxiput.hibernate.mapping.RvsPerson -> rvs_person
Configured SessionFactory: null
Using Hibernate built-in connection pool (not for production use!)
Hibernate connection pool size: 20
autocommit mode: false
using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/oxiput
connection properties: {user=root, password=****}
RDBMS: MySQL, version: 5.0.22-community-nt
JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ )
Using dialect: org.hibernate.dialect.MySQLDialect
Using default transaction strategy (direct JDBC transactions)
No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Automatic flush during beforeCompletion(): disabled
Automatic session close at end of transaction: disabled
JDBC batch size: 15
JDBC batch updates for versioned data: disabled
Scrollable result sets: enabled
JDBC3 getGeneratedKeys(): enabled
Connection release mode: auto
Maximum outer join fetch depth: 2
Default batch fetch size: 1
Generate SQL with comments: disabled
Order SQL updates by primary key: disabled
Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Using ASTQueryTranslatorFactory
Query language substitutions: {}
Second-level cache: enabled
Query cache: disabled
Cache provider: org.hibernate.cache.EhCacheProvider
Optimize cache for minimal puts: disabled
Structured second-level cache entries: disabled
Statistics: disabled
Deleted entity synthetic identifier rollback: disabled
Default entity-mode: pojo
building session factory
No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/JAVA_DEV/Tomcat%205.5/webapps/Oxiput/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
%%%% Error Creating SessionFactory %%%%org.hibernate.MappingException: could not instantiate id generator
org.hibernate.MappingException: could not instantiate id generator
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:97)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:182)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
at com.oxiput.hibernate.SessionManager.currentSession(SessionManager.java:56)
at com.oxiput.dao.RegisterDAO.create(RegisterDAO.java:85)
at com.oxiput.vo.RegisterVO.addPerson(RegisterVO.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.MappingException: could not interpret id generator strategy:
at org.hibernate.id.IdentifierGeneratorFactory.getIdentifierGeneratorClass(IdentifierGeneratorFactory.java:108)
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:91)
... 36 more
Insert failed.java.lang.NullPointerException


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 7:52 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
Please check your ID Generator definitions. I found this in your StackTrace:

Quote:
org.hibernate.MappingException: could not instantiate id generator

_________________
Please don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.