You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Adrian Dinu <ad...@r-2.ca> on 2015/06/26 21:22:05 UTC
"Create a Content Item" problem
Hello,
I looked at the examples at http://localhost:8080/contenthub/contenthub/store to Create a Content Item
On my side neither
curl -i -F "content= Some facts about John Doe.;type=text/plain" "http://localhost:8080/contenthub/myindex/store?title=123"
nor
curl -i -X POST --data "content=Some facts about John Doe&title=123" '"http://localhost:8080/contenthub/myindex/store"
do work, I get
HTTP/1.1 401 Unauthorized
WWW(-Authenticate) : Basic(realm = "Apache Stanbol authentication needed")
In the monitor window I see
26-Jun-2015 4:03:17 PM com.sun.jersey.spi.container.servlet.WebComponent filterFormParameters
WARNING: A servlet request, to the URI http://localhost:8080/contenthub/comment/store, contains form parameters in the request body but the request body has been consumed by the se
rvlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means
will not work as expected.
26-Jun-2015 4:03:17 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.security.AccessControlException: access denied (org.apache.clerezza.rdf.core.access.security.TcPermission org.apache.stanbol.contenthub.enhancements read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at org.apache.clerezza.rdf.core.access.security.TcAccessController.checkReadPermission(TcAccessController.java:105)
at org.apache.clerezza.rdf.core.access.TcManager.getMGraph(TcManager.java:179)
at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.getEnhancementGraph(SolrStoreImpl.java:159)
at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.updateEnhancementGraph(SolrStoreImpl.java:277)
at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreImpl.java:325)
at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(SolrStoreImpl.java:295)
at org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhanceAndRedirect(StoreResource.java:606)
at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:577)
at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:544)
at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:302)
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:1480)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
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.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.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.stanbol.commons.web.resources.ResourceServingFilter.doFilterHttp(ResourceServingFilter.java:148)
at org.apache.stanbol.commons.web.resources.ResourceServingFilter.doFilter(ResourceServingFilter.java:91)
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.stanbol.commons.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:163)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilter(AuthenticatingFilter.java:159)
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.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.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:369)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
How can I solve this?
Thank you,
Adrian
Re: "Create a Content Item" problem
Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi Adrian
If you are using Stanbol on windows this could be caused by the Sling
Fileinstall. So you might try to deactivate this component. See [1]
for details.
best
Rupert
[1] http://markmail.org/message/jfadhfq66xrc5o6x
On Tue, Jun 30, 2015 at 8:59 PM, Adrian Dinu <ad...@r-2.ca> wrote:
> Hi Rupert,
> The workaround worked, thank you. I will create a report for the issue.
>
> As a side note: when I launched the jar with "-no-security" option, the Entityhub did no longer contain my custom configured site, I had to create(configure) it again. Also, the chain named "default" vanished as well, I had to re-create it.
>
> I am not sure if this is relevant or not.
>
> Thanks again,
> Adrian
>
> -----Message d'origine-----
> De : Rupert Westenthaler [mailto:rupert.westenthaler@gmail.com]
> Envoyé : June 30, 2015 4:43 AM
> À : dev@stanbol.apache.org
> Objet : Re: "Create a Content Item" problem
>
> Hi,
>
> Can you please report this as a bug on
> https://issues.apache.org/jira/browse/STANBOL
>
> As a Workaround you can start Stanbol with the "-no-security" option.
>
> Much more information about issues like that are provided by [1] - a mail I sent some time back on this mailing list.
>
> best
> Rupert
>
> [1] http://markmail.org/message/qkkxcecf5ktg7hdu
>
>
> On Fri, Jun 26, 2015 at 9:22 PM, Adrian Dinu <ad...@r-2.ca> wrote:
>> Hello,
>> I looked at the examples at
>> http://localhost:8080/contenthub/contenthub/store to Create a Content Item On my side neither
>> curl -i -F "content= Some facts about John Doe.;type=text/plain" "http://localhost:8080/contenthub/myindex/store?title=123"
>> nor
>>
>> curl -i -X POST --data "content=Some facts about John Doe&title=123" '"http://localhost:8080/contenthub/myindex/store"
>>
>> do work, I get
>>
>> HTTP/1.1 401 Unauthorized
>> WWW(-Authenticate) : Basic(realm = "Apache Stanbol
>> authentication needed")
>>
>> In the monitor window I see
>>
>> 26-Jun-2015 4:03:17 PM
>> com.sun.jersey.spi.container.servlet.WebComponent filterFormParameters
>> WARNING: A servlet request, to the URI
>> http://localhost:8080/contenthub/comment/store, contains form
>> parameters in the request body but the request body has been consumed by the se rvlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
>> 26-Jun-2015 4:03:17 PM com.sun.jersey.spi.container.ContainerResponse
>> mapMappableContainerException
>> SEVERE: The RuntimeException could not be mapped to a response,
>> re-throwing to the HTTP container
>> java.security.AccessControlException: access denied (org.apache.clerezza.rdf.core.access.security.TcPermission org.apache.stanbol.contenthub.enhancements read)
>> at java.security.AccessControlContext.checkPermission(Unknown Source)
>> at java.security.AccessController.checkPermission(Unknown Source)
>> at org.apache.clerezza.rdf.core.access.security.TcAccessController.checkReadPermission(TcAccessController.java:105)
>> at org.apache.clerezza.rdf.core.access.TcManager.getMGraph(TcManager.java:179)
>> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.getEnhancementGraph(SolrStoreImpl.java:159)
>> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.updateEnhancementGraph(SolrStoreImpl.java:277)
>> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreImpl.java:325)
>> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(SolrStoreImpl.java:295)
>> at org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhanceAndRedirect(StoreResource.java:606)
>> at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:577)
>> at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:544)
>> at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> 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:302)
>> 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:1480)
>> at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
>> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
>> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
>> at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
>> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
>> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
>> 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.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.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.stanbol.commons.web.resources.ResourceServingFilter.doFilterHttp(ResourceServingFilter.java:148)
>> at org.apache.stanbol.commons.web.resources.ResourceServingFilter.doFilter(ResourceServingFilter.java:91)
>> 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.stanbol.commons.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:163)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
>> at org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilter(AuthenticatingFilter.java:159)
>> 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.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.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
>> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
>> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
>> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
>> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
>> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
>> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
>> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>> at org.eclipse.jetty.server.Server.handle(Server.java:369)
>> at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
>> at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
>> at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
>> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
>> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
>> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
>> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>> at java.lang.Thread.run(Unknown Source)
>>
>> How can I solve this?
>>
>> Thank you,
>> Adrian
>>
>>
>
>
>
> --
> | Rupert Westenthaler rupert.westenthaler@gmail.com
> | Bodenlehenstraße 11 ++43-699-11108907
> | A-5500 Bischofshofen
> | REDLINK.CO ..........................................................................
> | http://redlink.co/
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4813 / Virus Database: 4365/10124 - Release Date: 06/29/15
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4813 / Virus Database: 4365/10122 - Release Date: 06/29/15
>
--
| Rupert Westenthaler rupert.westenthaler@gmail.com
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen
| REDLINK.CO ..........................................................................
| http://redlink.co/
RE: "Create a Content Item" problem
Posted by Adrian Dinu <ad...@r-2.ca>.
Hi Rupert,
The workaround worked, thank you. I will create a report for the issue.
As a side note: when I launched the jar with "-no-security" option, the Entityhub did no longer contain my custom configured site, I had to create(configure) it again. Also, the chain named "default" vanished as well, I had to re-create it.
I am not sure if this is relevant or not.
Thanks again,
Adrian
-----Message d'origine-----
De : Rupert Westenthaler [mailto:rupert.westenthaler@gmail.com]
Envoyé : June 30, 2015 4:43 AM
À : dev@stanbol.apache.org
Objet : Re: "Create a Content Item" problem
Hi,
Can you please report this as a bug on
https://issues.apache.org/jira/browse/STANBOL
As a Workaround you can start Stanbol with the "-no-security" option.
Much more information about issues like that are provided by [1] - a mail I sent some time back on this mailing list.
best
Rupert
[1] http://markmail.org/message/qkkxcecf5ktg7hdu
On Fri, Jun 26, 2015 at 9:22 PM, Adrian Dinu <ad...@r-2.ca> wrote:
> Hello,
> I looked at the examples at
> http://localhost:8080/contenthub/contenthub/store to Create a Content Item On my side neither
> curl -i -F "content= Some facts about John Doe.;type=text/plain" "http://localhost:8080/contenthub/myindex/store?title=123"
> nor
>
> curl -i -X POST --data "content=Some facts about John Doe&title=123" '"http://localhost:8080/contenthub/myindex/store"
>
> do work, I get
>
> HTTP/1.1 401 Unauthorized
> WWW(-Authenticate) : Basic(realm = "Apache Stanbol
> authentication needed")
>
> In the monitor window I see
>
> 26-Jun-2015 4:03:17 PM
> com.sun.jersey.spi.container.servlet.WebComponent filterFormParameters
> WARNING: A servlet request, to the URI
> http://localhost:8080/contenthub/comment/store, contains form
> parameters in the request body but the request body has been consumed by the se rvlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
> 26-Jun-2015 4:03:17 PM com.sun.jersey.spi.container.ContainerResponse
> mapMappableContainerException
> SEVERE: The RuntimeException could not be mapped to a response,
> re-throwing to the HTTP container
> java.security.AccessControlException: access denied (org.apache.clerezza.rdf.core.access.security.TcPermission org.apache.stanbol.contenthub.enhancements read)
> at java.security.AccessControlContext.checkPermission(Unknown Source)
> at java.security.AccessController.checkPermission(Unknown Source)
> at org.apache.clerezza.rdf.core.access.security.TcAccessController.checkReadPermission(TcAccessController.java:105)
> at org.apache.clerezza.rdf.core.access.TcManager.getMGraph(TcManager.java:179)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.getEnhancementGraph(SolrStoreImpl.java:159)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.updateEnhancementGraph(SolrStoreImpl.java:277)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreImpl.java:325)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(SolrStoreImpl.java:295)
> at org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhanceAndRedirect(StoreResource.java:606)
> at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:577)
> at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:544)
> at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> 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:302)
> 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:1480)
> at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
> at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
> 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.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.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.stanbol.commons.web.resources.ResourceServingFilter.doFilterHttp(ResourceServingFilter.java:148)
> at org.apache.stanbol.commons.web.resources.ResourceServingFilter.doFilter(ResourceServingFilter.java:91)
> 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.stanbol.commons.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:163)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
> at org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilter(AuthenticatingFilter.java:159)
> 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.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.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:369)
> at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
> at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
> at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Unknown Source)
>
> How can I solve this?
>
> Thank you,
> Adrian
>
>
--
| Rupert Westenthaler rupert.westenthaler@gmail.com
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen
| REDLINK.CO ..........................................................................
| http://redlink.co/
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4813 / Virus Database: 4365/10124 - Release Date: 06/29/15
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4813 / Virus Database: 4365/10122 - Release Date: 06/29/15
Re: "Create a Content Item" problem
Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi,
Can you please report this as a bug on
https://issues.apache.org/jira/browse/STANBOL
As a Workaround you can start Stanbol with the "-no-security" option.
Much more information about issues like that are provided by [1] - a
mail I sent some time back on this mailing list.
best
Rupert
[1] http://markmail.org/message/qkkxcecf5ktg7hdu
On Fri, Jun 26, 2015 at 9:22 PM, Adrian Dinu <ad...@r-2.ca> wrote:
> Hello,
> I looked at the examples at http://localhost:8080/contenthub/contenthub/store to Create a Content Item
> On my side neither
> curl -i -F "content= Some facts about John Doe.;type=text/plain" "http://localhost:8080/contenthub/myindex/store?title=123"
> nor
>
> curl -i -X POST --data "content=Some facts about John Doe&title=123" '"http://localhost:8080/contenthub/myindex/store"
>
> do work, I get
>
> HTTP/1.1 401 Unauthorized
> WWW(-Authenticate) : Basic(realm = "Apache Stanbol authentication needed")
>
> In the monitor window I see
>
> 26-Jun-2015 4:03:17 PM com.sun.jersey.spi.container.servlet.WebComponent filterFormParameters
> WARNING: A servlet request, to the URI http://localhost:8080/contenthub/comment/store, contains form parameters in the request body but the request body has been consumed by the se
> rvlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means
> will not work as expected.
> 26-Jun-2015 4:03:17 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
> SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
> java.security.AccessControlException: access denied (org.apache.clerezza.rdf.core.access.security.TcPermission org.apache.stanbol.contenthub.enhancements read)
> at java.security.AccessControlContext.checkPermission(Unknown Source)
> at java.security.AccessController.checkPermission(Unknown Source)
> at org.apache.clerezza.rdf.core.access.security.TcAccessController.checkReadPermission(TcAccessController.java:105)
> at org.apache.clerezza.rdf.core.access.TcManager.getMGraph(TcManager.java:179)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.getEnhancementGraph(SolrStoreImpl.java:159)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.updateEnhancementGraph(SolrStoreImpl.java:277)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreImpl.java:325)
> at org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(SolrStoreImpl.java:295)
> at org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhanceAndRedirect(StoreResource.java:606)
> at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:577)
> at org.apache.stanbol.contenthub.web.resources.StoreResource.createContentItemFromForm(StoreResource.java:544)
> at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> 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:302)
> 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:1480)
> at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
> at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
> 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.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.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.stanbol.commons.web.resources.ResourceServingFilter.doFilterHttp(ResourceServingFilter.java:148)
> at org.apache.stanbol.commons.web.resources.ResourceServingFilter.doFilter(ResourceServingFilter.java:91)
> 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.stanbol.commons.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:163)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
> at org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilter(AuthenticatingFilter.java:159)
> 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.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.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:369)
> at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
> at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
> at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Unknown Source)
>
> How can I solve this?
>
> Thank you,
> Adrian
>
>
--
| Rupert Westenthaler rupert.westenthaler@gmail.com
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen
| REDLINK.CO ..........................................................................
| http://redlink.co/