The method unregister(ObjectName) in the type LifecycleMBeanBase is not applicable for the arguments (Request, HttpServletResponse)

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP) 6.x

Issue

  • We're trying to compile a custom JBossWeb authentication valve for EAP 6, but see the following compile error:

    The method unregister(ObjectName) in the type LifecycleMBeanBase is not applicable for the arguments (Request, HttpServletResponse)
    
  • Was the AuthenticatorBase.unregister method removed from EAP 6?

Resolution

  • Ensure JBossWeb jars are on your compile classpath instead of Tomcat

Root Cause

  • The AuthenticatorBase.unregister method was not removed from EAP 6's JBossWeb. Note the error indicates a LifecycleMBeanBase.unregister method is found instead, which is only provided in Tomcat and not JBoss. Thus, tomcat jars are likely on the java compile classpath instead of JBossWeb

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.

Comments