You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by harish suvarna <hs...@gmail.com> on 2013/04/05 02:10:02 UTC
dbpedia-spotlight through curl gives error
I am running the command
curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" --data
"The Stanbol enhancer can detect famous cities such as Paris and people
such as Bob Marley." http://localhost:8080/enhancer/chain/dbpedia-spotlight
and I gt the following error. I was using an earlier version (Oct 2012), it
was fine. What could be wrong?
SEVERE: The RuntimeException could not be mapped to a response, re-throwing
to the HTTP container
java.security.AccessControlException: access denied
(java.net.SocketPermission spotlight.dbpedia.org:80 connect,resolve)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
at
java.security.AccessController.checkPermission(AccessController.java:553)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1051)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:528)
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.getOutputStream(HttpURLConnection.java:979)
at
org.apache.stanbol.enhancer.engines.dbpspotlight.annotate.DBPSpotlightAnnotateEnhancementEngine.doPostRequest(DBPSpotlightAnnotateEnhancementEngine.java:286)
at
org.apache.stanbol.enhancer.engines.dbpspotlight.annotate.DBPSpotlightAnnotateEnhancementEngine.computeEnhancements(DBPSpotlightAnnotateEnhancementEngine.java:195)
at
org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.processEvent(EnhancementJobHandler.java:271)
at
org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.handleEvent(EnhancementJobHandler.java:189)
at
org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl.execute(HandlerTaskImpl.java:88)
at
org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:221)
at
org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:679)
--
Thanks
Harish
Re: dbpedia-spotlight through curl gives error
Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi
On Fri, Apr 5, 2013 at 9:37 AM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Hi,
>
> On Fri, Apr 5, 2013 at 6:09 AM, Rupert Westenthaler
> <ru...@gmail.com> wrote:
>> ...I sent a mail [1] describing the situation
>> incl. possible workaround....
>
> That suggests adding the "-no-security" option to the Stanbol launcher
> - Harish, does that fix your problem?
>
Yes is does. This is also what we do on the
http://dev.iks-project.eu:8081 server
best
Rupert
> -Bertrand
>
>> [1] http://markmail.org/message/qkkxcecf5ktg7hdu
--
| Rupert Westenthaler rupert.westenthaler@gmail.com
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen
Re: dbpedia-spotlight through curl gives error
Posted by Reto Bachmann-Gmür <re...@apache.org>.
On Fri, Apr 5, 2013 at 9:37 AM, Bertrand Delacretaz
<bd...@apache.org>wrote:
> Hi,
>
> On Fri, Apr 5, 2013 at 6:09 AM, Rupert Westenthaler
> <ru...@gmail.com> wrote:
> > ...I sent a mail [1] describing the situation
> > incl. possible workaround....
>
> That suggests adding the "-no-security" option to the Stanbol launcher
> - Harish, does that fix your problem?
>
It certainly does as the request work when run as the admin user.
Reto
Re: dbpedia-spotlight through curl gives error
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Fri, Apr 5, 2013 at 6:09 AM, Rupert Westenthaler
<ru...@gmail.com> wrote:
> ...I sent a mail [1] describing the situation
> incl. possible workaround....
That suggests adding the "-no-security" option to the Stanbol launcher
- Harish, does that fix your problem?
-Bertrand
> [1] http://markmail.org/message/qkkxcecf5ktg7hdu
Re: dbpedia-spotlight through curl gives error
Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi Harish,
That's correct. I spent already ~2 weeks to adapt components so that
they do run with active security manager. But I am sure that there are
still several other components that do have problems related to this.
AFAIK most Engines that do access remote services (Spotlight, Celi,
Geonames, Calai, Zemanta) are affected. As those things are not
included in the Integration-Test (because of the rule that the
Integration Tests must not depend on remote services) whose issues are
not revealed by a normal build.
Because of that situation I sent a mail [1] describing the situation
incl. possible workaround.
best
Rupert
[1] http://markmail.org/message/qkkxcecf5ktg7hdu
On Fri, Apr 5, 2013 at 4:46 AM, harish suvarna <hs...@gmail.com> wrote:
> This problem is because I am calling this as an anonymous user. If I use
> admin credentials it runs fine.
>
>
> On Thu, Apr 4, 2013 at 5:10 PM, harish suvarna <hs...@gmail.com> wrote:
>
>> I am running the command
>> curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" --data
>> "The Stanbol enhancer can detect famous cities such as Paris and people
>> such as Bob Marley."
>> http://localhost:8080/enhancer/chain/dbpedia-spotlight
>>
>> and I gt the following error. I was using an earlier version (Oct 2012),
>> it was fine. What could be wrong?
>>
>>
>> SEVERE: The RuntimeException could not be mapped to a response,
>> re-throwing to the HTTP container
>> java.security.AccessControlException: access denied
>> (java.net.SocketPermission spotlight.dbpedia.org:80 connect,resolve)
>> at
>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
>> at
>> java.security.AccessController.checkPermission(AccessController.java:553)
>> at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>> at java.lang.SecurityManager.checkConnect(SecurityManager.java:1051)
>> at sun.net.www.http.HttpClient.openServer(HttpClient.java:528)
>> 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.getOutputStream(HttpURLConnection.java:979)
>> at
>> org.apache.stanbol.enhancer.engines.dbpspotlight.annotate.DBPSpotlightAnnotateEnhancementEngine.doPostRequest(DBPSpotlightAnnotateEnhancementEngine.java:286)
>> at
>> org.apache.stanbol.enhancer.engines.dbpspotlight.annotate.DBPSpotlightAnnotateEnhancementEngine.computeEnhancements(DBPSpotlightAnnotateEnhancementEngine.java:195)
>> at
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.processEvent(EnhancementJobHandler.java:271)
>> at
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.handleEvent(EnhancementJobHandler.java:189)
>> at
>> org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl.execute(HandlerTaskImpl.java:88)
>> at
>> org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:221)
>> at
>> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110)
>> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> Source)
>> at java.lang.Thread.run(Thread.java:679)
>>
>>
>>
>> --
>> Thanks
>> Harish
>>
>
>
>
> --
> Thanks
> Harish
--
| Rupert Westenthaler rupert.westenthaler@gmail.com
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen
Re: dbpedia-spotlight through curl gives error
Posted by harish suvarna <hs...@gmail.com>.
This problem is because I am calling this as an anonymous user. If I use
admin credentials it runs fine.
On Thu, Apr 4, 2013 at 5:10 PM, harish suvarna <hs...@gmail.com> wrote:
> I am running the command
> curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" --data
> "The Stanbol enhancer can detect famous cities such as Paris and people
> such as Bob Marley."
> http://localhost:8080/enhancer/chain/dbpedia-spotlight
>
> and I gt the following error. I was using an earlier version (Oct 2012),
> it was fine. What could be wrong?
>
>
> SEVERE: The RuntimeException could not be mapped to a response,
> re-throwing to the HTTP container
> java.security.AccessControlException: access denied
> (java.net.SocketPermission spotlight.dbpedia.org:80 connect,resolve)
> at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
> at
> java.security.AccessController.checkPermission(AccessController.java:553)
> at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
> at java.lang.SecurityManager.checkConnect(SecurityManager.java:1051)
> at sun.net.www.http.HttpClient.openServer(HttpClient.java:528)
> 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.getOutputStream(HttpURLConnection.java:979)
> at
> org.apache.stanbol.enhancer.engines.dbpspotlight.annotate.DBPSpotlightAnnotateEnhancementEngine.doPostRequest(DBPSpotlightAnnotateEnhancementEngine.java:286)
> at
> org.apache.stanbol.enhancer.engines.dbpspotlight.annotate.DBPSpotlightAnnotateEnhancementEngine.computeEnhancements(DBPSpotlightAnnotateEnhancementEngine.java:195)
> at
> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.processEvent(EnhancementJobHandler.java:271)
> at
> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.handleEvent(EnhancementJobHandler.java:189)
> at
> org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl.execute(HandlerTaskImpl.java:88)
> at
> org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:221)
> at
> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:679)
>
>
>
> --
> Thanks
> Harish
>
--
Thanks
Harish