[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [equinox-dev] Logging, exceptions, and the UserAdmin service
|
Doh. I completely missed the log command when I was
looking at the console commands. That would have come in handy a few days
ago. :-/
I have verified that exceptions are logged for
BundleActivator start() and Declarative Services activate()/deactivate(), and
when parsing malformed activator.xml files. However, BundleActivator
stop() does not log and instead the exceptions are sent to stdout. I
assume this is a bug I should log?
Ron
In answer to your question #2,
Declarative Services logs to the LogService in all of those cases. I'm
pretty sure that BundleActivator start() and stop() go to LogService as well.
Try running with -console and using the "log" console command.
Regards,
Roy
-----------------------------------------
Roy
Paterson
IBM Pervasive Computing
Austin, TX
Phone: (512)
838-8898
"Ron Baldwin"
<Ron.Baldwin@xxxxxxxxxxxxxxx> Sent by: equinox-dev-bounces@xxxxxxxxxxx
02/01/2006 04:29 PM
Please respond
to Equinox development mailing list
<equinox-dev@xxxxxxxxxxx> |
|
To
| "Equinox development mailing
list" <equinox-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| [equinox-dev] Logging,
exceptions, and the UserAdmin service |
|
Hi,
I have a few issues that I'm having difficulty finding
information on.
I would appreciate any assistance or pointers to
documentation.
1. Do messages logged with org.eclipse.equinox.log get
persisted to disk
anywhere, or do you have to have a listener to get them?
If a listener
is required, what's the best practices way of making
sure your listener
is running before log messages are generated?
2. Do
errors get logged somewhere when a BundleActivator start() or
stop() method
throws an exception? Also, I'm not seeing any errors when
the
activate() and deactivate() methods for declarative services throw,
or when
an activator.xml file is malformed. Instead everything just
fails
silently.
3. I'm trying to use org.eclipse.equinox.useradmin which requires
me to
load org.eclipse.equinox.preferences and
org.eclipse.equinox.registry.
Although all show as active in the console, I
can't get a reference to
the UserAdmin service which I'm guessing is due to
the log messages (see
below) generated on start up. What am I missing
here?
Thanks in advance,
Ron
!SESSION 2006-02-01
16:14:38.501
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.5.0_06
java.vendor=Sun
Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32,
NL=en_US
Command-line arguments:
-dev
file:D:/Dev/Users/Rbaldwin/Eclipse/workspace/.metadata/.plugins/org.ecli
pse.pde.core/OSGi
testing/dev.properties -console -os win32 -ws win32
-arch x86
!ENTRY
org.eclipse.osgi 4 0 2006-02-01 16:14:39.689
!MESSAGE An unexpected runtime
error has occurred.
!STACK 0
java.lang.NullPointerException
at
org.eclipse.core.internal.preferences.PreferencesService.getPrefExtensio
ns(PreferencesService.java:1134)
at
org.eclipse.core.internal.preferences.PreferencesService.initializeScope
s(PreferencesService.java:91)
at
org.eclipse.core.internal.preferences.PreferencesService.<init>(Preferen
cesService.java:170)
at
org.eclipse.core.internal.preferences.PreferencesService.getDefault(Pref
erencesService.java:83)
at
org.eclipse.core.internal.preferences.Activator.registerServices(Activat
or.java:74)
at
org.eclipse.core.internal.preferences.Activator.addingService(Activator.
java:80)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
java:1011)
at
org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:9
89)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTrack
er.java:917)
at
org.eclipse.osgi.framework.internal.core.FilteredServiceListener.service
Changed(FilteredServiceListener.java:71)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent
(BundleContextImpl.java:1219)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:189)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchrono
us(ListenerQueue.java:141)
at
org.eclipse.osgi.framework.internal.core.Framework.publishServiceEventPr
ivileged(Framework.java:1530)
at
org.eclipse.osgi.framework.internal.core.Framework.publishServiceEvent(F
ramework.java:1505)
at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.<init>(
ServiceRegistrationImpl.java:103)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.createService
Registration(BundleContextImpl.java:649)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerServi
ce(BundleContextImpl.java:601)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerServi
ce(BundleContextImpl.java:667)
at
org.eclipse.core.internal.registry.osgi.Activator.startRegistry(Activato
r.java:110)
at
org.eclipse.core.internal.registry.osgi.Activator.start(Activator.java:5
4)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
ontextImpl.java:994)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
r(BundleContextImpl.java:988)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
ontextImpl.java:969)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
st.java:316)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
undle.java:328)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
k.java:1041)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
(StartLevelManager.java:573)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
LevelManager.java:495)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
el(StartLevelManager.java:275)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
(StartLevelManager.java:455)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:189)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
nager.java:291)
!ENTRY
org.eclipse.equinox.preferences 4 0 2006-02-01 16:14:39.704
!MESSAGE
FrameworkEvent.ERROR
!STACK 0
java.lang.NullPointerException
at
org.eclipse.core.internal.preferences.PreferencesService.getPrefExtensio
ns(PreferencesService.java:1134)
at
org.eclipse.core.internal.preferences.PreferencesService.initializeScope
s(PreferencesService.java:91)
at
org.eclipse.core.internal.preferences.PreferencesService.<init>(Preferen
cesService.java:170)
at
org.eclipse.core.internal.preferences.PreferencesService.getDefault(Pref
erencesService.java:83)
at
org.eclipse.core.internal.preferences.Activator.registerServices(Activat
or.java:74)
at
org.eclipse.core.internal.preferences.Activator.addingService(Activator.
java:80)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
java:1011)
at
org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:9
89)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTrack
er.java:917)
at
org.eclipse.osgi.framework.internal.core.FilteredServiceListener.service
Changed(FilteredServiceListener.java:71)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent
(BundleContextImpl.java:1219)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:189)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchrono
us(ListenerQueue.java:141)
at
org.eclipse.osgi.framework.internal.core.Framework.publishServiceEventPr
ivileged(Framework.java:1530)
at
org.eclipse.osgi.framework.internal.core.Framework.publishServiceEvent(F
ramework.java:1505)
at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.<init>(
ServiceRegistrationImpl.java:103)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.createService
Registration(BundleContextImpl.java:649)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerServi
ce(BundleContextImpl.java:601)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerServi
ce(BundleContextImpl.java:667)
at
org.eclipse.core.internal.registry.osgi.Activator.startRegistry(Activato
r.java:110)
at
org.eclipse.core.internal.registry.osgi.Activator.start(Activator.java:5
4)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
ontextImpl.java:994)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
r(BundleContextImpl.java:988)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
ontextImpl.java:969)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
st.java:316)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
undle.java:328)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
k.java:1041)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
(StartLevelManager.java:573)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
LevelManager.java:495)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
el(StartLevelManager.java:275)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
(StartLevelManager.java:455)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:189)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
nager.java:291)
_______________________________________________
equinox-dev
mailing
list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev