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 8079987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:16:53+00:00 2026-06-05T16:16:53+00:00

I’m attempting to build a JSF/Hibernate application using Java 7 and Tomcat 7. I

  • 0

I’m attempting to build a JSF/Hibernate application using Java 7 and Tomcat 7. I have installed the Java SDK and the JavaEE SDK, and copied the javaee.jar and javaee-api-6.jar into my Tomcat LIB folder. By my understanding of this post and this post I should have all of the jars I need, and to the best of my knowledge I have no other jars in this folder that have conflicting resources.

  • The javaee.jar file contains what looks like a Maven pom file, and nothing else. I’m not sure what its value is.

  • My javaee-api-6 jar is about 950k in size, and contains all of the .class files I would expect it to. The code I’m using compiles fine, I only see an error when attempting to deploy to Tomcat. These jars were taken from a glassfish installation. Curiously the file ServletException.class file is only 366 bytes.

  • I’ve set up Tomcat in Eclipse such that the IDE will ‘take over’ Tomcat when deploying, instead of deploying to some plug-in folder (default behavior).

  • The only relevant packages I’m using thusfar are ‘Entity’ ‘Id’ and ‘GeneratedValue’ from javax.persistence.

  • I’ve tried using only javaee-api-6.jar and renamed it javaee-api.jar and javaee.jar with no change. The filename it seems, is unimportant.

A deeper inspection of the Glassfish lib folder does show a number of relevant-looking jars, but not the complete javaee package, so I cant move the Javaee-api-6.jar out and move them in, they’re incomplete and I get a similar error indicating (I’m assuming) that the implementation of some class can’t be found.

So my question is: What do I need to include in Tomcat 7 to get javax.persistence working correctly ?

java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/ServletException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at org.apache.tomcat.util.IntrospectionUtils.findMethods(IntrospectionUtils.java:713)
at org.apache.tomcat.util.IntrospectionUtils.setProperty(IntrospectionUtils.java:272)
at org.apache.tomcat.util.IntrospectionUtils.setProperty(IntrospectionUtils.java:261)
at org.apache.tomcat.util.digester.SetPropertiesRule.begin(SetPropertiesRule.java:215)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1282)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)
at org.apache.catalina.startup.Catalina.load(Catalina.java:554)
at org.apache.catalina.startup.Catalina.load(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:262)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)
  • 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-06-05T16:16:55+00:00Added an answer on June 5, 2026 at 4:16 pm

    What do I need to include in Tomcat 7 to get javax.persistence working correctly ?

    Not the Java EE SDK download from Oracle. It basically contains the Oracle Glassfish server. You seem to be misunderstanding what exactly Java EE is.

    • What exactly is Java EE?

    I strongly recommend to undo all changes you made in Tomcat while trying to morph it into a Glassfish server. Or, better, restart from scratch.

    You should be choosing a concrete JPA implementation and installing it instead. There are several:

    • Hibernate
    • EclipseLink
    • OpenJPA

    Each comes with a download link and decent documentation. Hibernate is the most popular. EclipseLink is the reference implementation (and thus the one used under the covers in Glassfish). OpenJPA is just another one from the Apache Software Foundation. Ultimately it’s matter of dropping the JAR file(s) of the concrete JPA implementation in /WEB-INF/lib of the webapp (and thus not Tomcat’s /lib).

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

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

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.