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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:44:31+00:00 2026-06-03T01:44:31+00:00

I’m trying to infer data using Pellet, but my application always crashes during reasoning

  • 0

I’m trying to infer data using Pellet, but my application always crashes
during reasoning due to an “OutOfMemoryError: Java heap space”.

As suggested elsewhere I have already tried to increase heap size and
currently I am using these VM arguments: “-XX:MaxPermSize=256m
-Xmx6144m”. Furthermore I’ve to set ‘PelletOptions.USE_CONTINUOUS =
true’, but so far I was only able delays the crashs for some minutes.
(Longest run so far: 30 min.).

I am storing data in a Jena TDB triplestore. Its total size is 170 mb
and consists of 962117 statements. The ontology has been modelled in
Protege and there are no inconsistencies when reasoned with Hermit or
Fact++ (of course no data is present at that point). The statements I’d
like to infer have been modelled using equivalent classes (e.g.: A and
(hasX some X)), inverse properties (hasX <–> isXOf) and some transitive
properties. There are 55 classes: 14 root classes, 11 equivalent classes
(all subtype of one root class). At the moment instances of 14 classes
have been added to the tripestore.

I also used pellint to analyse my ontology, but I am not sure which
conclusions to draw from this result:

[Untyped classes]
- http://www.w3.org/2002/07/owl#AllDisjointClasses

[Untyped object roles]
- http://www.w3.org/2002/07/owl#topObjectPriority
- http://www.w3.org/2002/07/owl#members

[Untyped datatype roles]
- http://www.w3.org/2002/07/owl#qualifiedCardinality

[Untyped individuals]
- 4 BNodes

This is my code for creating the InfModel:

 Dataset dataset = TDBFactory.createDataset(..);
 Model model = dataset.getDefaultModel();

 OntModel ont = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC,model);
 ont.read("file:.." , "RDF/XML");

 PelletOptions.USE_CONTINUOUS_RULES = true;
 Reasoner reasoner = PelletReasonerFactory.theInstance().create();
 reasoner = reasoner.bindSchema(ont);

 InfModel infModel = infModel = ModelFactory.createInfModel(reasoner, model);

and this is essentially how I query the data:

 QueryExecution qe = QueryExecutionFactory.create("SELECT ...", infModel);
 Resultset rs = qe.execSelect();

 while(rs.hasNext())
 {
     QuerySolution sol = rs.nextSolution();
     ...
 }
 qe.close();

As you can see I have received various exceptions when either querying
data, preparing or validating an InfModel. Do you have any idea, what
else I could try to resolve this error?

 java.lang.OutOfMemoryError: Java heap space
 at java.util.Arrays.copyOf(Unknown Source)
 at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
 at java.lang.AbstractStringBuilder.append(Unknown Source)
 at java.lang.StringBuilder.append(Unknown Source)
 at java.net.URLStreamHandler.parseURL(Unknown Source)
 at sun.net.www.protocol.file.Handler.parseURL(Unknown Source)
 at java.net.URL.<init>(Unknown Source)
 at java.net.URL.<init>(Unknown Source)
 at sun.misc.URLClassPath$FileLoader.getResource(Unknown Source)
 at sun.misc.URLClassPath.getResource(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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorCheck.warn(QueryIteratorCheck.java:114)
 at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorCheck.dump(QueryIteratorCheck.java:95)
 at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorCheck.checkForOpenIterators(QueryIteratorCheck.java:68)
 at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorCheck.close(QueryIteratorCheck.java:50)
 at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.closeIterator(QueryIteratorWrapper.java:50)
 at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.close(QueryIteratorBase.java:184)
 at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorCloseable.close(QueryIteratorCloseable.java:39)
 at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.close(QueryExecutionBase.java:180)


 java.lang.OutOfMemoryError: Java heap space
 at shared.SharedObjectFactory.build(SharedObjectFactory.java:303)
 at aterm.pure.PureFactory.makeAppl(PureFactory.java:191)
 at aterm.pure.PureFactory.makeAppl(PureFactory.java:185)
 at aterm.pure.PureFactory.makeAppl(PureFactory.java:228)
 at org.mindswap.pellet.utils.ATermUtils.makeLiteral(ATermUtils.java:245)
 at org.mindswap.pellet.ABox.addLiteral(ABox.java:1696)
 at org.mindswap.pellet.tableau.completion.rule.SomeValuesRule.applySomeValuesRule(SomeValuesRule.java:174)
 at org.mindswap.pellet.tableau.completion.rule.SomeValuesRule.apply(SomeValuesRule.java:64)
 at org.mindswap.pellet.tableau.completion.rule.AbstractTableauRule.apply(AbstractTableauRule.java:64)
 at org.mindswap.pellet.tableau.completion.SROIQStrategy.complete(SROIQStrategy.java:157)
 at org.mindswap.pellet.ABox.isConsistent(ABox.java:1423)
 at org.mindswap.pellet.ABox.isConsistent(ABox.java:1260)
 at org.mindswap.pellet.KnowledgeBase.consistency(KnowledgeBase.java:1987)
 at org.mindswap.pellet.KnowledgeBase.isConsistent(KnowledgeBase.java:2061)
 at org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:247)
 at org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:230)
 at com.hp.hpl.jena.rdf.model.impl.InfModelImpl.prepare(InfModelImpl.java:89)


 java.lang.OutOfMemoryError: Java heap space
 at org.mindswap.pellet.tableau.branch.DisjunctionBranch.tryBranch(DisjunctionBranch.java:197)
 at org.mindswap.pellet.tableau.branch.Branch.tryNext(Branch.java:117)
 at org.mindswap.pellet.tableau.completion.rule.ChooseRule.apply(ChooseRule.java:82)
 at org.mindswap.pellet.tableau.completion.rule.ChooseRule.apply(ChooseRule.java:56)
 at org.mindswap.pellet.tableau.completion.rule.AbstractTableauRule.apply(AbstractTableauRule.java:64)
 at org.mindswap.pellet.tableau.completion.SROIQStrategy.complete(SROIQStrategy.java:157)
 at org.mindswap.pellet.ABox.isConsistent(ABox.java:1423)
 at org.mindswap.pellet.ABox.isConsistent(ABox.java:1260)
 at org.mindswap.pellet.KnowledgeBase.consistency(KnowledgeBase.java:1987)
 at org.mindswap.pellet.KnowledgeBase.isConsistent(KnowledgeBase.java:2061)
 at org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:247)
 at org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:230)
 at org.mindswap.pellet.jena.PelletInfGraph.validate(PelletInfGraph.java:564)
 at com.hp.hpl.jena.rdf.model.impl.InfModelImpl.validate(InfModelImpl.java:111)
  • 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-03T01:44:33+00:00Added an answer on June 3, 2026 at 1:44 am

    Querying against infModel apparently caused Pellet to generate hundreds of thoundands of owl:differentFrom statements. The solution was to use ModelExtractor:

    ModelExtractor ext = new ModelExtractor(inf); 
    Model m = ext.extractModel();
    QueryExecution qe = QueryExecutionFactory.create("SELECT ...", m);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to construct a data frame in an Rcpp function, but when I
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
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 want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
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.