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

  • SEARCH
  • Home
  • 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 8435739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:59:41+00:00 2026-06-10T06:59:41+00:00

I have a maven dependency for javaee Bibliothek. <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency>

  • 0

I have a maven dependency for javaee Bibliothek.

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>6.0</version>
    <scope>provided</scope>
</dependency>

I get the error in Eclipse in some classes.

java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/mail/MessagingException

I added javax.mail dependency.

<dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4.5</version>
</dependency>

It did not not work. Any Idea??

  • 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-10T06:59:43+00:00Added an answer on June 10, 2026 at 6:59 am

    It did not work because classes from javax/javaee-api/provided dependency are specially constructed. They are not usable runtime because implementation of methods is missing.

    Simply adding classes from javax.mail/mail/1.4.5 dependency to the classpath does not help, because classes from javax/javaee-api/provided are already there. Having javax.mail/mail/1.4.5 dependecy alone solves your problem, but most likely you also need other classes from javax/javaee-api/provided.

    What you can do is to get rid of javax/javaee-api/provided dependency and get these classes for example from the dependencies provided by target application server. You can use for example following:

       <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <version>1.0.0.Final</version>
            <type>pom</type>
            <scope>provided</scope>
         </dependency>
    

    Because scope is provided, it does not affect the artifact to be built. That’s why you can use this one also with other application servers than JBoss. It is same API as in your original dependency, but it contains normal classes.

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

Sidebar

Related Questions

I have the following maven dependency <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase</artifactId> <version>0.90.4</version> <type>test-jar</type> <scope>test</scope> </dependency> I
I have a maven dependency in my pom.xml as such: <dependency> <groupId>com.foo</groupId> <artifactId>Bar</artifactId> <version>1.2.3</version>
Colleagues have been touting the wonders of maven and its magical dependency stuff but
I have a Java program with Maven managing its dependencies. One of those dependency
I have a maven project that contains a certain api I need to use
I can unpack zip file via the maven-dependency plugin, but currently I have the
I have a multimodule maven project, when dependencymanagament tag is provided in parent pom,
I have a Maven project and added db4o as a dependency using this answer
I'm using Eclipse Indigo with the m2e Plugin (Version 1.0.1). I have two separate
I have a maven project with a snapshot dependency. How does maven know if

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.