Problem importing an OWL file to an Ontolex project

64 views
Skip to first unread message

Pedro Paulo Favato Barcelos

unread,
Sep 1, 2021, 2:41:57 AM9/1/21
to vocbench-user
Good morning,

I am facing a strange problem importing an OWL file to an Ontolex project. The point is that I had previously imported this same file to another project and everything went as expected, but now I am receiving an error on the operation.

I am importing the file doing the following steps: Metadata > Namespaces and Imports > Add import from > Local file + resolve from web.

It is a simple OWL file created on Protégé with 4 classes and 3 object properties that imports Ontolex. The file is here attached.

The error I receive is the following:

Not a valid (absolute) IRI: /opt/vocbench3/semanticturkey-9.1/data/tmp/addFromLocalFile3454097934842922800thor_ont.owl
Details:
java.lang.IllegalArgumentException: Not a valid (absolute) IRI: /opt/vocbench3/semanticturkey-9.1/data/tmp/addFromLocalFile3454097934842922800thor_ont.owl at org.eclipse.rdf4j.model.impl.SimpleIRI.setIRIString(SimpleIRI.java:74) at org.eclipse.rdf4j.model.impl.SimpleIRI.<init>(SimpleIRI.java:63) at org.eclipse.rdf4j.model.impl.AbstractValueFactory.createIRI(AbstractValueFactory.java:87) at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.lambda$addOntologyImportSkeleton$2(OntologyManagerImpl.java:174) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531) at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.addOntologyImportSkeleton(OntologyManagerImpl.java:176) at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.addOntologyImportFromLocalFile(OntologyManagerImpl.java:264) at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.addOntologyImportFromLocalFile(OntologyManagerImpl.java:246) at it.uniroma2.art.semanticturkey.services.core.Metadata.addFromLocalFile(Metadata.java:293) at it.uniroma2.art.semanticturkey.services.core.Metadata$$FastClassBySpringCGLIB$$d2b841e3.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:701) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at it.uniroma2.art.semanticturkey.search.SearchUpdateInterceptor.invoke(SearchUpdateInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at it.uniroma2.art.semanticturkey.services.aspects.ResourceLifecycleEventPublisherInterceptor.invoke(ResourceLifecycleEventPublisherInterceptor.java:88) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at it.uniroma2.art.semanticturkey.history.HistoryMetadataInterceptor.invoke(HistoryMetadataInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at it.uniroma2.art.semanticturkey.user.SchemesOwnershipCheckerInterceptor.invoke(SchemesOwnershipCheckerInterceptor.java:191) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at it.uniroma2.art.semanticturkey.services.aspects.WritabilityCheckerInterceptor.invoke(WritabilityCheckerInterceptor.java:48) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:42) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633) at it.uniroma2.art.semanticturkey.services.core.Metadata$$EnhancerBySpringCGLIB$$ff466482.addFromLocalFile(<generated>) at it.uniroma2.art.semanticturkey.services.core.controllers.MetadataController.addFromLocalFilePublished(MetadataController.java:127) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655) at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:215) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at it.uniroma2.art.semanticturkey.security.CORSFilter.doFilter(CORSFilter.java:40) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at it.uniroma2.art.semanticturkey.http.session.CrossContextSessionFilter.doFilter(CrossContextSessionFilter.java:25) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:531) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) at java.lang.Thread.run(Thread.java:748)

Can someone please help me understand what is happening and why I cannot import the file?

Thank you very much in advance.

Kind regards, 
Pedro Paulo 
thor_ont.owl

Roland Wingerter

unread,
Sep 1, 2021, 1:48:36 PM9/1/21
to vocbench-user
Hi Pedro Paulo,

I owl:imported your ontology successfully into a newly created ontolex project. Also, into an existing project with a couple of concepts.

When I try to import it into an existing project with millions of triples, I get an "Invalid IRI value" error (see below).

Maybe you can create a new project and import the ontology and load the data afterwards.

Kind regards
Roland



Error

org.eclipse.rdf4j.repository.RepositoryException: Transaction handling error: Invalid IRI value
Details:
it.uniroma2.art.semanticturkey.ontology.OntologyManagerException: org.eclipse.rdf4j.repository.RepositoryException: Transaction handling error: Invalid IRI value at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.notifiedAddedOntologyImport(OntologyManagerImpl.java:696) at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.lambda$addOntologyImportFromLocalFile$6(OntologyManagerImpl.java:280) at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.addOntologyImportSkeleton(OntologyManagerImpl.java:195) at it.uniroma2.art.semanticturkey.ontology.impl.OntologyManagerImpl.addOntologyImportFromLocalFile(OntologyManagerImpl.java:264) at
etc. etc

Pedro Paulo Favato Barcelos

unread,
Sep 2, 2021, 5:31:43 AM9/2/21
to Roland Wingerter, vocbench-user
Hi Roland, good morning,

Thank you for the answer! I've tested here and I got the same results as you. I'll do what you suggested, but it would be important to know why this problem is happening, as in a long-time project some ontologies may have to be imported after the data. Maybe the developers can check on this?

Kind regards, 
Pedro Paulo Favato Barcelos


--
You received this message because you are subscribed to a topic in the Google Groups "vocbench-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vocbench-user/CcKULpgreqU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vocbench-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/9c8b2a5f-f867-4d6e-87cb-9c443fd69fb7n%40googlegroups.com.

Manuel Fiorelli

unread,
Sep 5, 2021, 2:00:43 AM9/5/21
to Pedro Paulo Favato Barcelos, Roland Wingerter, vocbench-user
Hi Pedro and Roland,

I looked at this issue during the weekend. I wasn't able to reproduce the issue at first, perhaps because I did my experiments on a Windows machine.
However, I am confident of having identified the root cause of the issue. Actually, I made a further test that allowed me to obtain exactly Pedro's stack trace.

Let me explain the identified cause.

When you import an ontology from a file, VocBench needs the ontology file (obviously) and a base URI. If the latter is not provided, VocBench generates a base URI from the filename. The generated base URI should only be used temporarily, as VocBench will determine the right base URI from the definition of an owl:Ontology within the file. In Pedro's case, the generated base URI is /opt/vocbench3/semanticturkey-9.1/data/tmp/addFromLocalFile3454097934842922800thor_ont.owl which is not a valid URI. This is a bug in VocBench, since it should generate a valid URI, for example by prepending file://.

I am going to push a fix soon.

In the meantime, there is an easy workaround: just indicate the base URI when importing the ontology from a file, like in the screenshot below.

immagine.png

Please, let me know if the workaround works for you.

Best regards
Manuel

PS
The further test that I mentioned in the email to reproduce Pedro's stack trace was to use /opt/vocbench3/semanticturkey-9.1/data/tmp/addFromLocalFile3454097934842922800thor_ont.owl as base URI

You received this message because you are subscribed to the Google Groups "vocbench-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vocbench-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/CAN0bbw58jz7UWjXg%3DZLA28yP%3D3KdrHR-W2A3rtkFq_y5nkhvUw%40mail.gmail.com.


--
Manuel Fiorelli

Pedro Paulo Favato Barcelos

unread,
Sep 8, 2021, 5:37:17 AM9/8/21
to Manuel Fiorelli, Roland Wingerter, vocbench-user
Hello Manuel, good morning.

Thank you very much for your answer! The workaround worked perfectly! :D

Kind regards,
Pedro Paulo Favato Barcelos

Manuel Fiorelli

unread,
Sep 9, 2021, 9:48:42 AM9/9/21
to Pedro Paulo Favato Barcelos, Roland Wingerter, vocbench-user
Hi Pedro,

I've also pushed a commit to our source code repository that should fix the issue in the first place.

Regards
Manuel
--
Manuel Fiorelli

Pedro Paulo Favato Barcelos

unread,
Sep 9, 2021, 10:34:06 AM9/9/21
to Manuel Fiorelli, Roland Wingerter, vocbench-user
Thank you very much, Manuel!

Kind regards - Cordiali saluti - Atenciosamente,
Pedro Paulo Favato Barcelos

Reply all
Reply to author
Forward
0 new messages