Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1039

Race condition on OWL.java class constructor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Jena 3.0.1
    • Fix Version/s: Jena 3.0.1
    • Component/s: ARQ, Core
    • Labels:
      None
    • Environment:

      Description

      latest master (fa26eefe0f55ae26cde88e7a4945bc9349a7e5f5) fails mvn clean install on jena-arq:

      [INFO] Compiling 284 source files to /home/stain/src/jena/jena-arq/target/test-classes
      [WARNING] /home/stain/src/jena/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestGraphUnionRead.java: /home/stain/src/jena/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestGraphUnionRead.java 
      uses unchecked or unsafe operations.
      [WARNING] /home/stain/src/jena/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestGraphUnionRead.java: Recompile with -Xlint:unchecked for details.
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.17:test (default-test) @ jena-arq ---
      [INFO] Surefire report directory: /home/stain/src/jena/jena-arq/target/surefire-reports
      
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running org.apache.jena.sparql.TC_Scripted
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.495 sec <<< FAILURE! - in org.apache.jena.sparql.TC_Scripted
      initializationError(org.apache.jena.sparql.TC_Scripted)  Time elapsed: 0.006 sec  <<< ERROR!
      java.lang.ExceptionInInitializerError: null
              at org.apache.jena.ontology.ProfileRegistry.<clinit>(ProfileRegistry.java:43)
              at org.apache.jena.ontology.OntModelSpec.<clinit>(OntModelSpec.java:49)
              at org.apache.jena.assembler.assemblers.OntModelAssembler.<clinit>(OntModelAssembler.java:56)
              at org.apache.jena.assembler.ConstAssembler.ontModel(ConstAssembler.java:59)
              at org.apache.jena.assembler.ConstAssembler.general(ConstAssembler.java:147)
              at org.apache.jena.sparql.core.assembler.AssemblerUtils.init(AssemblerUtils.java:59)
              at org.apache.jena.query.ARQ.init(ARQ.java:567)
              at org.apache.jena.sparql.system.InitARQ.start(InitARQ.java:29)
              at org.apache.jena.system.JenaSystem.lambda$init$44(JenaSystem.java:113)
              at org.apache.jena.system.JenaSystem$$Lambda$4/1415157681.accept(Unknown Source)
              at java.util.ArrayList.forEach(ArrayList.java:1249)
              at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:178)
              at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:155)
              at org.apache.jena.system.JenaSystem.init(JenaSystem.java:110)
              at org.apache.jena.rdf.model.ModelFactory.<clinit>(ModelFactory.java:49)
              at org.apache.jena.vocabulary.OWL.<clinit>(OWL.java:36)
              at org.apache.jena.sparql.graph.NodeConst.<clinit>(NodeConst.java:45)
              at org.apache.jena.sparql.expr.NodeValue.<clinit>(NodeValue.java:126)
              at org.apache.jena.sparql.TC_Scripted.<init>(TC_Scripted.java:40)
              at org.apache.jena.sparql.TC_Scripted.suite(TC_Scripted.java:30)
      
      
      Running org.apache.jena.sparql.resultset.TS_ResultSet
      Tests run: 77, Failures: 0, Errors: 36, Skipped: 0, Time elapsed: 0.186 sec <<< FAILURE! - in org.apache.jena.sparql.resultset.TS_ResultSet
      test_RS_1(org.apache.jena.sparql.resultset.TestResultSet)  Time elapsed: 0.02 sec  <<< ERROR!
      java.lang.NoClassDefFoundError: Could not initialize class org.apache.jena.rdf.model.ModelFactory
              at org.apache.jena.sparql.graph.GraphFactory.makeJenaDefaultModel(GraphFactory.java:72)
              at org.apache.jena.sparql.resultset.XMLInputStAX.worker(XMLInputStAX.java:143)
              at org.apache.jena.sparql.resultset.XMLInputStAX.<init>(XMLInputStAX.java:104)
              at org.apache.jena.sparql.resultset.XMLInput.make(XMLInput.java:81)
              at org.apache.jena.sparql.resultset.XMLInput.fromXML(XMLInput.java:39)
              at org.apache.jena.sparql.resultset.XMLInput.fromXML(XMLInput.java:34)
              at org.apache.jena.query.ResultSetFactory.fromXML(ResultSetFactory.java:308)
              at org.apache.jena.sparql.resultset.TestResultSet.test_RS_1(TestResultSet.java:74)
      

      Every test in jena-arq fails with a similar java.lang.NoClassDefFoundError:

      I assume this is caused by the initial ExceptionInInitializerError from (ProfileRegistry - relating to the recent JenaSystem.init() change

      (jena-arq builds fine on 3.0.0 tag)

        Attachments

          Activity

            People

            • Assignee:
              andy Andy Seaborne
              Reporter:
              stain Stian Soiland-Reyes
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: