12/02/2008

Disable NetBeans httpmonitor in GlassFish

I found my GlassFish v2 server.log file is littered with these warning messages:

WARNING *********** NetBeans HTTP Monitor ************
The request cannot be recorded most likely because the
NetBeans HTTP Server is not running....
Here is what I just did to disable and completely remove NetBeans httpmonitor from my GlassFish v2:

1. Open $GLASSFISH_HOME/domains/domain1/config/default-web.xml, delete or comment out the declaration and mapping for servlet filter HTTPMonitorFilter. That is, the following lines:
<filter>
<filter-name>HTTPMonitorFilter</filter-name>
<filter-class>org.netbeans.modules.web.monitor.server.MonitorFilter</filter-class>
<init-param>
<param-name>netbeans.monitor.ide</param-name>
<param-value>127.0.0.1:8082</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HTTPMonitorFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
2. Optionally, delete $GLASSFISH_HOME/domains/domain1/lib/org-netbeans-modules-web-httpmonitor.jar.
Since I don't need this httpmonitor, there is no reason to keep this jar.

3. Redeploy any web applications that was previously deployed when NetBeans HTTPMonitorFilter was in default-web.xml. This step is needed for apps already deployed, because the generated web.xml already contains HTTPMonitorFilter (inherited from the old default-web.xml), and it will not be regenerated even at server restart.

That should get rid of this warning messages. For more technical details, see NetBeans issue 139653 and GlassFish issue 3844.

1 comment:

Varun said...

Hi,

My name is Varun Nischal and I'm the NetBeans Community Docs Contribution Coordinator. Your blog entry would make a fantastic tips & tricks to our NetBeans Community Docs wiki (http://wiki.netbeans.org/CommunityDocs).

Would you be willing to contribute it? If you need any help or have any questions, please contact me at nvarun@netbeans.org

I look forward to hearing from you.

Thanks,
Varun Nischal
http://nb-community-docs.blogspot.com/
--
"You must do the things you think you cannot do."