This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am trying to get freeform project configured in NB5beta with Profiler M11. When I have a file selected and I choose menu action: Profile => Profile Other => Profile "<classname>.java" I get the following exception in a error dialog and profiler does not start. java.lang.IllegalArgumentException: profile-tests at org.netbeans.modules.ant.freeform.LookupMergerImpl$ActionProviderImpl.invokeAction(LookupMergerImpl.java:115) at org.netbeans.modules.profiler.utils.ProjectUtilities.invokeAction(ProjectUtilities.java:236) at org.netbeans.modules.profiler.actions.AntActions.doProfileProject(AntActions.java:310) at org.netbeans.modules.profiler.actions.AntActions.access$000(AntActions.java:47) at org.netbeans.modules.profiler.actions.AntActions$1.perform(AntActions.java:99) at org.netbeans.modules.profiler.actions.FileSensitiveAction.actionPerformed(FileSensitiveAction.java:51) at org.netbeans.modules.profiler.actions.ProjectSensitiveAction.actionPerformed(ProjectSensitiveAction.java:95) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.AbstractButton.doClick(AbstractButton.java:302) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleased(BasicMenuItemUI.java:1104) at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:578) at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:475) at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:422) at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:283) at javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.eventDispatched(BasicPopupMenuUI.java:758) at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2206) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2100) at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:3867) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) The Java class was one a JUnit test program which did not require a web container. Here are the steps I followed: Defined following ant target in my freeform ant script: ------------------------------------------------------- <target name="nb5-profile-selected-file" depends="compile" description="Profile File"> <fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail> <fail unless="profile.class">This target can only run inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> <path refid="jaxr.provider.run.classpath"/> <path refid="server.run.classpath"/> <path refid="test.run.classpath"/> <path refid="jaxr.browser.run.classpath"/> <pathelement location="${build.classes}"/> <pathelement location="${build.test}/classes"/> </classpath> </nbprofiledirect> <java classname="{profile.class}" fork="yes"> <jvmarg value="${profiler.info.jvmargs.agent}"/> <sysproperty key="java.endorsed.dirs" value="${build.lib.endorsed}"/> <!-- Set the Endorsed Override Directory for J2SE 1.4 and above --> <sysproperty key="http.proxyHost" value="${proxyHost}"/> <sysproperty key="http.proxyPort" value="${proxyPort}"/> <sysproperty key="http.nonProxyHosts" value="${nonProxyHosts}"/> <sysproperty key="org.apache.commons.logging.Log" value="${apacheLog}"/> <sysproperty key="org.apache.commons.logging.simplelog.defaultlog" value="trace"/> </java> Edited my project.xml file: --------------------------- I manually edited my project.xml file to contain: <ide-actions> .... <action name="profile-selected-file"> <target>nb5-profile-selected-file</target> <context> <property>profile.class</property> <folder>test</folder> <pattern>\.java$</pattern> <format>java-name</format> <arity> <one-file-only/> </arity> </context> </action> .... </ide-actions> The entire project.xml file follows next in case you need it: -------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!-- $Header: /cvsroot/ebxmlrr/omar/nbproject/project.xml,v 1.7 2005/02/28 20:59:24 doballve Exp $--> <project xmlns="http://www.netbeans.org/ns/project/1"> <type>org.netbeans.modules.ant.freeform</type> <configuration> <data xmlns="http://www.netbeans.org/ns/profiler/1" version="0.4" profile-target="profile" profile-file-target="profile-single"/> <!--web-data xmlns="http://www.netbeans.org/ns/freeform-project-web/1"> <web-module> <doc-root>${project.dir}/web</doc-root> <classpath>${project.dir}/src/java</classpath> <context-path>${omar.name}</context-path> <j2ee-spec-level>1.4</j2ee-spec-level> </web-module> </web-data--> <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> <name>The ebXML Registry Project</name> <!--properties> <property-file>build-path.properties</property-file> </properties--> <folders> <source-folder> <label>src/java</label> <type>java</type> <location>src/java</location> </source-folder> <source-folder> <label>test</label> <type>java</type> <location>test</location> </source-folder> <source-folder> <label>src/resources</label> <type>java</type> <location>src/resources</location> </source-folder> <source-folder> <label>jsp/thin</label> <type>java</type> <location>src/jsp/org/freebxml/omar/client/ui/thin</location> </source-folder> <source-folder> <label>conf</label> <type>java</type> <location>conf</location> </source-folder> <source-folder> <label>doc/3.0</label> <type>java</type> <location>doc/3.0</location> </source-folder> </folders> <ide-actions> <action name="build"> <target>compile</target> </action> <action name="rebuild"> <target>clean</target> <target>compile</target> </action> <action name="clean"> <target>clean</target> </action> <action name="javadoc"> <target>doc</target> </action> <action name="run.browser"> <target>run.browser</target> </action> <action name="debug.browser"> <target>debug.browser</target> </action> <action name="run.server"> <target>nb4.deploy</target> </action> <action name="debug.browser"> <target>nb4.deploy.debug</target> </action> <action name="test"> <target>test.unit</target> </action> <action name="compile.single"> <target>nb4-compile-selected-test-files</target> <context> <property>files</property> <folder>test</folder> <pattern>\.java$</pattern> <format>relative-path</format> <arity> <separated-files>,</separated-files> </arity> </context> </action> <action name="debug.single"> <target>nb4-debug-selected-test-files</target> <context> <property>classname</property> <folder>test</folder> <pattern>\.java$</pattern> <format>java-name</format> <arity> <one-file-only/> </arity> </context> </action> <action name="run.single"> <target>nb4-run-selected-test-files</target> <context> <property>classname</property> <folder>test</folder> <pattern>\.java$</pattern> <format>java-name</format> <arity> <one-file-only/> </arity> </context> </action> <action name="run.single"> <target>nb4-run-selected-file</target> <context> <property>classname</property> <folder>src/java</folder> <pattern>\.java$</pattern> <format>java-name</format> <arity> <one-file-only/> </arity> </context> </action> <action name="debug.single"> <target>nb4-debug-selected-file</target> <context> <property>classname</property> <folder>src/java</folder> <pattern>\.java$</pattern> <format>java-name</format> <arity> <one-file-only/> </arity> </context> </action> <action name="profile-single"> <target>nb5-profile-selected-file</target> <context> <property>profile.class</property> <folder>test</folder> <pattern>\.java$</pattern> <format>java-name</format> <arity> <one-file-only/> </arity> </context> </action> <action name="redeploy"> <target>deploy.debug</target> </action> </ide-actions> <view> <items> <source-folder style="packages"> <label>src/java</label> <location>src/java</location> </source-folder> <source-folder style="packages"> <label>test</label> <location>test</location> </source-folder> <source-folder style="packages"> <label>src/resources</label> <location>src/resources</location> </source-folder> <source-folder style="packages"> <label>jsp/thin</label> <location>src/jsp/org/freebxml/omar/client/ui/thin</location> </source-folder> <source-folder style="packages"> <label>conf</label> <location>conf</location> </source-folder> <source-folder style="packages"> <label>doc/3.0</label> <location>doc/3.0</location> </source-folder> <source-file> <location>build.properties</location> </source-file> <source-file> <location>build.xml</location> </source-file> </items> <context-menu> <ide-action name="build"/> <ide-action name="rebuild"/> <ide-action name="clean"/> <ide-action name="javadoc"/> <ide-action name="run.browser"/> <ide-action name="debug.browser"/> <ide-action name="run.server"/> <ide-action name="debug.browser"/> <ide-action name="test"/> <ide-action name="redeploy"/> </context-menu> </view> <subprojects/> </general-data> <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1"> <compilation-unit> <package-root>src/java</package-root> <package-root>test</package-root> <package-root>src/resources</package-root> <classpath mode="compile">/home/najmi/jwsdp-2.0/jaxws/lib/jaxws-tools.jar:build/lib/activation.jar:build/lib/ant-ebxmlrr.jar:build/lib/ant-launcher.jar:build/lib/ant-nodeps.jar:build/lib/ant.jar:build/lib/bc-jce-jdk13-111.jar:build/lib/cglib-full-2.0.2.jar:build/lib/classes12.jar:build/lib/commons-beanutils.jar:build/lib/commons-collections.jar:build/lib/commons-digester.jar:build/lib/commons-logging.jar:build/lib/dom.jar:build/lib/dom4j-1.4.jar:build/lib/ehcache-0.9.jar:build/lib/hibernate2.jar:build/lib/hsqldb.jar:build/lib/jaas.jar:build/lib/JavaCC.zip:build/lib/javaccpatch.zip:build/lib/jax-qname.jar:build/lib/jaxb-api-doc.zip:build/lib/jaxb-api.jar:build/lib/jaxb-impl.jar:build/lib/jaxb-libs.jar:build/lib/jaxb-xjc.jar:build/lib/jaxp-api.jar:build/lib/jaxr-ebxml.jar:build/lib/jaxrpc-api.jar:build/lib/jaxrpc-impl.jar:build/lib/jaxrpc-spi.jar:build/lib/jgraph.jar:build/lib/jsf-api.jar:build/lib/jsf-impl.jar:build/lib/jsp-api.jar:build/lib/jstl.jar:build/lib/jta-spec1_0_1.jar:build/lib/jta.jar:build/lib/junit.jar:build/lib/log4j.jar:build/lib/mail.jar:build/lib/namespace.jar:build/lib/oasis-regrep-doc.jar:build/lib/oasis-regrep-src.jar:build/lib/oasis-saml1.1-doc.jar:build/lib/oasis-saml1.1-src.jar:build/lib/oasis-saml1.1.jar:build/lib/odmg-3.0.jar:build/lib/omar-common.jar:build/lib/omar-ui-conf-bindings.jar:build/lib/optional.jar:build/lib/postgresql.jar:build/lib/relaxngDatatype.jar:build/lib/saaj-api.jar:build/lib/saaj-impl.jar:build/lib/sax.jar:build/lib/servlet-api.jar:build/lib/standard.jar:build/lib/sunxacml.jar:build/lib/w3-dsig-doc.jar:build/lib/w3-dsig-src.jar:build/lib/w3-dsig.jar:build/lib/xalan.jar:build/lib/xercesImpl.jar:build/lib/xmldsig.jar:build/lib/xmlsec.jar:build/lib/xsdlib.jar:misc/lib/oasis-saml2.0.jar:misc/lib/concurrent.jar:misc/lib/oasis-regrep.jar:build/lib/jaxr-api.jar:build/lib/xws-security.jar:/home/najmi/osws/sunxacml/com</classpath> <source-level>1.4</source-level> </compilation-unit> <compilation-unit> <package-root>src/jsp/org/freebxml/omar/client/ui/thin</package-root> <classpath mode="compile">build/lib/jsf-api.jar:build/lib/jsp-api.jar:build/lib/jstl.jar</classpath> <source-level>1.4</source-level> </compilation-unit> </java-data> </configuration> </project>
The bug is caused by incorrect integration of the profiler with the freeform project. See http://profiler.netbeans.org/docs/help/antTasksForProfiling.html for guide on how to write the profile target and integrate.
Closing old issues