odpi / egeria

Egeria core
https://egeria-project.org
Apache License 2.0
795 stars 259 forks source link

Canonical Glossary model test case - bad URI #5154

Closed planetf1 closed 3 years ago

planetf1 commented 3 years ago

If Jena 4 is used to build the canonical glossary model an error is seen:

17:49:43,262 [ERROR] org.odpi.openmetadata.archiveutilities.designmodels.owlcanonicalglossarymodel.TestOwlCanonicalGlossaryModelArchiveBuilder.testOpenMetadataArchiveLoad  Time elapsed: 1.886 s  <<< FAILURE!
org.apache.jena.riot.RiotException: Bad IRI: <http://egeria.odpi.org:egeriasample#> Code: 0/ILLEGAL_CHARACTER in PORT: The character violates the grammar rules for URIs/IRIs.
    at org.odpi.openmetadata.archiveutilities.designmodels.owlcanonicalglossarymodel.TestOwlCanonicalGlossaryModelArchiveBuilder.testOpenMetadataArchiveLoad(TestOwlCanonicalGlossaryModelArchiveBuilder.java:19)

This is caused by

      "@base": "http://egeria.odpi.org:egeriasample#",
      "egeriasample": "http://egeria.odpi.org:egeriasample#",

which is indeed valid, as 'egeriasample' is not a valid port (must be a number) in an IRI

Presume this is a typo and should have a / before it - with # being a valid ending.

cc: @davidradl

This seems to be additional checking performed by Jena 4. However we cannot move to Jena 4 since Java 11 is required, but this apparent bug is worth noting.

Will open a PR for review @davidradl

planetf1 commented 3 years ago

This was fixed in 1a4dd67ff70ec96e826fabbe2768d83eb52e29fa