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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:26:28+00:00 2026-06-02T00:26:28+00:00

I have a Java Maven project that I developed a while ago and that

  • 0

I have a Java Maven project that I developed a while ago and that doesn’t work anymore. It uses a parent pom together with another Maven project in which I think the Jena version was changed and it also uses an external library that uses Jena. The Maven dependency is:

<dependency>
 <groupId>com.hp.hpl.jena</groupId>
 <artifactId>jena</artifactId>
 <version>2.6.4</version>
</dependency>

When I execute my tests I get the following errors:

  • java.lang.NoClassDefFoundError: Could not initialize class
    com.hp.hpl.jena.query.ARQ
  • java.lang.NoClassDefFoundError: org/apache/jena/iri/IRIFactory
    at org.openjena.riot.system.PrefixMap.add(PrefixMap.java:54)
    at com.hp.hpl.jena.sparql.util.MappingRegistry.addPrefixMapping(MappingRegistry.java:33)
    at com.hp.hpl.jena.query.ARQ.init(ARQ.java:449) […]

The errors are not thrown by my code directly but by the library I include. Can I prevent this by downgrading the Jena version in the parent pom or what can I do here?

P.S.: I now have a minimal code example that reproduces the error (java.lang.NoClassDefFoundError: org/apache/jena/iri/IRIFactory):

import org.junit.Test;
import com.hp.hpl.jena.query.ARQ;

public class DependencyTest
{
    @Test
    public void testARQ()
    {
        ARQ a = new ARQ();      
    }   
}

And I guess it comes from this dependency:

<dependency>
  <groupId>org.apache.jena</groupId>
  <artifactId>jena-arq</artifactId>
  <version>2.9.1-incubating-SNAPSHOT</version>
</dependency>

I know there is probably a factory instead of a constructor but I guess this still shows where the problem is.

P.S.: I noticed that I had the dependencies “jena”, “arq” and “jena-arq”:

<dependency>
 <groupId>com.hp.hpl.jena</groupId>
 <artifactId>arq</artifactId>
 <version>2.8.8</version>
</dependency>

<dependency>
 <groupId>org.apache.jena</groupId>
 <artifactId>jena-arq</artifactId>
 <version>2.9.1-incubating-SNAPSHOT</version>
</dependency>

 dependency>
 <groupId>com.hp.hpl.jena</groupId>
 <artifactId>jena</artifactId>
 <version>2.6.4</version>
</dependency>

So I thought maybe I have too much overlapping dependencies and commented out “jena” and “arq”. But I still get the error

java.lang.NoClassDefFoundError: Could not initialize class com.hp.hpl.jena.query.ARQ
    at com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.<init> [...]

I also tried out forcing a non-snapshot-version 2.9.0-incubating, but then I still get the NoClassDefFoundError with and without using the “jena” and “arq”-dependencies.

P.P.S.:

I still get the same error even when I use the following dependencies:

 <dependency>
  <groupId>org.apache.jena</groupId>
  <artifactId>jena-arq</artifactId>
 <version>2.9.0-incubating</version>
</dependency>

<dependency>
  <groupId>org.apache.jena</groupId>
  <artifactId>jena-core</artifactId>
 <version>2.7.0-incubating</version>
</dependency>

<dependency>
  <groupId>org.apache.jena</groupId>
  <artifactId>jena-iri</artifactId>
 <version>2.7.0-incubating</version>
</dependency>
  • 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-02T00:26:29+00:00Added an answer on June 2, 2026 at 12:26 am

    I finally resolved this error by excluding the “jena”-Dependency brought in as a transitive dependency from some library.

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

Sidebar

Related Questions

I have a java/maven project that uses tango icons, so I'm using the following
I have a Java application that is managed using Maven. The project involves the
I have a Java multi-module Maven project that I want to build an MVN
I have java project that depends from other java projects. These projects are maven
I have a multi-module Maven project that is a Java web application. I am
I have two Eclipse Maven Java projects. A domain project that is laden with
I have a Maven-managed project that uses Mockito mocking in its unit tests. I
I have one parent parent maven project that defines dependencies. Then I have my
I have a project that uses the normal Maven structure, e.g. module \ src
I have a Java Maven project which is developed by multiple people. As I

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.