-->
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.  [ 3 posts ] 
Author Message
 Post subject: Help! NoSuchMethodError
PostPosted: Mon Feb 27, 2012 1:03 pm 
Newbie

Joined: Wed Jul 25, 2007 7:46 am
Posts: 4
Hi, I have an application I am trying to put on a new clean computer (Windows 7 64 bit). I wrote this application years ago so I am still using hibernate 3. I've done a fresh install of Java and Mysql but I and having problems with Hibernate. After trying 4 different distributions I'm afraid I and out of ideas on how to get past my problem. Below is the output from hibernate logging, any help would be greatly appredciated

0 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
16 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
16 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassis
t
16 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp
handling
78 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource:
com/RadioCity/Jukebox/Api/Album.hbm.xml
78 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource:
com/RadioCity/Jukebox/Api/Album.hbm.xml
250 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.RadioCity.Jukeb
ox.Api.Album -> album
265 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: com.RadioCity.
Jukebox.Api.Album.songs -> songmap
265 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.RadioCity.Jukeb
ox.Api.Song -> song
281 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.RadioCity.Jukeb
ox.Api.SongMap -> songmap
281 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.RadioCity.Jukeb
ox.Api.PlayList -> playlist
281 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.RadioCity.Jukeb
ox.Api.PlayListMap -> playlistmap
281 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.RadioCity.Jukeb
ox.Api.AlbumIds -> album
281 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.RadioCity.Jukeb
ox.Api.SongIds -> song
328 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using
Hibernate built-in connection pool (not for production use!)
328 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hiber
nate connection pool size: 20
328 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autoc
ommit mode: false
343 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using
driver: com.mysql.jdbc.Driver at URL: jdbc:mysql:///jukebox
343 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - conne
ction properties: {user=root, password=****}
593 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.5.2
1
593 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL-AB JDBC D
river, version: mysql-connector-java-5.1.18 ( Revision: tonci.grgin@oracle.com-2
0110930151701-jfj14ddfq48ifkfq )
609 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dia
lect.MySQLMyISAMDialect
624 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using defa
ult transaction strategy (direct JDBC transactions)
624 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No T
ransactionManagerLookup configured (in JTA environment, use of read-write or tra
nsactional second-level cache is not recommended)
624 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during befor
eCompletion(): disabled
624 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at e
nd of transaction: disabled
624 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
624 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versi
oned data: disabled
624 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enab
led
640 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): en
abled
640 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: aut
o
640 [main] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch dep
th: 2
640 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
640 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments:
disabled
640 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary
key: disabled
640 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batchi
ng: disabled
640 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibern
ate.hql.ast.ASTQueryTranslatorFactory
655 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQuery
TranslatorFactory
655 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions
: {}
655 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: di
sabled
655 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
655 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
655 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.h
ibernate.cache.impl.NoCachingRegionFactory
655 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal p
uts: disabled
655 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cach
e entries: disabled
671 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
671 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic ide
ntifier rollback: disabled
671 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
671 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabl
ed
702 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory

889 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding fac
tory to JNDI, no JNDI name configured
Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.SessionFac
tory.openSession()Lorg/hibernate/Session;
at com.RadioCity.Jukebox.UI.Jukebox.getAlbums(Unknown Source)
at com.RadioCity.Jukebox.UI.Jukebox.addComponentsToPane(Unknown Source)
at com.RadioCity.Jukebox.UI.Jukebox.createAndShowGUI(Unknown Source)
at com.RadioCity.Jukebox.UI.Jukebox.main(Unknown Source)


Top
 Profile  
 
 Post subject: Re: Help! NoSuchMethodError
PostPosted: Tue Feb 28, 2012 4:48 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hi jpsb,

do you have the source-code of com.RadioCity.Jukebox.UI.Jukebox.class ?
com.RadioCity.Jukebox.UI.Jukebox was compiled with another version of hibernate than you are using now.

I think, you compiled com.RadioCity.Jukebox.UI.Jukebox with a hiberante-version where
method org.hibernate.SessionFactory.openSession() returned a org.hibernate.Session
whilst the hiberante-version you are using now (3.3.2.GA) returns a org.hibernate.classic.Session


Solutions:
a) If you have the source-code of com.RadioCity.Jukebox.UI.Jukebox, then change it in manner that it compiles with Hibernate 3.3.2.GA
b) Otherwise you must turn back to the hibernate version which you used to compile com.RadioCity.Jukebox.UI.Jukebox


Top
 Profile  
 
 Post subject: Re: Help! NoSuchMethodError
PostPosted: Tue Feb 28, 2012 9:43 am 
Newbie

Joined: Wed Jul 25, 2007 7:46 am
Posts: 4
Thank you very much recompiling all the source code did the trick, I should have thought of that. Oh well, thanks again. Now if I can get the logging to only log on WARN I will be very happy.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.