-->
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.  [ 4 posts ] 
Author Message
 Post subject: hibernate.MappingException could not instantiate id generato
PostPosted: Fri Feb 04, 2005 4:52 pm 
Newbie

Joined: Fri Feb 04, 2005 4:11 pm
Posts: 10
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

I am completely new to Hibernate, and am trying to use it for developing Web apps. in Websphere studio using the Struts framework. i downloaded an example from the web, and am trying to run a simple test using Hibernate. I am using the datasource that is already set up in Websphere studio, as the documentation said that I could I have used thsi datasource successfully in other projects that I have tested, and it has worked fine.
But I keep getting this execption 'hibernate.MappingException could not instantiate id generator' when I launch the first jsp.Any help will be appreciated.


Hibernate version:2.1.8


Mapping documents:

contact.hbm.xml is as follows:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.sample.db.Contact" table="CONTACT">
<id name="id" type="long" column="ID" >
<generator class="seqhilo">
<param name="sequence">contactseq</param>
<param name="max_lo">100</param>
</generator>

</id>
<!-- A cat has to have a name, but it shouldn' be too long. -->
<property name="firstName">
<column name="FIRSTNAME" />
</property>
<property name="lastName">
<column name="LASTNAME"/>
</property>
<property name="email">
<column name="EMAIL"/>
</property>
</class>
</hibernate-mapping>

hibernate.cfg.xml is as follows:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>

<property name="hibernate.session_factory_name"> HibernateSessionFactory</property>

<property name="hibernate.connection.datasource">jdbc/ds1</property>


<!-- Mapping files -->
<mapping resource="contact.hbm.xml"/>
<mapping resource="company.hbm.xml"/>
</session-factory>
</hibernate-configuration>






Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
*** Starting the server ***
************ Start Display Current Environment ************
WebSphere Platform 5.1 [BASE 5.1.0 b0344.02] running with process name localhost\localhost\server1 and process id 2632
Host Operating System is Windows 2000, version 5.0
Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51
user.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51
Java Home = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51\java\jre
ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/java/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/lib/ext;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/web/help;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.1/wstools/eclipse/plugins/com.ibm.etools.webservice_5.1.1/runtime/worf.jar
Classpath = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/lib/bootstrap.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/lib/j2ee.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/lib/lmproxy.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/lib/urlprotocols.jar;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.1/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1/runtime/wteServers.jar;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.1/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1/runtime/wasToolsCommon.jar
Java Library path = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/java/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\runtimes\base_v51/java/jre/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\eclipse\jre\bin;.;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.1\eclipse\jre\bin;C:\Notes\;C:\Notes\Data\;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\CAisd\bin;C:\WIN2000\system32;C:\WIN2000;C:\WIN2000\System32\Wbem;C:\informix\bin;C:\WIN2000\system32\nls;C:\WIN2000\system32\nls\ENGLISH;c:\jakarta-tomcat-4.1.27\bin;c:\ant\bin;C:\Program Files\Seagate Software\Crystal Reports;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\Rational\common;Z:.;Y:.
************* End Display Current Environment *************
[2/4/05 15:25:53:594 EST] 3d58e88e ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
[2/4/05 15:25:54:688 EST] 3d58e88e AdminInitiali A ADMN0015I: AdminService initialized
[2/4/05 15:25:56:172 EST] 3d58e88e Configuration A SECJ0215I: Successfully set JAAS login provider configuration class to com.ibm.ws.security.auth.login.Configuration.
[2/4/05 15:25:56:234 EST] 3d58e88e SecurityDM I SECJ0231I: The Security component's FFDC Diagnostic Module com.ibm.ws.security.core.SecurityDM registered successfully: true.
[2/4/05 15:25:56:844 EST] 3d58e88e SecurityCompo I SECJ0309I: Java 2 Security is disabled.
[2/4/05 15:25:56:844 EST] 3d58e88e SecurityCompo I SECJ0212I: WCCM JAAS configuration information successfully pushed to login provider class.
[2/4/05 15:25:56:859 EST] 3d58e88e SecurityCompo I SECJ0240I: Security service initialization completed successfully
[2/4/05 15:25:56:859 EST] 3d58e88e JMSRegistrati A MSGS0602I: WebSphere Embedded Messaging Client only has been installed
[2/4/05 15:26:00:781 EST] 3d58e88e ResourceMgrIm I WSVR0049I: Binding ds1_CF as eis/jdbc/ds1_CMP
[2/4/05 15:26:01:141 EST] 3d58e88e ResourceMgrIm I WSVR0049I: Binding ds1 as jdbc/ds1
[2/4/05 15:26:01:938 EST] 3d58e88e CacheServiceI I DYNA0048I: WebSphere Dynamic Cache initialized successfully.
[2/4/05 15:26:04:766 EST] 3d58e88e JMXSoapAdapte A ADMC0013I: SOAP connector available at port 8880
[2/4/05 15:26:04:844 EST] 3d58e88e SecurityCompo I SECJ0243I: Security service started successfully
[2/4/05 15:26:04:844 EST] 3d58e88e SecurityCompo I SECJ0210I: Security enabled false
[2/4/05 15:26:06:703 EST] 3d58e88e ApplicationMg A WSVR0200I: Starting application: adminconsole
[2/4/05 15:26:07:344 EST] 3d58e88e WebContainer A SRVE0161I: IBM WebSphere Application Server - Web Container. Copyright IBM Corp. 1998-2002
[2/4/05 15:26:07:375 EST] 3d58e88e WebContainer A SRVE0162I: Servlet Specification Level: 2.3
[2/4/05 15:26:07:375 EST] 3d58e88e WebContainer A SRVE0163I: Supported JSP Specification Level: 1.2
[2/4/05 15:26:07:469 EST] 3d58e88e WebContainer A SRVE0169I: Loading Web Module: adminconsole.
[2/4/05 15:26:08:375 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: JSP 1.2 Processor: init
[2/4/05 15:26:08:547 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: SimpleFileServlet: init
[2/4/05 15:26:08:562 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: InvokerServlet: init
[2/4/05 15:26:08:594 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: validator: init
[2/4/05 15:26:09:391 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: EventInitializer: init
[2/4/05 15:26:09:516 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: action: init
[2/4/05 15:26:10:984 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: action: Tiles definition factory loaded
[2/4/05 15:26:11:000 EST] 3d58e88e WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: SecureCleanup: init
[2/4/05 15:26:11:094 EST] 3d58e88e ApplicationMg A WSVR0221I: Application started: adminconsole
[2/4/05 15:26:11:109 EST] 3d58e88e ApplicationMg A WSVR0200I: Starting application: IBMUTC
[2/4/05 15:26:11:938 EST] 3d58e88e WebContainer A SRVE0169I: Loading Web Module: IBM Universal Test Client.
[2/4/05 15:26:12:016 EST] 3d58e88e WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: JSP 1.2 Processor: init
[2/4/05 15:26:12:078 EST] 3d58e88e WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: SimpleFileServlet: init
[2/4/05 15:26:12:078 EST] 3d58e88e ApplicationMg A WSVR0221I: Application started: IBMUTC
[2/4/05 15:26:12:094 EST] 3d58e88e ApplicationMg A WSVR0200I: Starting application: TestEAR
[2/4/05 15:26:13:422 EST] 3d58e88e WebContainer A SRVE0169I: Loading Web Module: Struts Example Application.
[2/4/05 15:26:13:703 EST] 3d58e88e WebGroup I SRVE0180I: [Struts Example Application] [/struts-example1] [Servlet.LOG]: JSP 1.2 Processor: init
[2/4/05 15:26:14:375 EST] 3d58e88e WebGroup I SRVE0180I: [Struts Example Application] [/struts-example1] [Servlet.LOG]: SimpleFileServlet: init
[2/4/05 15:26:14:375 EST] 3d58e88e WebGroup I SRVE0180I: [Struts Example Application] [/struts-example1] [Servlet.LOG]: InvokerServlet: init
[2/4/05 15:26:14:438 EST] 3d58e88e WebGroup I SRVE0180I: [Struts Example Application] [/struts-example1] [Servlet.LOG]: action: init
[2/4/05 15:26:14:984 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
[2/4/05 15:26:15:000 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
[2/4/05 15:26:15:781 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.webapp.example.AlternateApplicationResources', returnNull=true
[2/4/05 15:26:15:797 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.webapp.example.ApplicationResources', returnNull=true
[2/4/05 15:26:15:812 EST] 3d58e88e WebGroup I SRVE0180I: [Struts Example Application] [/struts-example1] [Servlet.LOG]: action: []: Verifying ModuleConfig for this application module
[2/4/05 15:26:15:828 EST] 3d58e88e WebGroup I SRVE0180I: [Struts Example Application] [/struts-example1] [Servlet.LOG]: action: []: Verification of ModuleConfig has been completed
[2/4/05 15:26:15:828 EST] 3d58e88e MemoryDatabas I org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn Initializing memory database plug in from '/WEB-INF/database.xml'
[2/4/05 15:26:15:891 EST] 3d58e88e ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validator-rules.xml'
[2/4/05 15:26:15:984 EST] 3d58e88e ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml'
[2/4/05 15:26:16:062 EST] 3d58e88e WebContainer A SRVE0169I: Loading Web Module: TilesProj.
[2/4/05 15:26:16:734 EST] 3d58e88e WebGroup I SRVE0180I: [TilesProj] [/TilesProj] [Servlet.LOG]: JSP 1.2 Processor: init
[2/4/05 15:26:17:234 EST] 3d58e88e WebGroup I SRVE0180I: [TilesProj] [/TilesProj] [Servlet.LOG]: SimpleFileServlet: init
[2/4/05 15:26:17:234 EST] 3d58e88e WebGroup I SRVE0180I: [TilesProj] [/TilesProj] [Servlet.LOG]: InvokerServlet: init
[2/4/05 15:26:17:266 EST] 3d58e88e WebGroup I SRVE0180I: [TilesProj] [/TilesProj] [Servlet.LOG]: action: init
[2/4/05 15:26:17:297 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
[2/4/05 15:26:17:328 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
[2/4/05 15:26:17:750 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='com.pfpc.resources.ApplicationResources', returnNull=true
[2/4/05 15:26:18:078 EST] 3d58e88e TilesPlugin I org.apache.struts.tiles.TilesPlugin Tiles definition factory loaded for module ''.
[2/4/05 15:26:18:094 EST] 3d58e88e WebContainer A SRVE0169I: Loading Web Module: sample1.
[2/4/05 15:26:18:344 EST] 3d58e88e WebGroup I SRVE0180I: [sample1] [/sample1] [Servlet.LOG]: JSP 1.2 Processor: init
[2/4/05 15:26:18:578 EST] 3d58e88e WebGroup I SRVE0180I: [sample1] [/sample1] [Servlet.LOG]: SimpleFileServlet: init
[2/4/05 15:26:18:594 EST] 3d58e88e WebGroup I SRVE0180I: [sample1] [/sample1] [Servlet.LOG]: InvokerServlet: init
[2/4/05 15:26:18:625 EST] 3d58e88e WebGroup I SRVE0180I: [sample1] [/sample1] [Servlet.LOG]: action: init
[2/4/05 15:26:18:656 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
[2/4/05 15:26:18:656 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
[2/4/05 15:26:19:047 EST] 3d58e88e PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='sample1.resources.ApplicationResources', returnNull=true
[2/4/05 15:26:19:125 EST] 3d58e88e Environment I net.sf.hibernate.cfg.Environment Hibernate 2.1.4
[2/4/05 15:26:19:141 EST] 3d58e88e Environment I net.sf.hibernate.cfg.Environment hibernate.properties not found
[2/4/05 15:26:19:156 EST] 3d58e88e Environment I net.sf.hibernate.cfg.Environment using CGLIB reflection optimizer
[2/4/05 15:26:19:188 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration configuring from resource: /hibernate.cfg.xml
[2/4/05 15:26:19:203 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration Configuration resource: /hibernate.cfg.xml
[2/4/05 15:26:19:453 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: contact.hbm.xml
[2/4/05 15:26:19:625 EST] 3d58e88e Binder I net.sf.hibernate.cfg.Binder Mapping class: com.sample.db.Contact -> CONTACT
[2/4/05 15:26:19:828 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: company.hbm.xml
[2/4/05 15:26:19:859 EST] 3d58e88e Binder I net.sf.hibernate.cfg.Binder Mapping class: com.sample.db.Company -> MGMT_COMPANIES
[2/4/05 15:26:19:859 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration Configured SessionFactory: null
[2/4/05 15:26:19:859 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration processing one-to-many association mappings
[2/4/05 15:26:19:859 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration processing one-to-one association property references
[2/4/05 15:26:19:859 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration processing foreign key constraints
[2/4/05 15:26:19:906 EST] 3d58e88e SettingsFacto W net.sf.hibernate.cfg.SettingsFactory No dialect set - using GenericDialect: The dialect was not set. Set the property hibernate.dialect.
[2/4/05 15:26:19:922 EST] 3d58e88e Dialect I net.sf.hibernate.dialect.Dialect Using dialect: net.sf.hibernate.dialect.GenericDialect
[2/4/05 15:26:19:922 EST] 3d58e88e SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use outer join fetching: false
[2/4/05 15:26:19:938 EST] 3d58e88e NamingHelper I net.sf.hibernate.util.NamingHelper JNDI InitialContext properties:{}
[2/4/05 15:26:20:297 EST] 3d58e88e DSConfigurati W DSRA8200W: DataSource Configuration: DSRA8020E: Warning: The property 'Component-managed authentication alias' does not exist on the DataSource class oracle.jdbc.pool.OracleConnectionPoolDataSource.
[2/4/05 15:26:20:297 EST] 3d58e88e DSConfigurati W DSRA8200W: DataSource Configuration: DSRA8020E: Warning: The property 'Container-managed authentication' does not exist on the DataSource class oracle.jdbc.pool.OracleConnectionPoolDataSource.
[2/4/05 15:26:20:438 EST] 3d58e88e ConnectionFac I J2CA0122I: Resource reference jdbc/ds1 could not be located, so default values of the following are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
[Other attributes]

isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)

[2/4/05 15:26:20:547 EST] 3d58e88e DatasourceCon I net.sf.hibernate.connection.DatasourceConnectionProvider Using datasource: jdbc/ds1
[2/4/05 15:26:20:578 EST] 3d58e88e TransactionMa I net.sf.hibernate.transaction.TransactionManagerLookupFactory No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
[2/4/05 15:26:21:953 EST] 3d58e88e WSRdbDataSour I DSRA8203I: Database product name : Oracle
[2/4/05 15:26:21:953 EST] 3d58e88e WSRdbDataSour I DSRA8204I: Database product version : Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
[2/4/05 15:26:21:953 EST] 3d58e88e WSRdbDataSour I DSRA8205I: JDBC driver name : Oracle JDBC driver
[2/4/05 15:26:21:953 EST] 3d58e88e WSRdbDataSour I DSRA8206I: JDBC driver version : 9.2.0.3.0
[2/4/05 15:26:22:844 EST] 3d58e88e SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use scrollable result sets: true
[2/4/05 15:26:22:844 EST] 3d58e88e SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use JDBC3 getGeneratedKeys(): false
[2/4/05 15:26:22:844 EST] 3d58e88e SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Optimize cache for minimal puts: false
[2/4/05 15:26:22:844 EST] 3d58e88e SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Query language substitutions: {}
[2/4/05 15:26:22:844 EST] 3d58e88e SettingsFacto I net.sf.hibernate.cfg.SettingsFactory cache provider: net.sf.ehcache.hibernate.Provider
[2/4/05 15:26:23:391 EST] 3d58e88e SystemErr R net.sf.hibernate.MappingException: could not instantiate id generator
at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:82)
at net.sf.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:82)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:630)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:716)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:768)
at com.sample.util.HibernateStrutsPlugIn.init(HibernateStrutsPlugIn.java:32)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
Caused by: net.sf.hibernate.MappingException: Dialect does not support sequences
at net.sf.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:319)
at net.sf.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:62)
at net.sf.hibernate.id.SequenceHiLoGenerator.configure(SequenceHiLoGenerator.java:45)
at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:78)
... 46 more
[2/4/05 15:26:22:859 EST] 3d58e88e Configuration I net.sf.hibernate.cfg.Configuration instantiating and configuring caches
[2/4/05 15:26:23:172 EST] 3d58e88e SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl building session factory
[2/4/05 15:26:23:375 EST] 3d58e88e SystemOut O Error inconfiguring SessionFactory
[2/4/05 15:26:23:406 EST] 3d58e88e ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validator-rules.xml'
[2/4/05 15:26:23:578 EST] 3d58e88e ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml'
[2/4/05 15:26:23:672 EST] 3d58e88e ApplicationMg A WSVR0221I: Application started: TestEAR
[2/4/05 15:26:23:719 EST] 3d58e88e HttpTransport A SRVE0171I: Transport http is listening on port 9,080.
[2/4/05 15:26:25:938 EST] 3d58e88e HttpTransport A SRVE0171I: Transport https is listening on port 9,443.
[2/4/05 15:26:25:969 EST] 3d58e88e HttpTransport A SRVE0171I: Transport http is listening on port 9,090.
[2/4/05 15:26:26:297 EST] 3d58e88e HttpTransport A SRVE0171I: Transport https is listening on port 9,043.
[2/4/05 15:26:26:344 EST] 3d58e88e RMIConnectorC A ADMC0026I: RMI Connector available at port 2809
[2/4/05 15:26:26:453 EST] 3d58e88e WsServer A WSVR0001I: Server server1 open for e-business



Name and version of the database you are using: Oracle 9i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 5:38 pm 
Beginner
Beginner

Joined: Mon Nov 29, 2004 5:34 pm
Posts: 35
<id name="id" type="long" column="ID" >
<generator class="seqhilo">
<param name="sequence">contactseq</param>
<param name="max_lo">100</param>
</generator>

Your ID defines the primary key column of the database table, your ID indicates that you are using sequence generator called contactseq for the ID column.
Do you have contactseq – sequence defined in your database ?
The seqhilo defines - uses a hi/lo algorithm (Oracle-style sequence) to efficiently generate identifiers of type long, short or int, given a named database sequence.

Since you are testing and this is your first program, I would suggest you to give your own id and change the above to something like:-

<id name="ID" type="string" unsaved-value="null">
<column name="id" sql-type="char(32)" not-null="true" />
<generator class="assigned" />
</id>

Once working refer to Hibernate document for more details on ID generation.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 6:04 pm 
Regular
Regular

Joined: Tue Jan 11, 2005 8:55 pm
Posts: 53
Srigold,

Thanks for you response to this post because I am having a similar problem. I am trying to use the sequence generator with a Oracle 9 DB, and I do have the sequence defined in my DB. However, I continue to get the same error of "could not instantiate id generator".

Am I doing something wrong? Here are my xDoclet tags:

Code:
   /**
    * @hibernate.id column="ADDRESS_ID"
    *                type="long"
    *                generator-class="sequence"
    * @hibernate.generator-param name="sequence" value="MY_SEQ"
    * @return Returns the addressId.
    */


Any feedback would be appreciated! Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2005 2:48 pm 
Newbie

Joined: Fri Feb 04, 2005 4:11 pm
Posts: 10
Thanks for your response. I will check if the sequence is defined in the database or not.
But I have also tried a simple query on a different table that already exists in my database, which does not use any primary key, and get the same error. Should Hibernate care about the primary key if not inserting?

One other question, can one use straight jdbc code for the queries espcially if they are joins? or does one have to use the syntax defined by HQL? The reason I ask is that the project that I am working on has some pretty tight deadlines, and no one has experience in using Hibernate.
The only reason we want to use it so that the queries, insert, uodate statements etc, can sit in a config file so that if any changes are needed, we can be changed in one place.
Any help will be apprecitiated. Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.