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


#1

Hi all,

Actually this file is lib/felix.client.run.properties but I already tried to set classes from a profiler in this property but it didn't worked. I hope that you'll have more luck than I did :slight_smile:

Hope that helps,
Ben

路路路

On Fri, 11 Apr 2008 15:16:00 -0500 <heavy@ungoverned.org> wrote:

whereever you found the system packages property...this is a Felix property, so you will likely be setting it in the config.properties file of Felix in the SC, but I don't know where that is since I don't develop on SC...

If you can't find it, someone else will be able to tell you where. :slight_smile:

-> richard

p.s. I would try to find it for you, but I am emailing from my phone...

-----Original Message-----

From: "Thiago Bolaum" <bolaum@gmail.com>
Subj: Re: [sip-comm-dev] Profiling with netbeans...
Date: Fri Apr 11, 2008 15:09
Size: 4K
To: dev@sip-communicator.dev.java.net

where do I find this property?
In the build file?

On Fri, Apr 11, 2008 at 4:25 PM, <heavy@ungoverned.org> wrote:

>
> 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
>
> -----Original Message-----
>
> From: Damian Minkov <damencho@damencho.com>
> Subj: Re: [sip-comm-dev] Profiling with netbeans...
> Date: Fri Apr 11, 2008 1:32
> Size: 4K
> To: dev@sip-communicator.dev.java.net
>
> Hi,
>
> 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
> thing,
> so if you insert the package org.netbeans.lib.profiler.server as
> system package in lib/felix.client.run.properties in the property
> org.osgi.framework.system.packages=....
> 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.
>
> Cheers
> damencho
>
> Thiago Bolaum wrote:
> > I'm getting an error similar to the one in Eclipse:
> >
> > profile:
> > 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.)
> > java.lang.NoClassDefFoundError:
> > org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> > at
> >
> net.java.sip.communicator.util.UtilActivator.<clinit>(UtilActivator.java:25)
> > at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > at
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> > at
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> > 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.createBundleActivator(Felix.java:3432)
> > at
> org.apache.felix.framework.Felix._startBundle(Felix.java:1531)
> > at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
> > at
> > org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
> > at
> > org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
> > at java.lang.Thread.run(Thread.java:619)
> > java.lang.NoClassDefFoundError:
> > org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> >
> > 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>
> >
> > *<nbprofiledirect>
> > </nbprofiledirect>*
> > <!-- forking prevents from debugging -->
> > <java classname="org.apache.felix.main.Main"
> > fork="true"
> > failonerror="true"
> > classpathref="project.class.path">
> >
> > <!-- Sets the charset for the messages -->
> > <!--sysproperty key="icq.custom.message.charset"
> > value="windows-1252"/-->
> >
> > <!-- Tell felix to run sip-communicator-->
> > <sysproperty key="felix.config.properties"
> > value="file:${lib}/felix.client.run.properties"/>
> >
> > <!-- Tell java.util.logging about our logging preferences
> -->
> > <sysproperty key="java.util.logging.config.file"
> > value="${lib}/logging.properties"/>
> >
> > <sysproperty key="java.net.preferIPv6Addresses"
> > value="false"/>
> >
> > <!--sysproperty
> > key="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
> >
--- 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

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


#2

it didn't work... I've added

org.osgi.framework.boot.delegation= org.netbeans.lib.profiler.server;

to lib/felix.client.run.properties without success. Same error comes up.
I have copied jfluid-server.jar (which contains
org.netbeans.lib.profiler.server.ProfilerRuntimeCPUFullInstr) to lib/.
Didn't work either.

I'm lost xD

路路路

On Fri, Apr 11, 2008 at 5:26 PM, Benoit Pradelle <ze_real_neo@yahoo.fr> wrote:

Hi all,

Actually this file is lib/felix.client.run.properties but I already tried
to set classes from a profiler in this property but it didn't worked. I hope
that you'll have more luck than I did :slight_smile:

Hope that helps,
Ben

On Fri, 11 Apr 2008 15:16:00 -0500 > <heavy@ungoverned.org> wrote:

>
> whereever you found the system packages property...this is a Felix
property, so you will likely be setting it in the config.properties file of
Felix in the SC, but I don't know where that is since I don't develop on
SC...
>
> If you can't find it, someone else will be able to tell you where. :slight_smile:
>
> -> richard
>
> p.s. I would try to find it for you, but I am emailing from my phone...
>
> -----Original Message-----
>
> From: "Thiago Bolaum" <bolaum@gmail.com>
> Subj: Re: [sip-comm-dev] Profiling with netbeans...
> Date: Fri Apr 11, 2008 15:09
> Size: 4K
> To: dev@sip-communicator.dev.java.net
>
> where do I find this property?
> In the build file?
>
> On Fri, Apr 11, 2008 at 4:25 PM, <heavy@ungoverned.org> wrote:
>
> >
> > 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
> >
> > -----Original Message-----
> >
> > From: Damian Minkov <damencho@damencho.com>
> > Subj: Re: [sip-comm-dev] Profiling with netbeans...
> > Date: Fri Apr 11, 2008 1:32
> > Size: 4K
> > To: dev@sip-communicator.dev.java.net
> >
> > Hi,
> >
> > 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
> > thing,
> > so if you insert the package org.netbeans.lib.profiler.server as
> > system package in lib/felix.client.run.properties in the property
> > org.osgi.framework.system.packages=....
> > 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.
> >
> > Cheers
> > damencho
> >
> > Thiago Bolaum wrote:
> > > I'm getting an error similar to the one in Eclipse:
> > >
> > > profile:
> > > 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.)
> > > java.lang.NoClassDefFoundError:
> > > org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> > > at
> > >
> >
net.java.sip.communicator.util.UtilActivator.<clinit>(UtilActivator.java:25)
> > > at
> > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
> > > at
> > >
> >
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> > > at
> > >
> >
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> > > 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.createBundleActivator(Felix.java:3432)
> > > at
> > org.apache.felix.framework.Felix._startBundle(Felix.java:1531)
> > > at
org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
> > > at
> > >
org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
> > > at
> > >
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
> > > at java.lang.Thread.run(Thread.java:619)
> > > java.lang.NoClassDefFoundError:
> > > org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> > >
> > > 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>
> > >
> > > *<nbprofiledirect>
> > > </nbprofiledirect>*
> > > <!-- forking prevents from debugging -->
> > > <java classname="org.apache.felix.main.Main"
> > > fork="true"
> > > failonerror="true"
> > > classpathref="project.class.path">
> > >
> > > <!-- Sets the charset for the messages -->
> > > <!--sysproperty key="icq.custom.message.charset"
> > > value="windows-1252"/-->
> > >
> > > <!-- Tell felix to run sip-communicator-->
> > > <sysproperty key="felix.config.properties"
> > > value="file:${lib}/felix.client.run.properties"/>
> > >
> > > <!-- Tell java.util.logging about our logging
preferences
> > -->
> > > <sysproperty key="java.util.logging.config.file"
> > > value="${lib}/logging.properties"/>
> > >
> > > <sysproperty key="java.net.preferIPv6Addresses"
> > > value="false"/>
> > >
> > > <!--sysproperty
> > > key="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
> > >
> --- 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
>

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

--
Thiago 'bolaum' Borges Abdnur
----------------------------------
"Trust no one..."
- Deep Throat (The X-Files)