Skip to content

Use standard list of model names in Execute SPARQL CONSTRUCT page - #517

Merged
chenejac merged 1 commit into
vivo-project:mainfrom
brianjlowe:bugfix/VIVO-4141
May 14, 2026
Merged

Use standard list of model names in Execute SPARQL CONSTRUCT page#517
chenejac merged 1 commit into
vivo-project:mainfrom
brianjlowe:bugfix/VIVO-4141

Conversation

@brianjlowe

Copy link
Copy Markdown
Member

VIVO4141:

  • Other Relevant Links (Mailing list discussion, related pull requests, etc.)

What does this pull request do?

Uses the same list of available model names in the Execute SPARQL CONSTRUCT page that is used in other ingest tool pages. Fixes current bug where only configuration models are offered as source and destination models on this page.

How should this be tested?

  1. Go to Site Admin > Ingest tools > Manage Jena Models .
  2. Click the "Main Store Models" button near the top. Note the models available in this list, such as "http://vitro.mannlib.cornell.edu/filegraph/tbox/ontologies.owl".
  3. Go to Site Admin > Ingest tools > Execute SPARQL CONSTRUCT.
  4. Note that these same models are offered under "Select Source Models" and "Select Destination Model".
  5. Return to Site Admin > Ingest tools > Manage Jena Models.
  6. Click "Configuration Models".
  7. Note that other models, such as "http://vitro.mannlib.cornell.edu/default/interface-i18n", are now listed.
  8. Return to Site Admin > Ingest tools > Execute SPARQL CONSTRUCT.
  9. Confirm that this new set of models is offered for source and destination models.

Interested parties

@VIVO-project/vivo-committers

Reviewers' report template

Please update the following template which should be used by reviewers.

General comment

A reviewer should provide here comments and suggestions for requested changes if any.

Testing

A reviewer should briefly describe here how it was tested

Code reviewing

A reviewer should briefly describe here which part was code reviewed

@chenejac chenejac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianjlowe thanks for the PR, looks good and works good. I will also ask Folke to confirm this is resolving his issue.

@chenejac
chenejac requested a review from meyerfo April 28, 2026 12:22
@meyerfo

meyerfo commented May 11, 2026

Copy link
Copy Markdown

The system was previously running VIVO 1.15.1 and a Solr container. I then replaced the VIVO container in the docker-compose file.
After the containers had successfully started, I received the following error message in the browser:


FATAL: SearchEngineSmokeTest
Threw unexpected exception
edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest

java.lang.RuntimeException: ESHttpClient wasn't initialized.
	at edu.cornell.mannlib.vitro.webapp.searchengine.elasticsearch.ESHttpClient.execute(ESHttpClient.java:50)
	at edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest.identifyService(SearchEngineSmokeTest.java:37)

`

How did i build the container:

  • downloaded VIVO 1.15.1 and Vitro (https://github.com/brianjlowe/Vitro/tree/bugfix/VIVO-4141) from Git.
    Afterwards, I executed the following commands in the VIVO folder.
  • mvn clean package -s installer/docker-example-settings.xml
  • docker build -t vivoweb4141/vivo .
  • docker compose up -d

Docker started without an error from the bash.

@chenejac

Copy link
Copy Markdown
Contributor

The system was previously running VIVO 1.15.1 and a Solr container. I then replaced the VIVO container in the docker-compose file. After the containers had successfully started, I received the following error message in the browser:

FATAL: SearchEngineSmokeTest Threw unexpected exception edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest

java.lang.RuntimeException: ESHttpClient wasn't initialized.
	at edu.cornell.mannlib.vitro.webapp.searchengine.elasticsearch.ESHttpClient.execute(ESHttpClient.java:50)
	at edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest.identifyService(SearchEngineSmokeTest.java:37)

`

How did i build the container:

  • downloaded VIVO 1.15.1 and Vitro (https://github.com/brianjlowe/Vitro/tree/bugfix/VIVO-4141) from Git.
    Afterwards, I executed the following commands in the VIVO folder.
  • mvn clean package -s installer/docker-example-settings.xml
  • docker build -t vivoweb4141/vivo .
  • docker compose up -d

Docker started without an error from the bash.

@litvinovg do you think this commit might be a solution for this issue? Should Brian cherry pick and add that commit on the PR branch

@litvinovg

Copy link
Copy Markdown
Member

The system was previously running VIVO 1.15.1 and a Solr container. I then replaced the VIVO container in the docker-compose file. After the containers had successfully started, I received the following error message in the browser:
FATAL: SearchEngineSmokeTest Threw unexpected exception edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest

java.lang.RuntimeException: ESHttpClient wasn't initialized.
	at edu.cornell.mannlib.vitro.webapp.searchengine.elasticsearch.ESHttpClient.execute(ESHttpClient.java:50)
	at edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest.identifyService(SearchEngineSmokeTest.java:37)

`

How did i build the container:

  • downloaded VIVO 1.15.1 and Vitro (https://github.com/brianjlowe/Vitro/tree/bugfix/VIVO-4141) from Git.
    Afterwards, I executed the following commands in the VIVO folder.
  • mvn clean package -s installer/docker-example-settings.xml
  • docker build -t vivoweb4141/vivo .
  • docker compose up -d

Docker started without an error from the bash.

@litvinovg do you think this commit might be a solution for this issue? Should Brian cherry pick and add that commit on the PR branch

Yes, rebasing current PR branch on top of main branch should solve the problem

@meyerfo

meyerfo commented May 12, 2026

Copy link
Copy Markdown
VIVO_CSV_Ingest_2026-05-12 The problem with the elastic search connection is solved. However, the problem with the "select source model" is not solved.

I checked the output from the mvn clean package command. There is the following eror.

Excerpt from: mvn clean package -s installer/ docker-example-settings.xml

ERROR 2026-05-12 07:30:27.551 [main] (IndividualListController) Error retrieving individuals corresponding to intersection multiple classes.[http://myVclass]
java.lang.RuntimeException: ContextModelAccessStub.getOntModelSelector() not implemented.
at stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ContextModelAccessStub.getOntModelSelector(ContextModelAccessStub.java:118)
at edu.cornell.mannlib.vitro.webapp.search.controller.SearchFiltering.readFilterConfigurations(SearchFiltering.java:262)
at edu.cornell.mannlib.vitro.webapp.search.controller.SearchFiltering.addDefaultFilters(SearchFiltering.java:361)
at edu.cornell.mannlib.vitro.webapp.controller.freemarker.IndividualListController.buildAndExecuteVClassQuery(IndividualListController.java:227)
at edu.cornell.mannlib.vitro.webapp.controller.freemarker.IndividualListController.buildAndExecuteVClassQuery(IndividualListController.java:192)
at edu.cornell.mannlib.vitro.webapp.controller.freemarker.IndividualListController.getResultsForVClassIntersections(IndividualListController.java:181)
at edu.cornell.mannlib.vitro.webapp.controller.json.JsonServlet.getSearchVClassIntersectionResults(JsonServlet.java:113)
at edu.cornell.mannlib.vitro.webapp.controller.json.JsonServlet.getSearchIndividualsByVClass(JsonServlet.java:92)
at edu.cornell.mannlib.vitro.webapp.controller.json.GetSearchIndividualsByVClass.process(GetSearchIndividualsByVClass.java:44)
at edu.cornell.mannlib.vitro.webapp.controller.json.JsonObjectProducer.process(JsonObjectProducer.java:52)

	there are more lines..

@brianjlowe

brianjlowe commented May 12, 2026

Copy link
Copy Markdown
Member Author

Thanks @meyerfo for trying again. The error stack trace during the unit tests looks to be irrelevant to this issue, but thank you for catching that. I've opened an issue: vivo-project/VIVO#4155. Can you confirm that the jenaIngest/sparqlConstruct.jsp file inside your running Docker container matches what's on the PR branch (e.g., no ModelMaker import on line 5)?

@meyerfo

meyerfo commented May 13, 2026

Copy link
Copy Markdown

This are the first 5 lines of the sparqlConstruct file. There is the import of the modelmaker.
`
<%-- $This file is distributed under the terms of the license in LICENSE$ --%>

<%@ page import="org.apache.jena.ontology.Individual"%>
<%@ page import="org.apache.jena.ontology.OntModel"%>
<%@ page import="org.apache.jena.rdf.model.ModelMaker"%>`

as discussed, the following branch was used:
git clone --single-branch https://github.com/brianjlowe/Vitro.git

@meyerfo meyerfo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chenejac
chenejac merged commit 50fc84a into vivo-project:main May 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants