Hibernate version:3.0
Mapping documents:Diffuseur.hbm.xml, CorrespondanceDiffuseur.hbm.xml
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) com.plsvista.listeners.InitialHibernate
java.lang.ExceptionInInitializerError
at com.plsvista.listeners.InitialHibernate.contextInitialized(InitialHibernate.java:25)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3212)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3554)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
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.main(Bootstrap.java:156)
Caused by: java.lang.RuntimeException: Problème de configuration : could not instantiate id generator
at com.plsvista.hibernate.HibernateUtil2.<clinit>(HibernateUtil2.java:20)
... 17 more
Caused by: 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:635)
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:136)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:791)
at com.plsvista.hibernate.HibernateUtil2.<clinit>(HibernateUtil2.java:18)
... 17 more
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.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:78)
... 24 more
Name and version of the database you are using: Oracle
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
i have a problem with a mapping :
when i start tomcat , i have this error :
net.sf.hibernate.MappingException: Dialect does not support sequences
at net.sf.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:319)
My mapping is this <?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.2
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="org.ultimania.model.Diffuseur"
table="DIFFUSEUR"
lazy="false"
dynamic-update="true"
dynamic-insert="true"
>
<id
name="idDiffuseur"
type="java.lang.Long"
column="ID_DIFFUSEUR"
>
<generator class="assigned" />
</id>
<property
name="raisonSociale"
type="java.lang.String"
column="RAISON_SOCIALE"
length="150"
/>
<property
name="idEtablissementTph"
type="java.lang.Long"
column="ID_ETABLISSEMENT_TPH"
length="22"
/>
<property
name="idEtablissementMar"
type="java.lang.Long"
column="ID_ETABLISSEMENT_MAR"
length="22"
/>
<property
name="idFournisseur"
type="java.lang.Long"
column="ID_FOURNISSEUR"
length="22"
/>
<property
name="idArm"
type="java.lang.Long"
column="ID_ARM"
length="22"
/>
<property
name="idLabo"
type="java.lang.Long"
column="ID_LABO"
length="22"
/>
<property
name="idGrossiste"
type="java.lang.Long"
column="ID_GROSSISTE"
length="22"
/>
<property
name="numeroMutation"
type="java.lang.Long"
column="NUMERO_MUTATION"
length="2"
/>
<property
name="idHoraireDiffuseur"
type="java.lang.Long"
column="ID_HORAIRE_DIFFUSEUR"
length="22"
/>
<property
name="idTypeDiffuseur"
type="java.lang.Long"
column="ID_TYPE_DIFFUSEUR"
length="22"
/>
<property
name="idTypeMagasin"
type="java.lang.Long"
column="ID_TYPE_MAGASIN"
length="22"
/>
<property
name="idCategorieTarifaire"
type="java.lang.Long"
column="ID_CATEGORIE_TARIFAIRE"
length="22"
/>
<property
name="idTypeCategoriePtv"
type="java.lang.Long"
column="ID_TYPE_CATEGORIE_PTV"
length="22"
/>
<property
name="idTypeSousCategoriePtv"
type="java.lang.Long"
column="ID_TYPE_SOUS_CATEGORIE_PTV"
length="22"
/>
<property
name="idChefRegion"
type="java.lang.Long"
column="ID_CHEF_REGION"
length="22"
/>
<property
name="idRepresentant"
type="java.lang.Long"
column="ID_REPRESENTANT"
length="22"
/>
<property
name="idLangue"
type="java.lang.Long"
column="ID_LANGUE"
length="22"
/>
<property
name="idRegion"
type="java.lang.Long"
column="ID_REGION"
length="22"
/>
<property
name="codePaysAs400"
type="java.lang.String"
column="CODE_PAYS_AS400"
length="2"
/>
<property
name="numeroRoutage"
type="java.lang.String"
column="NUMERO_ROUTAGE"
length="15"
/>
<property
name="numeroCasier"
type="java.lang.String"
column="NUMERO_CASIER"
length="15"
/>
<property
name="borneNumerique"
type="java.lang.Long"
column="BORNE_NUMERIQUE"
length="1"
/>
<property
name="idTypeStatutDiffuseur"
type="java.lang.Long"
column="ID_TYPE_STATUT_DIFFUSEUR"
length="22"
/>
<property
name="idEtatExport"
type="java.lang.Long"
column="ID_ETAT_EXPORT"
length="4"
/>
<property
name="changementDepotPrevu"
type="java.lang.Boolean"
column="CHANGEMENT_DEPOT_PREVU"
length="1"
/>
<property
name="dateCreation"
type="java.util.Date"
column="DATE_CREATION"
length="7"
/>
<property
name="dateModification"
type="java.util.Date"
column="DATE_MODIFICATION"
length="7"
/>
<property
name="dernierUtilisateur"
type="java.lang.String"
column="DERNIER_UTILISATEUR"
length="100"
/>
<property
name="etat"
type="java.lang.Boolean"
column="ETAT"
not-null="true"
length="1"
/>
<property
name="actif"
type="java.lang.String"
column="ACTIF"
length="1"
/>
<!-- Associations -->
<!-- bi-directional one-to-many association to CorrespondanceDiffuseur -->
<set
name="correspondanceDiffuseurs"
lazy="true"
inverse="true"
cascade="all"
>
<key>
<column name="ID_DIFFUSEUR" />
</key>
<one-to-many
class="org.ultimania.model.CorrespondanceDiffuseur"
/>
</set>
</class>
</hibernate-mapping>
and
?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.2
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="org.ultimania.model.CorrespondanceDiffuseur"
table="CORRESPONDANCE_DIFFUSEUR"
lazy="false"
>
<id
name="idCodeDiffuseur"
type="java.lang.Long"
column="ID_CODE_DIFFUSEUR"
>
<generator class="assigned" />
</id>
<property
name="idTypeCodeDiffuseur"
type="java.lang.Long"
column="ID_TYPE_CODE_DIFFUSEUR"
length="22"
/>
<property
name="codeDiffuseur"
type="java.lang.String"
column="CODE_DIFFUSEUR"
length="30"
/>
<property
name="typeAs400"
type="java.lang.String"
column="TYPE_AS400"
length="2"
/>
<property
name="dateCreation"
type="java.util.Date"
column="DATE_CREATION"
length="7"
/>
<property
name="dateModification"
type="java.util.Date"
column="DATE_MODIFICATION"
length="7"
/>
<property
name="dernierUtilisateur"
type="java.lang.String"
column="DERNIER_UTILISATEUR"
length="30"
/>
<property
name="etat"
type="java.lang.Boolean"
column="ETAT"
length="1"
/>
<!-- Associations -->
<!-- bi-directional many-to-one association to Diffuseur -->
<many-to-one
name="diffuseur"
class="org.ultimania.model.Diffuseur"
not-null="true"
>
<column name="ID_DIFFUSEUR" />
</many-to-one>
</class>
</hibernate-mapping>
how can i debug this problem of mapping ?
i use net.sf.hibernate.dialect.Oracle9Dialect as dialect.
Thank you for your help !