[ 
https://issues.apache.org/jira/browse/OLINGO-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14178557#comment-14178557
 ] 

Eugenio Lentini commented on OLINGO-464:
----------------------------------------

HI,
to reproduce the issue I have done a try on the CarService example, I have 
created the project as described and then I have changed the web descriptor to 
use the ODataServlet provided with the core and it does not work, I have the 
same issue in 1.2.0 and 2.0.0.

When I hit the URL http://127.0.0.1:8080/CarService.svc/ I get the following 
error
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";>
<code/>
<message xml:lang="en-US">Could not find container with name: 
'CarService'.</message>
</error>

After a bit of debugging I have found that the issue is related to how the 
ODataPathSegments are built in the ODataRequest in the ODataServlet by means of 
the method buildODataPathInfo in org.apache.olingo.odata2.core.servlet.RestUtil 
class. 

If I run with CXFNonSpringJaxrsServlet the ODataPathSegments are 0, instead 
with the servlet I get 2 OdataPathSegments:
- "CarService.svc"
- ""

Finally in the method CarEdmProvider.getEntityContainerInfo() the variable name 
is equal to "CarService" and this cause the exception.

Could you please have a look? for us it is quite important for business reasons.
Thanks a lot for the attention.
Eugenio

> Wrong entity container name
> ---------------------------
>
>                 Key: OLINGO-464
>                 URL: https://issues.apache.org/jira/browse/OLINGO-464
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 1.2.0, V2 2.0.0
>            Reporter: Eugenio Lentini
>            Priority: Critical
>
> Hi,
> I have the OData service available on http://127.0.0.1:8081/res.svc/ when I 
> invoke the service I get an issue with the name of the entity container.
> The issue comes from UriParserImpl.java line 169
> final String entityContainerName = percentDecode(matcher.group(1));
> and as entity container name I get "res" and segment name "svc".
> Then in my EdmProvider implementation the method getEntityContainerInfo check 
> if the name passed is equal to "ODataResEntityContainer" and it fails. This 
> is the same behavior I have found in the doc 
> http://olingo.apache.org/doc/odata2/tutorials/basicread.html
> I use the ODataServlet in my configuration.
> I have not changed the code since 2nd of July, before was perfectly working, 
> now something has changed I guess. Do you know what has happened?
> Thanks a lot for your attention.
> Eugenio



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to