Hello,
I am trying to get hibernate at work using one table and trying to insert records, but I cannot get around the error
"java.lang.NoSuchMethodError: net.sf.hibernate.persister.AbstractEntityPersister: method getTableName()Ljava/lang/String"
weblogic server 6.1 sp 3
Oracle 8.1.7
hibernate 2.1
I defined a datasource in the weblogic server (hibtestDatasource) and got the logging at work; this datasource works as I have already tested it using entity beans.
In my console the following messages are logged (see below)
I already have rebuild hibernate2.jar using build.xml (java 1.3.1_02)
I changed use_outer_join to false as done by some messages on this forum
I changed Oracle9Dialect to OracleDialect
Any hint would be welcome; I would really like to use hibernate for my next project; the test is based on the basic sample in the documentation (getting started);
the content of hibernate.cfg.xml and cat.hbm.xml are listed below
Thanks in advance,
Jan
log:
17:23:38,375 INFO Environment:432 - Hibernate 2.1.1
17:23:38,406 INFO Environment:461 - hibernate.properties not found
17:23:38,437 INFO Environment:481 - using CGLIB reflection optimizer
17:23:38,468 INFO Environment:504 - JVM does not support LinkedHasMap, LinkedHashSet - ordered maps and sets disabled
17:23:38,500 INFO Environment:507 - using workaround for JVM bug in java.sql.Timestamp
17:23:38,546 INFO Configuration:843 - configuring from resource: /hibernate.cfg.xml
17:23:38,562 INFO Configuration:815 - Configuration resource: /hibernate.cfg.xml
17:23:38,843 INFO Configuration:300 - Mapping resource: cat.hbm.xml
17:23:39,203 INFO Binder:225 - Mapping class: eu.cec.admin.hibtest.services.person.Person -> EPES_PERSONNES
17:23:39,406 INFO Configuration:998 - Configured SessionFactory: null
17:23:39,437 INFO Configuration:584 - processing one-to-many association mappings
17:23:39,468 INFO Configuration:593 - processing one-to-one association property references
17:23:39,500 INFO Configuration:618 - processing foreign key constraints
17:23:39,578 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.OracleDialect
17:23:39,625 INFO SettingsFactory:62 - Use outer join fetching: false
17:23:39,703 INFO NamingHelper:26 - JNDI InitialContext properties:{}
17:23:39,750 INFO DatasourceConnectionProvider:51 - Using datasource: hibtestDatasource
17:23:39,796 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
17:23:39,828 INFO SettingsFactory:89 - Use scrollable result sets: true
17:23:39,859 INFO SettingsFactory:90 - JDBC 2 max batch size: 15
17:23:39,890 INFO SettingsFactory:99 - Query language substitutions: {}
17:23:39,921 INFO SettingsFactory:110 - cache provider: net.sf.ehcache.hibernate.Provider
17:23:39,968 INFO Configuration:1057 - instantiating and configuring caches
17:23:40,203 INFO SessionFactoryImpl:119 - building session factory
<01-janv.-04 17:23:40 PST> <Info> <EJB> <EJB Exception during invocation from home: eu.cec.admin.hibtest.services.person.PersonServiceEJB_4rqufb_HomeImpl@ff037886 threw exception: java.lang.NoSuchMethodError: net.sf.hibernate.persister.AbstractEntityPersister: method getTableName()Ljava/lang/String;
not found
java.lang.NoSuchMethodError: net.sf.hibernate.persister.AbstractEntityPersister: method getTableName()Ljava/lang/String; not found
at net.sf.hibernate.persister.AbstractEntityPersister.generateSelectVersionString(AbstractEntityPersister.java:1256)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:878)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:739)
at eu.cec.admin.hibtest.util.HibernateUtil.<clinit>(HibernateUtil.java:20)
at eu.cec.admin.hibtest.services.person.PersonServiceEJB.createHibernatePerson(PersonServiceEJB.java:92)
at eu.cec.admin.hibtest.services.person.PersonServiceEJB_4rqufb_EOImpl.createHibernatePerson(PersonServiceEJB_4rqufb_EOImpl.java:37)
at eu.cec.admin.hibtest.services.person.PersonServiceEJB_4rqufb_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
hibernate.cfg.xml:
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">hibtestDatasource</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>
<property name="use_outer_join">false</property>
<!-- Mapping files -->
<mapping resource="cat.hbm.xml"/>
</session-factory>
</hibernate-configuration>
cat.hbm.xml:
<hibernate-mapping>
<class name="eu.cec.admin.hibtest.services.person.Person" table="EPES_PERSONNES">
<id name="id" type="long" unsaved-value="null" >
<column name="ID" sql-type="NUMBER" not-null="true"/>
<generator class="sequence">
<param name="sequence">epes_sequence</param>
</generator>
</id>
<!-- A cat has to have a name, but it shouldn' be too long. -->
<property name="nom_usuel">
<column name="NOM_USUEL" sql-type="varchar2(100)" not-null="true"/>
</property>
<property name="prenom">
<column name="PRENOM" sql-type="varchar2(50)" not-null="true"/>
</property>
</class>
</hibernate-mapping>
|