"JBAS015893: Encountered invalid class name" during deployment on JBoss EAP 6

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
  • Red Hat JBoss Enterprise Business Rules Management System Platform (BRMS)
    • 5.3.x

Issue

  • Following warning messages appeared when jboss-brms.war was deployed on JBoss EAP 6:

      JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
      JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'
    
  • When including Jersey in my application, I get these warning messages:

      JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'
      JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyReader'
      JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'
    
  • On deploying the application that uses Saxon version 9.4.0.4 EE in the Jboss server we noticed the following warning:

WARN  [org.jboss.as.server.deployment] (MSC service thread 1-34) JBAS015893: Encountered invalid class name 'http\://www.w3.org/2001/XMLSchema: com.saxonica.jaxp.SchemaFactoryImpl' for service type 'javax.xml.validation.SchemaFactory' 
WARN  [org.jboss.as.server.deployment] (MSC service thread 1-34) JBAS015893: Encountered invalid class name 'http\://java.sun.com/jaxp/xpath/dom:    

What is the source of these warning messages and how can it be resolved ?

Resolution

Just ignore these warning messages since it will not cause any impact on the application.

This warning message is logged because of invalid /META-INF/services/ file. This checked has been removed upstream via Content from issues.jboss.org is not included.WFLY-1401.

Root Cause

The JBAS015893 error (which is not fatal) means that the class name does not match the regular expression "(?:[a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+". For the BRMS case, it contains a comma. For the Jersey issue, it contains a dollar sign ("$").

To read about the behavior of META-INF/services/ file, Content from docs.oracle.com is not included.click here. From the doc:

The file contains a list of fully-qualified binary names of concrete provider classes, one per line. Space and tab characters surrounding each name, as well as blank lines, are ignored. The comment character is '#' ('\u0023', NUMBER SIGN); on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.

The BRMS message is logged because jar(jboss-brms.war/WEB-INF/lib/xpp3_min-1.1.4c.jar & jboss-brms.war/WEB-INF/lib/cxf-rt-core-2.4.10.jar) that contains the org.xmlpull.v1.XmlPullParserFactory and org.apache.cxf.bus.factory implementation contains an invalid /META-INF/services/ file. It is listing two implementations comma-separated on one line rather than one line each.

Components
Category

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.