[
https://issues.apache.org/jira/browse/OLINGO-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808882#comment-13808882
]
Stephan Klevenz commented on OLINGO-50:
---------------------------------------
For error cases OData does define this error response which is not sufficient
for development use cases.
Olingo hasn't implemented any log and trace functionality and that is just
because of Olingo doesn't want a dependency to a specific L&T api.
However, Olingo supports the developer use case in a different way and we just
miss the documentation for it.
Here is a short explantaion:
private final class ScenarioDebugCallback implements ODataDebugCallback {
@Override
public boolean isDebugEnabled() {
return true;
}
}
In your service factory (ODataServiceFactory) implement the following method:
public <T extends ODataCallback> T getCallback(final Class<? extends
ODataCallback> callbackInterface) {
return (T) (callbackInterface.isAssignableFrom(ScenarioErrorCallback.class) ?
new ScenarioErrorCallback() :
callbackInterface.isAssignableFrom(ODataDebugCallback.class) ? new
ScenarioDebugCallback() : super.getCallback(callbackInterface));
}
If this is in place then add odata-debug=json as additional query parameter to
the URL in the browser. Now the server will return an extensive json object
conteining detailed error information.
> Exceptions are not throw
> ------------------------
>
> Key: OLINGO-50
> URL: https://issues.apache.org/jira/browse/OLINGO-50
> Project: Olingo
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Thiago Assis
>
> I cant see the stack trace of the generated exception, is not generated in te
> application server log and the browser returns
> <?xml version='1.0' encoding='UTF-8'?><error
> xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code/><message
> xml:lang="en-US">An exception occurred.</message></error>
> This happen when i request the URL: http://localhost:8888/odata/
--
This message was sent by Atlassian JIRA
(v6.1#6144)