Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove jul-to-slf4j dependency; import * in osgi config #918

Merged
merged 1 commit into from Oct 20, 2015
Merged

remove jul-to-slf4j dependency; import * in osgi config #918

merged 1 commit into from Oct 20, 2015

Conversation

acoburn
Copy link
Contributor

@acoburn acoburn commented Oct 18, 2015

See: https://jira.duraspace.org/browse/FCREPO-1776

This change causes integration testing in fcrepo-http-api to generate more error output (the tests do not fail, though). That error output, however, is currently only masked in the integration tests. In a live system (e.g. in tomcat) that error output still appears.

@awoods
Copy link

awoods commented Oct 19, 2015

What is the error to which you refer?

@acoburn
Copy link
Contributor Author

acoburn commented Oct 20, 2015

The error occurs when a user operates on a resource in the context of a transaction, where that transaction ID that does not exist. For example:

curl -i localhost:8080/fcrepo/rest/tx:fake/foo

(here, tx:fake is a non-existent transaction id; foo is a resource that may exist)

The exception is wrapped in a ClientErrorException, so the REST API simply responds with a 410 Gone, but if you tail the container log (e.g. tomcat's catalina.out file), you will see a nice long stacktrace like this: https://gist.github.com/acoburn/86d46e4d4322cfa08160. I get that error with verson 4.3.0, 4.4.0 and the current snapshot. I am certain that it exists in earlier versions, too.

That same stacktrace had been appearing in the integration tests and was reported in pivotal. This was addressed with 58bdaa2 at which point the errors were no longer displayed during integration tests. However, that did not actually fix the error; it only covers it up so that it is not visible during integration tests.

The underlying issue is that Jersey is configured to Inject a session into some type of fedora AbstractResource, but if an exception is thrown before that session can be injected into the class, you get the "Unknown HK2 failure detected".

By removing the jul-to-slf4j dependency, you not only get OSGi support for fcrepo-http-commons, but you reveal an error in the implementation that currently exists, but which is masked. By revealing the error, it can be fixed.

@acoburn
Copy link
Contributor Author

acoburn commented Oct 20, 2015

The errors can also be revealed by removing these lines from the fcrepo-http-api module: https://github.com/fcrepo4/fcrepo4/blob/master/fcrepo-http-api/src/test/resources/logback-test.xml#L22-L24

awoods pushed a commit that referenced this pull request Oct 20, 2015
remove jul-to-slf4j dependency; import * in osgi config
@awoods awoods merged commit 19639e1 into fcrepo:master Oct 20, 2015
@acoburn acoburn deleted the fcrepo-1776 branch November 6, 2015 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants