Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6029547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:54:09+00:00 2026-05-23T04:54:09+00:00

I am working on a JavaEE6 application using Netbeans 7, Glassfish 3.1. The application

  • 0

I am working on a JavaEE6 application using Netbeans 7, Glassfish 3.1.

The application works fine and is getting deployed on GlassFish. But the issue is that when i am setting Hibernate as the provider in the persistence.xml, i get the following exception:

INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
SEVERE: Exception while preparing the app
SEVERE: org/dom4j/Element
java.lang.NoClassDefFoundError: org/dom4j/Element
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
   at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:205)
   at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:119)
   at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:213)
   at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:486)
   at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:220)
   at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:166)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870)
   at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
   at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:364)
   at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:208)
   at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
   at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
   at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
   at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
   at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
   at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
   at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:243)
   at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:135)
   at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
   at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
   at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)

Here is my persistence.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="EntAppEJB-ejbPU" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>schema</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
     <properties>
      <property name="hibernate.search.default.indexBase" value="/tmp"/>
    </properties>
  </persistence-unit>
</persistence>

These are the jar files which i have included in the project:

hibernate3.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
javassist-3.12.0.GA.jar
jta-1.1.jar
slf4j-api-1.6.1
slf4j-simple-1.6.1
hibernate-search-3.4.0.Final.jar
commons-lang-2.4
hibernate-commons-annotations-3.2.0.Final.jar
hibernate-core-3.6.3.Final.jar
lucene-core-3.1.0.jar

What am i missing here? Any suggestions are most welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:54:10+00:00Added an answer on May 23, 2026 at 4:54 am

    You don’t have the DOM4J JAR in the CLASSPATH. Check the package you deployed to see if it’s in the WEB-INF/lib of the WAR file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Java EE web application is working fine with Glassfish 2.1. Now I want
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I have a Java EE 6 Wicket application deployed with maven using IntelliJ IDEA
I've read: Expression Language in JSP not working but it's slightly different. Using EL
i'm working on a very simple server that uses ssl (in netbeans) - to
Using Netbeans I'm setting up a MVC-powered website on localhost. I've set up the
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project that parses a log of events, and then updates a
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
Working on some matrix code, I'm concerned of performance issues. here's how it works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.