[sip-comm-dev] Profiling with netbeans...


I don't know if anyone has mentioned it yet, but you could just add the profiler packages to the org.osgi.framework.boot.delegation property, then all bundles will have access to it without importing (assuming it is on the class path). This should only be used in your debugging setup...

-> richard

From: Damian Minkov <damencho@damencho.com>

Subj: Re: [sip-comm-dev] Profiling with netbeans...


-----Original Message-----
Date: Fri Apr 11, 2008 1:32
Size: 4K
To: dev@sip-communicator.dev.java.net


the error you get is that OSGi didn't see the classes of the profiler.
Its that the netbeans profiler replaces some classes to do the profile
so if you insert the package org.netbeans.lib.profiler.server as
system package in lib/felix.client.run.properties in the property
and then in the manifest files (util.manifest.mf and
fileaccess.manifest.mf) for the bundles util and fileaccess service
also import this package the problem will disappear.
The problem is that you have to do for all bundles that are started.
I don't know is there any workaround or hack for felix to avoid changing
all the manifest files, you
can search for an answer on the felix mailing list or post your question
regarding this importing of packages
on the list.


Thiago Bolaum wrote:

I'm getting an error similar to the one in Eclipse:

Profiler Agent: Waiting for connection on port 5140, timeout 10
seconds (Protocol version: 8)
Profiler Agent: Established local connection with the tool

Welcome to Felix.

ERROR: Error starting reference:file:sc-bundles/util.jar
(org.osgi.framework.BundleException: Activator start error.)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
ERROR: Error starting reference:file:sc-bundles/fileaccess.jar
(org.osgi.framework.BundleException: Activator start error.)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1531)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
        at java.lang.Thread.run(Thread.java:619)

I have created a new target called 'profile', taht is exactly like
run, except for a few tags:
<target name="profile" description="Profile Project">
    <fail unless="netbeans.home">Este destino s� pode ser executado no
NetBeans IDE.</fail>

         <!-- forking prevents from debugging -->
        <java classname="org.apache.felix.main.Main"

            <!-- Sets the charset for the messages -->
            <!--sysproperty key="icq.custom.message.charset"

            <!-- Tell felix to run sip-communicator-->
            <sysproperty key="felix.config.properties"

            <!-- Tell java.util.logging about our logging preferences -->
            <sysproperty key="java.util.logging.config.file"

            <sysproperty key="java.net.preferIPv6Addresses"

            <!-- Setting properties necessary for dependencies on
native libs.-->
            <sysproperty key="java.library.path"

            <!-- pass l10n properties from ant call for
                 easy translation debugging -->
            <sysproperty key="user.language" value="${user.language}" />
            <sysproperty key="user.country" value="${user.country}" />
            <sysproperty key="user.variant" value="${user.variant}" />

            <env key="LD_LIBRARY_PATH" path="${ld.library.path}"/>
            <env key="PATH" path="${path}"/>
            <env key="DYLD_LIBRARY_PATH" path="${dyld.library.path}"/>
* <jvmarg value="${profiler.info.jvmargs.agent}"/>*

I really don't know what's going on. Any tips would be precious!

Thiago 'bolaum' Borges Abdnur
"Trust no o

--- message truncated ---

To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net