• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.IllegalAccessError

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have not been able to build the hibernate SessionFactory from
hibernate.cfg.xml file using the code
sessionFactory = cfg.configure().buildSessionFactory();
since the hibernate.cfg.xml not found error occired.
what I did was tried changing the above code to
sessionFactory = cfg.buildSessionFactory();
for reading from the hibernate.properties file.
I have all hibernate2.jar and 3rd party jar files in my classpath, but I am still getting the error as :
231 [main] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/j2sdk1.4.2_10/jre/lib/ext/ehcache-0.9
.jar!/ehcache-failsafe.xml
Exception in thread "main" java.lang.IllegalAccessError
at net.sf.cglib.core.ClassEmitter.setTarget(ClassEmitter.java:47)
at net.sf.cglib.core.ClassEmitter.<init>(ClassEmitter.java:39)
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:237)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:805)
at de.laliluna.example.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:55)
at de.laliluna.example.TestClient.createHoney(TestClient.java:48)
at de.laliluna.example.TestClient.main(TestClient.java:26)

<br>
Can some on help me on this
Thanks in Advance
Danny Rebello
 
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic