Failure to enable Alert:Email Server Plug-in or other server plug-ins that include configuration

Solution Verified - Updated

Environment

  • Red Hat JBoss Operations Network (ON)
    • 3.3.0
    • 3.3.1
    • 3.3.2
    • 3.3.3
    • 3.3.4
    • 3.3.5
    • 3.3.6
    • 3.3.7
    • 3.3.8
    • 3.3.9
    • 3.3.10
  • JBoss ON Server Plug-in that includes configuration properties is disabled

Issue

  • Enabling Alert:Email, Alert:Roles, or Alert:Subject server plug-ins with fails with error message:

      Failed to enable server plugins. [xxxxx] javax.ejb.EJBException:java.lang.NullPointerException -> java.lang.NullPointerException:null
    
  • Following error messages seen in server.log:

      ERROR [org.jboss.as.ejb3.invocation] (http-/0.0.0.0:7080-3) JBAS014134: EJB Invocation failed on component ServerPluginManagerBean for method public abstract java.util.List org.rhq.enterprise.server.plugin.ServerPluginManagerRemote.enableServerPlugins(org.rhq.core.domain.auth.Subject,java.util.List) throws java.lang.Exception: javax.ejb.EJBException: java.lang.NullPointerException
    

Resolution

This issue has been resolved in JBoss Operations Network 3.3 Update 11 and later.

If you are not able to upgrade or apply the latest update, the following workaround may be used:

  1. Copy <JON_SERVER>/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-serverplugins/alert-email-4.12.0.JON330GA.jar to /tmp.

  2. Go to Server Plugins page: http://localhost:7080/coregui/#Administration/Configuration/ServerPlugins.

  3. Delete the Alert:Email server plugin.

  4. Restart JBoss Operations Network Server.

  5. Upload the server plugin: alert-email-4.12.0.JON330GA.jar.

  6. Click Scan For Updates button.

Root Cause

When the server plug-in is disabled, its configuration descriptor will be empty. In ServerPluginManagerBean class the function checkForRequiredConfiguration tries to validate the configuration descriptor. However the empty configuration descriptor should not be validated.

This issue was reported in This content is not included.Red Hat Bug 1597947 - Failure to enable Alert:Email Server Plugin.

Diagnostic Steps

  • Review the JBoss Operations Network server log for an error message similar to the following:

      ERROR [org.jboss.as.ejb3.invocation] (http-/0.0.0.0:7080-3) JBAS014134: EJB Invocation failed on component ServerPluginManagerBean for method public abstract java.util.List org.rhq.enterprise.server.plugin.ServerPluginManagerRemote.enableServerPlugins(org.rhq.core.domain.auth.Subject,java.util.List) throws java.lang.Exception: javax.ejb.EJBException: java.lang.NullPointerException
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:189) [jboss-as-ejb3-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:274) [jboss-as-ejb3-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:339) [jboss-as-ejb3-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
      ...
      	at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73) [jboss-as-ee-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
      	at org.rhq.enterprise.server.plugin.ServerPluginManagerLocal$$$view133.enableServerPlugins(Unknown Source) [rhq-server.jar:4.12.0.JON330GA]
      	at org.rhq.coregui.server.gwt.PluginGWTServiceImpl.enableServerPlugins(PluginGWTServiceImpl.java:240)
      ...
      	at java.lang.Thread.run(Thread.java:748) [rt.jar:1.7.0_181]
      Caused by: java.lang.NullPointerException
      	at org.rhq.enterprise.server.plugin.ServerPluginManagerBean.checkForRequiredConfiguration(ServerPluginManagerBean.java:273) [rhq-server.jar:4.12.0.JON330GA]
      	at org.rhq.enterprise.server.plugin.ServerPluginManagerBean.enableServerPlugins(ServerPluginManagerBean.java:245) [rhq-server.jar:4.12.0.JON330GA]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_181]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_181]
      	... 55 more
    
SBR
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.