-->
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: NoSuchMethod error when starting up with ecache
PostPosted: Fri Jan 09, 2004 10:11 am 
Newbie

Joined: Tue Sep 30, 2003 10:08 am
Posts: 7
Location: Turkey
Hello... I was working withouth any problems on WSAD 5.1 with Hibernate 2.1bx versions. However I lastly upgraded to 2.1.1 and decided to use a JVM level cache as well. (I've chosen ecache for that purpose).. However I cannot make it work. Here is what I've done:

----------------------------------------------------------------
I've placed the ecache.xml file to my classpath:
<?xml version="1.0" encoding="UTF-8"?>
<ehcache>
<cache name="iyte.oi.components.birimler.fakulte.model.FakulteDO"
maxElementInMemory="50"
eternal="true"/>
<cache name="iyte.oi.components.birimler.bolum.model.BolumDO"
maxElementInMemory="80"
eternal="true"/>
<cache name="iyte.oi.components.birimler.program.model.ProgramDO"
maxElementsInMemory="80"
eternal="true"/>
......
</ehcache>
-------------------------------------------------------------------

I've updated my hibernate-config.xml file as below...

<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory>
<!-- properties -->
<property name="connection.datasource">jdbc/OGRENCI</property>
<property name="dialect">net.sf.hibernate.dialect.DB2Dialect</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="hibernate.default_schema">OILISANS</property>
<property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.Provider</property>
<property name="hibernate.transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property>
<!-- mapping files -->
<mapping resource="Birimler.hbm.xml"/>
.....

--------------------------------------------------------------------------

I've changed my mapping definitions as shown below(added <cache usage> elements):

<class name="iyte.oi.components.birimler.fakulte.model.FakulteDO" table="FAKULTELER">
<cache usage="read-write"/>
<id name="id" column="ID" type="short">
<generator class="identity"/>
</id>
<property name="fakulteAd" column="FAKULTE_AD" type="string"/>
<property name="fakulteKod" column="FAKULTE_KOD" type="string"/>
<property name="ingFakulteAd" column="ING_FAKULTE_AD" type="string"/>
<set name="bolumler" inverse="true" lazy="true">
<key column="FAKULTE_ID"/>
<one-to-many class="iyte.oi.components.birimler.bolum.model.BolumDO"/>
</set>
</class>

--------------------------------------------------------------------------
I've added the following files that come with 2.1.1 distribution to my classpath:
cglib2, commons-collections, commons-lang, dom4j, ehcache, hibernate2, jta, log4j, odmg, xerces, xml-apis...

However, while initializing session factory I get the following error:

[09.01.2004 15:49:55:984 EET] 267d267d Configuration I net.sf.hibernate.cfg.Configuration processing one-to-one association property references

[09.01.2004 15:49:55:984 EET] 267d267d Configuration I net.sf.hibernate.cfg.Configuration processing foreign key constraints

[09.01.2004 15:49:56:140 EET] 267d267d Dialect I net.sf.hibernate.dialect.Dialect Using dialect: net.sf.hibernate.dialect.DB2Dialect

[09.01.2004 15:49:56:156 EET] 267d267d SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use outer join fetching: true

[09.01.2004 15:49:56:187 EET] 267d267d NamingHelper I net.sf.hibernate.util.NamingHelper JNDI InitialContext properties:{}

[09.01.2004 15:49:56:218 EET] 267d267d ConnectionFac I J2CA0122I: Resource reference jdbc/OGRENCI 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)


[09.01.2004 15:49:56:218 EET] 267d267d DatasourceCon I net.sf.hibernate.connection.DatasourceConnectionProvider Using datasource: jdbc/OGRENCI

[09.01.2004 15:49:56:375 EET] 267d267d TransactionMa I net.sf.hibernate.transaction.TransactionManagerLookupFactory instantiating TransactionManagerLookup: net.sf.hibernate.transaction.WebSphereTransactionManagerLookup

[09.01.2004 15:49:56:390 EET] 267d267d TransactionMa I net.sf.hibernate.transaction.TransactionManagerLookupFactory instantiated TransactionManagerLookup

[09.01.2004 15:49:56:875 EET] 267d267d WSRdbDataSour u Database version is
07.02.0005
[09.01.2004 15:49:56:890 EET] 267d267d WSRdbDataSour u JDBC Driver version is
07.02.0005


[09.01.2004 15:49:57:125 EET] 267d267d SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use scrollable result sets: true

[09.01.2004 15:49:57:125 EET] 267d267d SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Default schema set to: OILISANS

[09.01.2004 15:49:57:125 EET] 267d267d SettingsFacto I net.sf.hibernate.cfg.SettingsFactory echoing all SQL to stdout

[09.01.2004 15:49:57:125 EET] 267d267d SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Query language substitutions: {}

[09.01.2004 15:49:57:140 EET] 267d267d SettingsFacto I net.sf.hibernate.cfg.SettingsFactory cache provider:
net.sf.ehcache.hibernate.Provider

[09.01.2004 15:49:57:187 EET] 267d267d Configuration I net.sf.hibernate.cfg.Configuration instantiating and configuring caches

[09.01.2004 15:49:57:296 EET] 267d267d SystemErr R java.lang.NoSuchMethodError: java/lang/Exception.<init>(Ljava/lang/String;Ljava/lang/Throwable;)V

[09.01.2004 15:49:57:343 EET] 267d267d SystemErr R at java.lang.Throwable.<init>(Throwable.java)

[09.01.2004 15:49:57:343 EET] 267d267d SystemErr R at java.lang.Throwable.<init>(Throwable.java)

[09.01.2004 15:49:57:343 EET] 267d267d SystemErr R at java.lang.NoSuchMethodError.<init>(NoSuchMethodError.java:56)

[09.01.2004 15:49:57:343 EET] 267d267d SystemErr R at net.sf.ehcache.CacheException.<init>(CacheException.java:97)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.ehcache.CacheManager.configure(CacheManager.java:156)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.ehcache.CacheManager.<init>(CacheManager.java:127)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.ehcache.CacheManager.create(CacheManager.java:179)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:195)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.ehcache.hibernate.Plugin.<init>(Plugin.java:92)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.ehcache.hibernate.Provider.buildCache(Provider.java:89)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.hibernate.cfg.Configuration.configureCaches
(Configuration.java:1067)

[09.01.2004 15:49:57:390 EET] 267d267d SystemErr R at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:738)
.................


Can anyone please help me on this?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 10, 2004 10:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try using the latest ehcache version (0.7) and be sure to have no old jars on your classpath.


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.