Hi Gili,

lib.profiler/build.xml contains code like:
    <target name="jar" depends="init,compile,jar-prep">
        <!-- Client side -->
        <jarwithmoduleattributes jarfile="${cluster}/${module.jar}"
compress="${build.package.compress}" index="${build.package.index}"
manifest="${manifest.mf}" stamp="${cluster}/.lastModified">
            <fileset dir="${build.classes.dir}">
              <exclude name="org/netbeans/lib/profiler/server/**"/>
            </fileset>
        </jarwithmoduleattributes>

Which will build the module jar without the "server" package. (And then it
builds a separate jar with the package.)

Jan


On Sun, Feb 18, 2018 at 11:25 AM, cowwoc <cow...@bbs.darktech.org> wrote:

> Hi Jan,
>
> I will probably skip the unit test in this case. Out of curiosity, how can
> you tell that the build is stripping the "server" package from the module
> jar and placing it in another jar? I mean, which build files / lines show
> this happening?
>
> Thank you,
> Gili
>
>
> On 2018-02-18 5:03 AM, Jan Lahoda wrote:
>
>> Hi Gili,
>>
>> I know nearly nothing about the profiler, unfortunately.
>>
>> For the problem with the test, seems that the build is stripping the
>> "server" package from the module jar and placing it in another jar. This
>> could be solved by adding:
>> test.unit.cp.extra=${cluster}/${jfluid.server.jar}
>> to nbproject/project.properties, but I don't know if that's desirable.
>>
>> For the NPEs, I don't know what's the problem. I'd probably try a clean
>> build (unless you had one), but don't personally have much other ideas,
>> unfortunately.
>>
>> Jan
>>
>>
>> On Sat, Feb 17, 2018 at 1:09 PM, cowwoc <cow...@bbs.darktech.org> wrote:
>>
>> I attempted to skip the unit test and manually test my fix, but now when I
>>> try to run the profiler (from my local build) I get the following
>>> exception
>>> when I right-click on a Java file and "Profile File":
>>>
>>> java.lang.NullPointerException
>>>      at org.netbeans.lib.profiler.ui.cpu.LiveCPUViewUpdater$CCTHandl
>>> er.registerUpdater(LiveCPUViewUpdater.java:106)
>>>      at org.netbeans.lib.profiler.ui.cpu.LiveCPUViewUpdater.<init>(L
>>> iveCPUViewUpdater.java:58)
>>>      at org.netbeans.modules.profiler.v2.features.MethodsFeatureUI.i
>>> nitUI(MethodsFeatureUI.java:222)
>>>      at org.netbeans.modules.profiler.v2.features.MethodsFeatureUI.g
>>> etResultsUI(MethodsFeatureUI.java:100)
>>>      at org.netbeans.modules.profiler.v2.features.MethodsFeature.get
>>> ResultsUI(MethodsFeature.java:492)
>>>      at org.netbeans.modules.profiler.v2.impl.FeaturesView.createCon
>>> tainer(FeaturesView.java:149)
>>>      at org.netbeans.modules.profiler.v2.impl.FeaturesView.addFeatur
>>> e(FeaturesView.java:134)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow.updateFeatur
>>> es(ProfilerWindow.java:373)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow.popupulateUI
>>> (ProfilerWindow.java:275)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow.access$200(P
>>> rofilerWindow.java:132)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow$1$1.run(Prof
>>> ilerWindow.java:200)
>>>      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.
>>> java:311)
>>>      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
>>>      at java.awt.EventQueue.access$500(EventQueue.java:97)
>>>      at java.awt.EventQueue$3.run(EventQueue.java:709)
>>>      at java.awt.EventQueue$3.run(EventQueue.java:703)
>>>      at java.security.AccessController.doPrivileged(Native Method)
>>>      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doInte
>>> rsectionPrivilege(ProtectionDomain.java:80)
>>>      at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
>>>      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEve
>>> ntQueue.java:136)
>>> [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDis
>>> patchThread.java:201)
>>>      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispat
>>> chThread.java:116)
>>>      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis
>>> patchThread.java:105)
>>>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.
>>> java:101)
>>>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.
>>> java:93)
>>>      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
>>>
>>> And then this exception every time I try to configure the debugging
>>> session:
>>>
>>> java.lang.NullPointerException
>>>      at org.netbeans.modules.profiler.v2.impl.FeaturesView.getSelect
>>> edFeature(FeaturesView.java:215)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow.updateFeatur
>>> es(ProfilerWindow.java:370)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow.access$600(P
>>> rofilerWindow.java:132)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow$5.featuresCh
>>> anged(ProfilerWindow.java:272)
>>>      at org.netbeans.modules.profiler.v2.ProfilerFeatures.fireFeatur
>>> esChanged(ProfilerFeatures.java:290)
>>>      at org.netbeans.modules.profiler.v2.ProfilerFeatures.activateFe
>>> ature(ProfilerFeatures.java:123)
>>>      at org.netbeans.modules.profiler.v2.ProfilerFeatures.toggleActi
>>> vated(ProfilerFeatures.java:162)
>>>      at org.netbeans.modules.profiler.v2.ProfilerWindow$19.fireActio
>>> nPerformed(ProfilerWindow.java:585)
>>>      at org.netbeans.lib.profiler.ui.swing.StayOpenPopupMenu$Item.ac
>>> tionPerformed(StayOpenPopupMenu.java:156)
>>>      at org.netbeans.lib.profiler.ui.swing.StayOpenPopupMenu.perform
>>> Action(StayOpenPopupMenu.java:111)
>>>      at org.netbeans.lib.profiler.ui.swing.StayOpenPopupMenu.perform
>>> Action(StayOpenPopupMenu.java:119)
>>>      at org.netbeans.lib.profiler.ui.swing.StayOpenPopupMenu.access$
>>> 000(StayOpenPopupMenu.java:47)
>>>      at org.netbeans.lib.profiler.ui.swing.StayOpenPopupMenu$Item.pr
>>> ocessMouseEvent(StayOpenPopupMenu.java:161)
>>>      at java.awt.Component.processEvent(Component.java:6298)
>>>      at java.awt.Container.processEvent(Container.java:2237)
>>>      at java.awt.Component.dispatchEventImpl(Component.java:4889)
>>>      at java.awt.Container.dispatchEventImpl(Container.java:2295)
>>>      at java.awt.Component.dispatchEvent(Component.java:4711)
>>>      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.
>>> java:4889)
>>>      at java.awt.LightweightDispatcher.processMouseEvent(Container.j
>>> ava:4526)
>>>      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:
>>> 4467)
>>>      at java.awt.Container.dispatchEventImpl(Container.java:2281)
>>>      at java.awt.Window.dispatchEventImpl(Window.java:2746)
>>>      at java.awt.Component.dispatchEvent(Component.java:4711)
>>>      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
>>>      at java.awt.EventQueue.access$500(EventQueue.java:97)
>>>      at java.awt.EventQueue$3.run(EventQueue.java:709)
>>>      at java.awt.EventQueue$3.run(EventQueue.java:703)
>>>      at java.security.AccessController.doPrivileged(Native Method)
>>>      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doInte
>>> rsectionPrivilege(ProtectionDomain.java:80)
>>>      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doInte
>>> rsectionPrivilege(ProtectionDomain.java:90)
>>>      at java.awt.EventQueue$4.run(EventQueue.java:731)
>>>      at java.awt.EventQueue$4.run(EventQueue.java:729)
>>>      at java.security.AccessController.doPrivileged(Native Method)
>>>      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doInte
>>> rsectionPrivilege(ProtectionDomain.java:80)
>>>      at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
>>>      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEve
>>> ntQueue.java:136)
>>> [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDis
>>> patchThread.java:201)
>>>      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispat
>>> chThread.java:116)
>>>      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis
>>> patchThread.java:105)
>>>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.
>>> java:101)
>>>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.
>>> java:93)
>>>      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
>>>
>>> I did not touch this code.
>>>
>>> It seems like a problem with the build system or the way I ran my local
>>> build because I don't get this problem with the official nightly builds.
>>>
>>> To build I ran "ant". I then ran nbbuild/netbeans/bin/netbeans64.exe
>>> (I'm
>>> on Windows).
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Gili
>>>
>>>
>>> On 2018-02-17 6:10 AM, cowwoc wrote:
>>>
>>> To clarify, I changed org.netbeans.lib.profiler.serv
>>>> er.ProfilerRuntimeCPU.getParSize() from private to package-private. So
>>>> this should work...
>>>>
>>>> Gili
>>>>
>>>> On 2018-02-17 6:07 AM, cowwoc wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I am attempting to add a unit test for a bug I am working on in the
>>>>> profiler module. I am getting the following error:
>>>>>
>>>>> projectized-common.do-unit-test-build:
>>>>> Compiling 3 source files to C:\Users\Gili\Documents\3rdpar
>>>>> ty\incubator-netbeans-cowwoc\lib.profiler\build\test\unit\classes
>>>>> C:\Users\Gili\Documents\3rdparty\incubator-netbeans-cowwoc\
>>>>> lib.profiler\test\unit\src\org\netbeans\lib\profiler\serv
>>>>> er\ProfilerRuntimeCPUTest.java:36: error: cannot find symbol
>>>>>          ProfilerRuntimeCPU.getParSize(value);
>>>>>    symbol:   variable ProfilerRuntimeCPU
>>>>>    location: class ProfilerRuntimeCPUTest
>>>>> 1 error
>>>>>
>>>>> But I have declared the unit test in the same package as
>>>>> org.netbeans.lib.profiler.server which is where
>>>>> org.netbeans.lib.profiler.server.ProfilerRuntimeCPU so I expect it to
>>>>> be seen...
>>>>>
>>>>> Are you guys doing something special in your Ant build? Any idea how to
>>>>> fix this?
>>>>>
>>>>> Thank you,
>>>>> Gili
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
>>> For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>
>>>
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Reply via email to