Bertrand Delacretaz created SLING-2640:
------------------------------------------
Summary: NPE in JcrResourceProviderFactory due to "impossible"
null Repository reference
Key: SLING-2640
URL: https://issues.apache.org/jira/browse/SLING-2640
Project: Sling
Issue Type: Bug
Components: JCR
Affects Versions: JCR Resource 2.1.0
Reporter: Bertrand Delacretaz
After heavy SCR-related activity, I get an NPE at
JcrResourceProviderFactory.java:136, which is
session = repository.loginAdministrative(workspace);
and repository is null, which in theory cannot happen as that's an @Reference.
This looks similar to FELIX-3317, but reporting here as it affects Sling and is
reproducible as follows:
1. Start the sling launchpad/builder
2. Install my test bundle from
https://github.com/bdelacretaz/bundle-start-stop-test, which semi-randomly
stops and restarts bundles to trigger SCR activity
3. When the test bundle says "Waiting up to 10000 msec to start next cycle" in
the log, request / and check the logs for the NPE. Maybe set a breakpoint on
that log message to better control the sequence
In my case I get the NPE after 3-4 cycles of the test stopping/restarting
bundles.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira