Troubleshooting¶
Common problems and fixes for OntoCode (VS Code) and OntoIndex (CLI/LSP).
For quick answers, see also FAQ.
VS Code: explorer empty or stale¶
- Run OntoCode: Index Workspace from the Command Palette.
- Check View → Output → OntoIndex Language Server for errors.
- Confirm the folder contains supported files (
.ttl,.owl,.rdf,.jsonld,.nt,.nq,.trig). - Multi-root workspace: only the first folder is indexed — open the ontology project as a single-root folder or put it first.
VS Code: language server failed to start¶
- Trust the workspace (Restricted Mode blocks custom
ontocode.lspPath). - Uninstall duplicate OntoCode extension versions.
- Check Output → OntoIndex Language Server for the exact error.
- Set
ontocode.lspPathto a localontoindex-lspbinary (cargo install ontoindex-lsp) — trusted workspaces only. - See Install VS Code.
VS Code: cannot edit in inspector¶
- Write-back is Turtle (
.ttl) only. RDF/XML, OWL XML, and JSON-LD are read-only in the inspector. - Entity must be declared in an indexed
.ttlfile in the workspace.
VS Code: patch or Manchester apply did not stick¶
Patches apply to the open editor buffer first, then disk:
- If you have unsaved edits, the patch merges into the buffer — save or review the buffer content.
- If re-index fails after a successful write, the LSP may return
APPLIED_NOT_INDEXED— file/buffer updated but catalog stale. Run Index Workspace. - Check Output → OntoIndex Language Server and errors reference.
CLI: ontoindex query ./fixtures fails¶
The fixtures/ directory exists only in a git clone, not after cargo install:
ontoindex query /path/to/your/ontologies "SELECT * FROM classes"
CLI: validate exits non-zero¶
Exit code 0 only when there are no diagnostic errors (warnings are allowed). Query errors:
ontoindex query /path/to/ontologies "SELECT code, severity, message FROM diagnostics WHERE severity = 'error'"
See CI integration.
Queries return no rows or wrong data¶
- Re-index:
ontoindex validateor VS Code Index Workspace. - Confirm SQL table name and column names — SQL reference.
- SPARQL runs over indexed triples — prefix declarations must be valid in source files.
Results truncated at 100,000 rows¶
Both SQL and SPARQL cap results at 100,000 rows with silent truncation. In the Query Workbench or LSP responses, check truncated: true. Narrow your query with WHERE or SPARQL LIMIT.
See workspace limits.
Patch JSON errors¶
| Symptom | Likely cause |
|---|---|
entity not found |
Wrong IRI or entity not in target .ttl file; check @prefix declarations |
unsupported format |
Patch target is not Turtle (.ttl) |
applied: false with diagnostics |
Invalid patch op or Manchester expression — see patch reference |
Workspace too large¶
Indexing may fail above workspace limits (file count, size, triple caps). For very large terminologies, use CLI batch workflows on a subset.
Graphs, OBO, and ROBOT¶
| Problem | What to try |
|---|---|
| Graph commands missing | Run Index Workspace first — Graph guide |
Cannot edit .obo in inspector |
OBO is read-only in VS Code; use Turtle write-back or external tools — OBO guide |
robot not found |
Install Java + ROBOT; set ontocode.robotPath — ROBOT guide |
Reasoner¶
| Problem | What to try |
|---|---|
dl or auto profile fails |
Full DL requires OntoLogos 1.0 — use el, rl, or rdfs |
| Inferred hierarchy not visible | Run OntoCode: Run Reasoner, then Set Hierarchy Mode → inferred or combined |
| Explanation panel empty | Explanations need an unsatisfiable class; run reasoner first |
| Classify exits non-zero in CI | Ontology has unsatisfiable classes — inspect JSON unsatisfiable list |
See Reasoner guide.