0

There are no errors, but during compilation, it shows "0000000000" and the error message "Uncompilable source code - Erroneous tree type: org.apache.jena.ontology.OntModel". I'm using JDK 17 and Jena 4.8.0. What could be the problem?

import org.apache.jena.ontology.*;
import org.apache.jena.rdf.model.*;
import javax.swing.*;
import java.awt.Color;

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        System.out.println("000000000000000");
     OntModel model= ModelFactory.createOntologyModel();
    System.out.println("111111111");
         String chemin="D:\\test.owl";
 try {
    model.read(chemin);
    System.out.println("Ontologie chargée avec succès.");
} catch (Exception e) {
    System.err.println("Erreur lors de la lecture de l'ontologie : " + e.getMessage());
    e.printStackTrace();
}
   System.out.println("2222222222");
        int Nb=model.listClasses().toList().size();
         System.out.println("33333333333");
      System.out.println( "Nombre de classes dans l'ontologie : " + Nb );
    
    }
Dharman
  • 30,962
  • 25
  • 85
  • 135
missa
  • 1
  • 1
  • Maybe this :: https://stackoverflow.com/questions/35662679/uncompilable-source-code-erroneous-tree-type-error-and-cannot-find-symbol-erro – AndyS May 22 '23 at 16:51
  • Does this answer your question? [Uncompilable source code - Erroneous tree type error and cannot find symbol error](https://stackoverflow.com/questions/35662679/uncompilable-source-code-erroneous-tree-type-error-and-cannot-find-symbol-erro) – Blue Robin May 25 '23 at 14:17

0 Answers0