Hi Simo,

I have it working - thanks :) One last question: does it have any
relation to the sling threaddump bundle? That one can be found here:
sling-trunk/bundles/commons/threaddump

Cheers,

David

On 25 August 2015 at 14:20, David Bosschaert <[email protected]> wrote:
> Ok - I understand it now. Inventory printer has this in its manifest:
>
>   DynamicImport-Package: javax.servlet, javax.servlet.http
>
> This explains why it resolved in the first place. I guess I don't
> understand why these are imported via DI-P and not via normal imports,
> but that's not an issue with threaddump.
>
> Thanks Simo, I'll play a bit more with it...
>
> Cheers,
>
> David
>
> On 25 August 2015 at 13:55, Simone Tripodi <[email protected]> wrote:
>> Hi again, David!
>>
>> just a small hint: I suggest you to test the bundle inside the WebConsole
>> also to see the service working and see the produced output... would it
>> help?
>> TIA, all the best!
>> -Simo-
>>
>>
>> http://people.apache.org/~simonetripodi/
>> http://twitter.com/simonetripodi
>>
>> On Tue, Aug 25, 2015 at 2:49 PM, Simone Tripodi <[email protected]>
>> wrote:
>>
>>> Hi David!
>>> Thanks a lot for taking care of it, much more than appreciated! :)
>>> The javax.servlet APIs are required by the InventoryPrinter APIs, it is a
>>> transitive dependency (in Maven therms :P)
>>> HTH, please get back to me if/when needed!
>>> All the best,
>>> -Simo-
>>>
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://twitter.com/simonetripodi
>>>
>>> On Tue, Aug 25, 2015 at 12:55 PM, David Bosschaert <
>>> [email protected]> wrote:
>>>
>>>> Hi Simo,
>>>>
>>>> Just tried the threaddump bundle (with it's dependency 'inventory'
>>>> 1.0.4) and it gives me an exception (see below), which seems to come
>>>> from its activator start() method. I'm not sure what it does, but it
>>>> looks like something is missing an import-package for the
>>>> javax.servlet APIs somewhere...
>>>>
>>>> Cheers,
>>>>
>>>> David
>>>>
>>>> Here's what I'm getting:
>>>>
>>>> g! lb
>>>> START LEVEL 1
>>>>    ID|State      |Level|Name
>>>>     0|Active     |    0|System Bundle (5.2.0)
>>>>     1|Active     |    1|Apache Felix Bundle Repository (2.0.4)
>>>>     2|Active     |    1|Apache Felix Gogo Command (0.14.0)
>>>>     3|Active     |    1|Apache Felix Gogo Runtime (0.16.2)
>>>>     4|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>>>>     5|Active     |    1|Apache Felix Inventory (1.0.4)
>>>>     6|Installed  |    1|Apache Felix Thread Dump (0.0.1.SNAPSHOT)
>>>> g! start 6
>>>> ERROR: Bundle org.apache.felix.inventory [5] EventDispatcher: Error
>>>> during dispatch. (java.lang.NoClassDefFoundError:
>>>> javax/servlet/http/HttpServlet)
>>>> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
>>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2350)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2134)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1526)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>>> at
>>>> org.apache.felix.inventory.impl.InventoryPrinterAdapter.registerConsole(InventoryPrinterAdapter.java:75)
>>>> at
>>>> org.apache.felix.inventory.impl.InventoryPrinterManagerImpl.addService(InventoryPrinterManagerImpl.java:208)
>>>> at
>>>> org.apache.felix.inventory.impl.InventoryPrinterManagerImpl.addingService(InventoryPrinterManagerImpl.java:128)
>>>> at
>>>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>>>> at
>>>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>>>> at
>>>> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>>>> at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>>>> at
>>>> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
>>>> at
>>>> org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)
>>>> at
>>>> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
>>>> at
>>>> org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
>>>> at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4560)
>>>> at org.apache.felix.framework.Felix.registerService(Felix.java:3542)
>>>> at
>>>> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
>>>> at
>>>> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:322)
>>>> at
>>>> org.apache.felix.threaddump.internal.ThreadDumpActivator.start(ThreadDumpActivator.java:60)
>>>> at
>>>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
>>>> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2220)
>>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:2138)
>>>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
>>>> at org.apache.felix.gogo.command.Basic.start(Basic.java:729)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:483)
>>>> at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
>>>> at
>>>> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
>>>> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)
>>>> at
>>>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)
>>>> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>>>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)
>>>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)
>>>> at
>>>> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
>>>> at org.apache.felix.gogo.shell.Console.run(Console.java:62)
>>>> at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
>>>> at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:483)
>>>> at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
>>>> at
>>>> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
>>>> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)
>>>> at
>>>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)
>>>> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>>>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)
>>>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)
>>>> at
>>>> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
>>>> at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
>>>> at java.lang.Thread.run(Thread.java:745)
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> javax.servlet.http.HttpServlet not found by org.apache.felix.inventory
>>>> [5]
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
>>>> at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>>> ... 66 more
>>>>
>>>> On 25 August 2015 at 11:14, David Bosschaert <[email protected]>
>>>> wrote:
>>>> > Hi Simo,
>>>> >
>>>> > I have never used it but I can give it a go and start the release
>>>> sometime soon.
>>>> >
>>>> > Cheers,
>>>> >
>>>> > David
>>>> >
>>>> > On 25 August 2015 at 10:43, Simone Tripodi <[email protected]>
>>>> wrote:
>>>> >> Hi all! :)
>>>> >>
>>>> >> the org.apache.felix.threaddump[1], contributed to FELIX-3339,
>>>> produces a
>>>> >> valid output which is very useful to analysts because it can be read by
>>>> >> common used tools, such as TDA...
>>>> >> Since the issue is marked as resolved on 20 Jun 13 and the bundle has
>>>> never
>>>> >> been released, would it be possible one of you committers releases it?
>>>> >> Any help would be very appreciate, many thanks in advance, all the
>>>> best!
>>>> >> -Simo
>>>> >>
>>>> >> [1] https://svn.apache.org/repos/asf/felix/trunk/threaddump
>>>> >>
>>>> >> http://people.apache.org/~simonetripodi/
>>>> >> http://twitter.com/simonetripodi
>>>>
>>>
>>>

Reply via email to