freme-project / e-Link

Apache License 2.0
0 stars 0 forks source link

Problem in multiple e-link endpoints #44

Closed jnehring closed 8 years ago

jnehring commented 9 years ago

POST /e-link/documents does not work on freme-dev. The example from http://api-dev.freme-project.eu/doc/api-doc/full.html#!/e-Link/enrich produces

{
    "exception": "eu.freme.broker.exception.InternalServerErrorException",
    "path": "/e-link/documents",
    "message": "Unknown problem. Please contact us.",
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": 1443771005392
}

@ArneBinder maybe there is a connection with https://github.com/freme-project/e-Link/issues/42 or https://github.com/freme-project/Broker/issues/107

jnehring commented 9 years ago

Also GET /e-link/templates and GET /e-link/templates/{id} produce this error on api-dev. I did not test the other e-link endpoints.

I attached the brokers error log from freme-dev. It seems to be a problem with MySQL.

broker_error.log.txt broker.log.txt

ArneBinder commented 8 years ago

This happens because the documentation try-out button uses no authentication.
SecurityContextHolder.getContext().getAuthentication().authentication.getPrincipal() does not return an user Object, but a string "anonymousUser". @jnehring do you have an idea, why this happens? Can we change this, so that an User object with the name property "anonymousUser" is returned? Perhaps with an role "ROLE_ANONYMOUS"? How can we do this?

ArneBinder commented 8 years ago

fixed in authentication branch

jnehring commented 8 years ago

solved in master branch with a workaround, will be solved when https://github.com/freme-project/Broker/issues/107 is fixed.