This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rahul Shivsharan
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • 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

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic