Thanks Simon. We will look into this. I was told by a colleague that we
do, indeed, have a .log file that is generated and it did have this
exception logged in it.

 

  - Chris

 


 
 
 
 
THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED. IT 
MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM 
DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, your 
use of this message for any purpose is strictly prohibited. If you have 
received this communication in error, please delete the message and notify the 
sender so that we may correct our records.
 
________________________________
 
 


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simon J Archer
Sent: Thursday, July 24, 2008 10:07 AM
To: Equinox development mailing list
Cc: Equinox development mailing list; [EMAIL PROTECTED]
Subject: Re: [equinox-dev] Declarative Services exception

 


Hi Chris 

I would suggest installing the Equinox log service bundle
org.eclipse.equinox.log. The SCR will log exceptions such as these to
the LogService, if available.  Since the LogService is purely a
message-sink, you'll either have to add a LogListener to the
LogReaderService to dump log events to the console, or simply use the
Equinox OSGi console's "log" command to do that for you.  The downside
of the "log" command is that it simply dumps the entire contents of the
LogService's internal buffer (by default 100 entries), which might mean
that you will miss important messages if the application is particularly
noisy. 

Good luck, 

Simon 





"Chris Hopkins" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED] 

07/24/2008 09:46 AM 

Please respond to
Equinox development mailing list <[email protected]>

To

"Equinox development mailing list" <[email protected]> 

cc

 

Subject

[equinox-dev] Declarative Services exception

 

 

 




Hi - 
  
We are using DS for our project and have run into a situation where an
exception is being swallowed somewhere and we only see it when we turn
tracing on for the OSGi jar in our run configuration. Included below is
an example of the exception that is happening within the constructor of
our service. Is there a way to surface these exceptions without
resorting to turning on tracing. 
  
Thanks, 
Chris 
  
GenerateScenarioCommandComponentName Service Registration.getService()
exception: Exception occured while creating new instance of component
GenerateScenarioCommandComponentName
org.osgi.service.component.ComponentException: Exception occured while
creating new instance of component GenerateScenarioCommandComponentName
  at
org.eclipse.equinox.ds.model.ServiceComponent.createInstance(ServiceComp
onent.java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.createInstance(Service
ComponentProp.java:229)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:282)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:373)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:379)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:379)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:373)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponents(InstanceProcess.j
ava:113)
  at org.eclipse.equinox.ds.Resolver.performWork(Resolver.java:627)
  at
org.eclipse.equinox.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:593
)
  at org.eclipse.equinox.ds.WorkThread.run(WorkThread.java:84)
  at
org.eclipse.equinox.util.impl.tpt.threadpool.Executor.run(Executor.java:
84)
Caused by: java.lang.NullPointerException
  at
com.draper.jaguar.metronome.command.scenariobuilder.ScenarioBuilderComma
nd.getJaguarDocument(ScenarioBuilderCommand.java:71)
  at
com.draper.jaguar.metronome.command.scenariobuilder.GenerateScenarioComm
and.<init>(GenerateScenarioCommand.java:52)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
  at java.lang.reflect.Constructor.newInstance(Unknown Source)
  at java.lang.Class.newInstance0(Unknown Source)
  at java.lang.Class.newInstance(Unknown Source)
  at
org.eclipse.equinox.ds.model.ServiceComponent.createInstance(ServiceComp
onent.java:211)
  ... 60 more
Nested Exception:
java.lang.NullPointerException
  at
com.draper.jaguar.metronome.command.scenariobuilder.ScenarioBuilderComma
nd.getJaguarDocument(ScenarioBuilderCommand.java:71)
  at
com.draper.jaguar.metronome.command.scenariobuilder.GenerateScenarioComm
and.<init>(GenerateScenarioCommand.java:52)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
  at java.lang.reflect.Constructor.newInstance(Unknown Source)
  at java.lang.Class.newInstance0(Unknown Source)
  at java.lang.Class.newInstance(Unknown Source)
  at
org.eclipse.equinox.ds.model.ServiceComponent.createInstance(ServiceComp
onent.java:211)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.createInstance(Service
ComponentProp.java:229)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:282)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:373)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:379)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:379)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at org.eclipse.equinox.ds.ServiceReg.getService(ServiceReg.java:51)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse$1.run(ServiceUse.jav
a:108)
  at java.security.AccessController.doPrivileged(Native Method)
  at
org.eclipse.osgi.framework.internal.core.ServiceUse.getService(ServiceUs
e.java:106)
  at
org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.getServ
ice(ServiceRegistrationImpl.java:345)
  at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(Bu
ndleContextImpl.java:884)
  at
org.eclipse.equinox.ds.InstanceProcess.getService(InstanceProcess.java:4
92)
  at
org.eclipse.equinox.ds.model.ComponentReference.getMethod(ComponentRefer
ence.java:115)
  at
org.eclipse.equinox.ds.model.ComponentReference.bind(ComponentReference.
java:215)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bindReference(ServiceC
omponentProp.java:373)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.bind(ServiceComponentP
rop.java:196)
  at
org.eclipse.equinox.ds.model.ServiceComponentProp.build(ServiceComponent
Prop.java:294)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponent(InstanceProcess.ja
va:435)
  at
org.eclipse.equinox.ds.InstanceProcess.buildComponents(InstanceProcess.j
ava:113)
  at org.eclipse.equinox.ds.Resolver.performWork(Resolver.java:627)
  at
org.eclipse.equinox.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:593
)
  at org.eclipse.equinox.ds.WorkThread.run(WorkThread.java:84)
  at
org.eclipse.equinox.util.impl.tpt.threadpool.Executor.run(Executor.java:
84) 
  

  
  
  
  
THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS
ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL
AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the
intended recipient, your use of this message for any purpose is strictly
prohibited. If you have received this communication in error, please
delete the message and notify the sender so that we may correct our
records. 
  
  
 _______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to