users@glassfish.java.net

problem with management rules definition, it does not works

From: legolas wood <legolas.w_at_gmail.com>
Date: Sun, 06 Jan 2008 17:25:57 +0330

Hi

Thank you for reading my post

I have a problem with using management rules, I create a custom mbean which implement NotificationListener

then i deployed it in application server, here are related xml from domain.xml:

    <management-rule enabled="true" name="simple-management-rule">

          <event level="INFO" record-event="true" type="lifecycle">

            <property name="event" value="ready"/>

            <property name="description" value="simple rule description"/>

          </event>

          <action action-mbean-name="VerySimpleAction"/>

        </management-rule>

and

  <mbean enabled="true" impl-class-name="sample.SampleAction" name="VerySimpleAction" object-name="user:impl-class-name=sample.SampleAction,name=VerySimpleAction" object-type="user"/>

all administration task related to registring mbean and rule are done from administration console and without any error.
I am sure that constrcutor of my MBean execute because I add some logging and i find that constructor works fine.

Now, when I start the application server it returns the following exception and does not starts:



[#|2008-01-06T16:59:28.031+0330|INFO|sun-appserver9.1|javax.enterprise.system.core.selfmanagement|_ThreadID=10;_ThreadName=main;|SMGT0007: Self Management Rules service is enabled|#]

[#|2008-01-06T16:59:28.031+0330|INFO|sun-appserver9.1|javax.enterprise.system.core.selfmanagement|_ThreadID=10;_ThreadName=main;simple-management-rule;|SMGT0011: Rule : simple-management-rule, Description :sample is enabled|#]

[#|2008-01-06T16:59:28.031+0330|INFO|sun-appserver9.1|javax.enterprise.system.core.selfmanagement|_ThreadID=10;_ThreadName=main;|SMGT0007: Self Management Rules service is enabled|#]

[#|2008-01-06T16:59:28.031+0330|INFO|sun-appserver9.1|javax.enterprise.system.core.selfmanagement|_ThreadID=10;_ThreadName=main;simple-management-rule;|SMGT0011: Rule : simple-management-rule, Description :sample is enabled|#]

[#|2008-01-06T16:59:28.109+0330|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=43bda6b0-672c-41a6-8d5c-cae0b7bc4468;|CORE5071: An error occured during initialization

java.lang.NullPointerException

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleNotificationFilter.isNotificationEnabled(LifeCycleNotificationFilter.java:50)

    at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:181)

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleImpl.onReady(LifeCycleImpl.java:69)

    at com.sun.enterprise.admin.selfmanagement.event.DeclarativeLifecycleEventService.onReady(DeclarativeLifecycleEventService.java:74)

    at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)

    at com.sun.enterprise.server.PEMain.run(PEMain.java:413)

    at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:585)

    at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

|#]

[#|2008-01-06T16:59:28.109+0330|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=43bda6b0-672c-41a6-8d5c-cae0b7bc4468;|Server Startup failed. Exiting...|#]

[#|2008-01-06T16:59:28.109+0330|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=43bda6b0-672c-41a6-8d5c-cae0b7bc4468;|CORE5071: An error occured during initialization

java.lang.NullPointerException

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleNotificationFilter.isNotificationEnabled(LifeCycleNotificationFilter.java:50)

    at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:181)

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleImpl.onReady(LifeCycleImpl.java:69)

    at com.sun.enterprise.admin.selfmanagement.event.DeclarativeLifecycleEventService.onReady(DeclarativeLifecycleEventService.java:74)

    at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)

    at com.sun.enterprise.server.PEMain.run(PEMain.java:413)

    at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:585)

    at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

|#]

[#|2008-01-06T16:59:28.109+0330|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=43bda6b0-672c-41a6-8d5c-cae0b7bc4468;|Server Startup failed. Exiting...|#]

[#|2008-01-06T16:59:28.109+0330|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Server shutdown in progress...|#]

[#|2008-01-06T16:59:28.109+0330|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Server shutdown in progress...|#]

[#|2008-01-06T16:59:28.125+0330|WARNING|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=43bda6b0-672c-41a6-8d5c-cae0b7bc4468;|CORE5061: Exception :

java.lang.NullPointerException

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleNotificationFilter.isNotificationEnabled(LifeCycleNotificationFilter.java:50)

    at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:181)

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleImpl.onShutdown(LifeCycleImpl.java:80)

    at com.sun.enterprise.admin.selfmanagement.event.DeclarativeLifecycleEventService.onShutdown(DeclarativeLifecycleEventService.java:81)

    at com.sun.enterprise.server.ApplicationServer.onShutdown(ApplicationServer.java:549)

    at com.sun.enterprise.server.ondemand.OnDemandServer.onShutdown(OnDemandServer.java:131)

    at com.sun.enterprise.server.PEMain.run(PEMain.java:429)

    at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:585)

    at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

|#]

[#|2008-01-06T16:59:28.125+0330|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;|WEB0303: Stopping Sun-Java-System/Application-Server.|#]

[#|2008-01-06T16:59:28.125+0330|WARNING|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=43bda6b0-672c-41a6-8d5c-cae0b7bc4468;|CORE5061: Exception :

java.lang.NullPointerException

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleNotificationFilter.isNotificationEnabled(LifeCycleNotificationFilter.java:50)

    at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:181)

    at com.sun.enterprise.admin.selfmanagement.event.LifeCycleImpl.onShutdown(LifeCycleImpl.java:80)

    at com.sun.enterprise.admin.selfmanagement.event.DeclarativeLifecycleEventService.onShutdown(DeclarativeLifecycleEventService.java:81)

    at com.sun.enterprise.server.ApplicationServer.onShutdown(ApplicationServer.java:549)

    at com.sun.enterprise.server.ondemand.OnDemandServer.onShutdown(OnDemandServer.java:131)

    at com.sun.enterprise.server.PEMain.run(PEMain.java:429)

    at com.sun.enterprise.server.PEMain.main(PEMain.java:338)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:585)

    at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)

|#]