You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (JIRA)" <ji...@apache.org> on 2011/04/16 20:18:05 UTC
[jira] [Commented] (STANBOL-175) Error when getting a mapping from
the entityhub
[ https://issues.apache.org/jira/browse/STANBOL-175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020640#comment-13020640 ]
Rupert Westenthaler commented on STANBOL-175:
---------------------------------------------
Parsing the ID of an Symbol to http://localhost:8080/entityhub/mapping is supposed to result in an error, because this method only accepts IDs of EntityMappings.
To lookup (possible multiple) mappings for an symbol one has to use curl "http://localhost:8080/entityhub/mapping/symbol?id={symbolId}"
However the reported error (java.lang.IllegalArgumentException) as well as the http error code are very misleading.
A request like this should rather return 404 Not Found
> Error when getting a mapping from the entityhub
> -----------------------------------------------
>
> Key: STANBOL-175
> URL: https://issues.apache.org/jira/browse/STANBOL-175
> Project: Stanbol
> Issue Type: Bug
> Components: Entity Hub
> Reporter: Fabian Christ
> Assignee: Rupert Westenthaler
> Labels: mapping
>
> 1) Lookup an entity using the entityhub/symbol/lookup endpoint:
> curl "http://localhost:8080/entityhub/symbol/lookup/?id=http://dbpedia.org/resource/Paris&create=true"
> In the JSON result you get the ID, e.g.: "id": "urn:org.apache.stanbol:entityhub:symbol.1265dfa5-f39a-a033-4d0a-0dc0bfb53fb7"
> 2) Get the mapping for this ID using entityhub/mapping endpoint:
> curl "http://localhost:8080/entityhub/mapping?id=urn:org.apache.stanbol:entityhub:symbol.1265dfa5-f39a-a033-4d0a-0dc0bfb53fb7"
> 3) You get the following error message:
> Representation urn:org.apache.stanbol:entityhub:symbol.1265dfa5-f39a-a033-4d0a-0dc0bfb53fb7 does not define required field http://www.iks-project.eu/ontology/rick/model/mappedEntity - <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 500 Representation urn:org.apache.stanbol:entityhub:symbol.1265dfa5-f39a-a033-4d0a-0dc0bfb53fb7 does not define required field http://www.iks-project.eu/ontology/rick/model/mappedEntity</title>
> </head>
> <body><h2>HTTP ERROR 500</h2>
> <p>Problem accessing /entityhub/mapping. Reason:
> <pre> Representation urn:org.apache.stanbol:entityhub:symbol.1265dfa5-f39a-a033-4d0a-0dc0bfb53fb7 does not define required field http://www.iks-project.eu/ontology/rick/model/mappedEntity</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalArgumentException: Representation urn:org.apache.stanbol:entityhub:symbol.1265dfa5-f39a-a033-4d0a-0dc0bfb53fb7 does not define required field http://www.iks-project.eu/ontology/rick/model/mappedEntity
> at org.apache.stanbol.entityhub.core.model.DefaultEntityMappingImpl.<init>(DefaultEntityMappingImpl.java:97)
> at org.apache.stanbol.entityhub.core.impl.EntityhubImpl.getEntityMappingFromYard(EntityhubImpl.java:467)
> at org.apache.stanbol.entityhub.core.impl.EntityhubImpl.getMappingById(EntityhubImpl.java:475)
> at org.apache.stanbol.entityhub.jersey.resource.EntityMappingResource.getMapping(EntityMappingResource.java:98)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira