sorry, just one more thing i noticed:
when checking with the webpage, under ontonet/ontology/ and klicking on
the link to 'myScope', I'm redirected to
http://localhost:8080/ontonet/ontology/myScope
instead of
<myserver>/ontonet/ontology/myScope.
Also, when requesting my scope, I get something like
<?xml version="1.0"?>
<rdf:RDF xmlns="http://localhost:8080/ontonet/ontology/myScope#"
xml:base="http://localhost:8080/ontonet/ontology/myScope"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:Ontology rdf:about="http://localhost:8080/ontonet/ontology/myScope"/>
</rdf:RDF>
(note the ontology at 'localhost:8080')
so there seem to be some hardcoded paths to the localhost in this interface.
g
melanie
Am 22.06.2012 11:27, schrieb Melanie Reiplinger:
Hi Alberto.
Thank you so much for your support :-) and sorry for the late reply.
Here are the results of what I tried this morning, when using your
commands:
The commands all work, so first I thought I was having gremlins the
other day when producing the errors. But the behaviour of the endpoint
is not always the same, even if I execute the same sequence of commands.
When first creating the scope just as you describe, my error logfile
increased a few hundred megabyte, and for a short time loading of the
webpage /ontonet/ontology was delayed again. The rest of the commands
worked perfectly. I then deleted all scopes and all ontologies,
restarted Stanbol and tried again (while tracking the size of the
logfile).
This time, the logfile stayed unchanged throughout creation of the
scope and loading of the ontology. Then, when requesting the scope,
the log file suddenly grew to 12M (writing ~ 13K times the "Too many
open files" exception).
From that point on, everything stayed unchanged through requests or
loading of the page.
Then I tried to load another ontology
(curl -X POST -F
"url=http://ontologydesignpatterns.org/ont/iks/kres/onm.owl"
<myserver>/ontonet/ontology/myScope)
I get the error message
HTTP ERROR 400
Problem accessing /ontonet/ontology/myScope. Reason: Bad Request
and the logfile grows to 152M (including now more than 180K times the
"Too many open files" exception).
When trying this a second or a third time, the error message stays
unchanged, but the log file does not grow any further.
Also when trying to load an ontology via the RESTful interface, I'm
not having any success today for the onm.owl ontology, it gives me the
exception I appended below (it says that the new ontology cannot be
loaded because the already loaded ontology cannot be loaded and
because of too many open files).
The logfile is now 251M in size, with even more "Too many open files"
issues, it has grown while I was writing this eMail so it seems there
are *WARN* logs written with some delay in time (?).
But anyway I'm glad already that you showed me how to correctly load
an ontology into a scope. Thanks :-). Now I can go on trying.
Best Melanie
error message when trying to load the second ontology:
(don't mind the messed-up server time)
22.06.2012 12:08:27.596 *ERROR* [24890767@qtp-14471083-13]
org.apache.stanbol.ontologymanager.web.resources.ScopeResource Failed
to load ontology from
http://ontologydesignpatterns.org/ont/iks/kres/onm.owl
org.semanticweb.owlapi.model.UnloadableImportException: Could not load
imported ontology:
<http://ontologydesignpatterns.org/ont/iks/kres/omv.owl> Cause: Too
many open files
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1119)
at
org.coode.owlapi.rdfxml.parser.TPImportsHandler.handleTriple(TPImportsHandler.java:88)
at
org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.handleStreaming(OWLRDFConsumer.java:1626)
at
org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.statementWithResourceValue(OWLRDFConsumer.java:1581)
at
org.semanticweb.owlapi.rdf.syntax.RDFParser.statementWithResourceValue(RDFParser.java:576)
at
org.semanticweb.owlapi.rdf.syntax.RDFParser$EmptyPropertyElement.startElement(RDFParser.java:1047)
at
org.semanticweb.owlapi.rdf.syntax.RDFParser$PropertyElementList.startElement(RDFParser.java:924)
at
org.semanticweb.owlapi.rdf.syntax.RDFParser.startElement(RDFParser.java:281)
at
org.coode.owlapi.rdfxml.parser.RDFXMLParser$1.startElement(RDFXMLParser.java:92)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:504)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:791)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:741)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
at
org.semanticweb.owlapi.rdf.syntax.RDFParser.parse(RDFParser.java:173)
at
org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:120)
at
uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:204)
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:726)
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:667)
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:641)
at
org.apache.stanbol.ontologymanager.ontonet.api.io.RootOntologyIRISource.<init>(RootOntologyIRISource.java:45)
at
org.apache.stanbol.ontologymanager.ontonet.api.io.RootOntologyIRISource.<init>(RootOntologyIRISource.java:40)
at
org.apache.stanbol.ontologymanager.ontonet.api.io.RootOntologyIRISource.<init>(RootOntologyIRISource.java:36)
at
org.apache.stanbol.ontologymanager.web.resources.ScopeResource.postOntology(ScopeResource.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
at
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
at
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.doFilter(QueryHeadersFilter.java:75)
at
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:78)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.semanticweb.owlapi.io.OWLOntologyCreationIOException:
Too many open files
at
uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:212)
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:726)
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:667)
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadImports(OWLOntologyManagerImpl.java:1084)
at
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1112)
... 81 more
Caused by: java.net.SocketException: Too many open files
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1458)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1452)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1106)
at
org.semanticweb.owlapi.io.AbstractOWLParser.getInputStreamFromContentEncoding(AbstractOWLParser.java:161)
at
org.semanticweb.owlapi.io.AbstractOWLParser.getInputStream(AbstractOWLParser.java:126)
at
org.semanticweb.owlapi.io.AbstractOWLParser.getInputSource(AbstractOWLParser.java:200)
at
org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:119)
at
uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:204)
... 85 more
Caused by: java.net.SocketException: Too many open files
at java.net.Socket.createImpl(Socket.java:414)
at java.net.Socket.connect(Socket.java:544)
at sun.net.NetworkClient.doConnect(NetworkClient.java:173)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:338)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
at
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2214)
at java.net.URLConnection.getContentEncoding(URLConnection.java:513)
at
org.semanticweb.owlapi.io.AbstractOWLParser.getInputStream(AbstractOWLParser.java:125)
... 88 more
Am 19.06.2012 09:49, schrieb Alberto Musetti:
Hi Melanie,
i have tried this sequence of commands:
# myScope is<scopeID>
# create a new scope
1. curl -i -X PUT
http://localhost:8080/ontonet/ontology/myScope?location=http://ontologydesignpatterns.org/ont/iks/kres/
# get a scope
2. curl -H "Accept:application/rdf+xml"
http://localhost:8080/ontonet/ontology/myScope
# load an ontology in myScope
3. curl -X POST -F
"url=http://ontologydesignpatterns.org/ont/iks/kres/omv.owl"
http://localhost:8080/ontonet/ontology/myScope
# get stored ontology
4. curl -H "Accept:application/rdf+xml"
http://localhost:8080/ontonet/ontology/myScope/http://kres.iks-project.eu/ontologies/omv.owl
This sequence of actions works, but i don't know because if i use
'location' parameter instead 'url' it doesn't works any more. I check
it and i let you know.
Best
Alberto
Il giorno 17/giu/2012, alle ore 16:28, Melanie Reiplinger ha scritto:
Hi Alberto,
thanks for your fast reply.
Am 15.06.2012 12:21, schrieb [email protected]:
Hi Melanie,
thanks for reporting this issue!
I have a question, what it means:'I noticed that loading of
ontologies did
not really work'?
Can you post the sequence of actions (even as curl commands) that
you used
in order I can replicate the issue? Right now I tryed to store and
get an
ontology to and from my Stanbol installation and everything worked
properly.
I used
curl -i -X PUT
"http://<myserver>/ontonet/ontology/<scopeID>?location=http://ontologydesignpatterns.org/ont/iks/kres/"
to create a scope and load an ontology library.
Then, to load a specific ontology into this scope, I said:
curl -i -X POST -data
"http://ontologydesignpatterns.org/ont/iks/kres/omv.owl"
http://<myserver>/ontonet/ontology/<scopeID>
That gave me some Unsupported Media Type Error.
I try to open [http://lnv-89012.dfki.uni-sb.de:9001/ontonet] but there
isn't response from the server. It is correct that uri?
The server can only be accessed from within our network, because it
is still kind of a development or test version. Sorry that the link
got into that email in the first place, I wanted to post only
'http://<myserver>/ontonet#', with the placeholder instead of the URL.
Best, Melanie
Bests,
Alberto Musetti
correction: The same exception message is also written to the log
file
when requesting other webpages of the Stanbol REST API like e.g. the
contenthub, just only a very few times so that the page is loaded
with
no perceivable delay.
This means that while trying out the curl commands on the
ontonet's REST
API on Tuesday, I must have blown my stanbol installation.
Has anyone ever (successfully) worked with the instructions from that
page?
Sebastian recommended to simply re-install, and maybe that will solve
the problem; but if I again use the same commands I might destroy the
stanbol over again. So do you have a reference for the ontonet
endpoint
apart from the README file and the http://<myserver>/ontonet#
<http://lnv-89012.dfki.uni-sb.de:9001/ontonet#> ? (e.g. for
creating
scopes, loading ontologies and the like)
Am 15.06.2012 10:50, schrieb Melanie Reiplinger:
I forgot to mention: loading of the page does not fail, however.
After
several minutes, and after writing 2-3G of exception messages
into the
logfile, the page appears in the browser.
Am 15.06.2012 10:42, schrieb Melanie Reiplinger:
Hi Stanbolers, Hi Rupert.
I started working on the ontonet endpoint (in order to implement
the
Javascript interface) this week. First, I noticed that loading of
ontologies did not really work. Second, the stanbol server got
terribly slow as soon as I had started posting requests to the
ontonet/ontology. (curl commands took several minutes, loading a
page
into the browser up 5-10 minutes). Meanwhile, loading the other
endpoints was unproblematic as usual. Then my network group
notified
me that the disk space used by stanbol exploded during that time.
I checked and found that the stanbol/logs/ folder gains several
G in
size while requesting e.g.
http://<myserver>/ontonet/ontology/
<http://lnv-89012.dfki.uni-sb.de:9001/ontonet/ontology/>
(i.e., while trying to load the page into the browser)
In the file error.log, there is the same exception written over and
over again:
15.06.2012 10:16:08.238 *WARN* [28346522@qtp-25994851-1 - Acceptor0
[email protected]:9001] org.apache.felix.http.jetty
EXCEPTION (java.io.IOException: Too many open files)
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native
Method)
at
sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:163)
at
org.mortbay.jetty.nio.SelectChannelConnector$1.acceptChannel(SelectChannelConnector.java:75)
at
org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:664)
at
org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:191)
at
org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java:124)
at
org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:708)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Do you know this problem?