[ 
https://issues.apache.org/jira/browse/SLING-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594904#action_12594904
 ] 

Carsten Ziegeler commented on SLING-431:
----------------------------------------

I experienced the same strange log entry about the ClassNotFoundException. The 
reason was that my repository client bundle did not have an import for 
org.osgi.service.log. This *should* be generated by the maven plugin, but for 
some strange reasons it did not. Even more strange: the app did run without any 
problems.
So have a look if this import is in the client bundle; if not it should be 
added.

> Unexplained NPE in AbstractSlingRepository.pingAndCheck
> -------------------------------------------------------
>
>                 Key: SLING-431
>                 URL: https://issues.apache.org/jira/browse/SLING-431
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> I've found this trace in the log of my custom launchpad-based Sling webapp:
> Exception in thread "Repository Pinger" java.lang.NullPointerException
>         at 
> org.apache.sling.jcr.base.AbstractSlingRepository.pingAndCheck(AbstractSlingRepository.java:481)
>         at 
> org.apache.sling.jcr.base.AbstractSlingRepository.run(AbstractSlingRepository.java:898)
>         at java.lang.Thread.run(Thread.java:613)
> This happened at startup, but only once with many successful startups with 
> the same code and configuration.
> The corresponding code line is the log.log call in 
>             } catch(RepositoryException re) {
>                 log.log(LogService.LOG_INFO, "pingAndCheck; 
> loginAdministrative failed", re);
>             }
> So the only explanation is that log is null, which is "impossible" looking at 
> the source code: the thread that calls pingAndCheck is created in activate(), 
> which must be called by the OSGi framework after initializing the log member 
> variable:
>      /** @scr.reference bind="bindLog" unbind="unbindLog" */
>     private LogService log;
> There is something weird about the log class, in the error log:
> 07.05.2008 13:20:39.574 *ERROR* [SCR Component Actor] 
> org.apache.sling.jcr.jackrabbit.client 
> [org.apache.sling.jcr.jackrabbit.client.SlingClientRepository] Cannot load 
> class used as parameter org.osgi.service.log.Lo
> gService (java.lang.ClassNotFoundException: org.osgi.service.log.LogService) 
> java.lang.ClassNotFoundException: org.osgi.service.log.LogService
>         at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1504)
> That happens before the above NPE.
> I won't investigate further for now, but this looks like a weird 
> timing-related bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to