Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

I'm trying to build a JPA application , but i am getting an error NoClassFound

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have set hibernate.cfg.xml in class path ie. this file is in the root folder "src" .

The persistence.xml is in src/META-INF folder which is also in the class path .

the jars which i have added are as follows
ejb3-persistence.jar,
ojdbc14.jar,
ant-antlr.jar,
asm.jar,
asm-attrs.jar,
cglib.jar,
commons-collections.jar,
commons-logging.jar,
dom4j.jar,
ehcache.jar,
hibernate-anottation.jar,
jta.jar,
hibernate-entitymanager.jar,
hibernate3.jar
log4j.jar,

this is my persistence.xml




this is my hibernate.cfg.xml



the main class is as follows



but i'm getting this error
run: Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/util/file/ArchiveBrowser$Filter at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34) at com.DO.JPAMain.main(JPAMain.java:28) Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds)


please help me out sir

 
reply
    Bookmark Topic Watch Topic
  • New Topic