Buggy code:
public class JaxrsComponentDeployer implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; if ( module == null ) { return ; } final ResteasyDeploymentData resteasy = deploymentUnit . getAttachment ( RESTEASY_DEPLOYMENT_DATA ) ; if ( resteasy == null ) { return ; } if ( ! ( resteasy . isScanResources ( ) ) ) return ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; if ( moduleDescription == null ) { return ; } final ClassLoader loader = module . getClassLoader ( ) ; for ( final ComponentDescription component : moduleDescription . getComponentDescriptions ( ) ) { Class < ? > componentClass = null ; try { componentClass = loader . loadClass ( component . getComponentClassName ( ) ) ; } catch ( ClassNotFoundException e ) { throw new DeploymentUnitProcessingException ( e ) ; } if ( ! ( GetRestful . isRootResource ( componentClass ) ) ) continue ; if ( component instanceof SessionBeanComponentDescription ) { <START_BUG> Class [ ] jaxrsType = GetRestful . getSubResourceClass ( componentClass ) ; <END_BUG> final String jndiName ; if ( ( component . getViews ( ) . size ( ) ) == 1 ) { jndiName = ( ( "java:app//" + ( moduleDescription . getModuleName ( ) ) ) + "//" ) + ( component . getComponentName ( ) ) ; } else { boolean found = false ; String foundType = null ; for ( final ViewDescription view : component . getViews ( ) ) { for ( Class subResource : jaxrsType ) { if ( view . getViewClassName ( ) . equals ( subResource . getName ( ) ) ) { foundType = subResource . getName ( ) ; found = true ; break ; } } if ( found ) { break ; } } if ( ! found ) { throw MESSAGES . typeNameNotAnEjbView ( Arrays . asList ( jaxrsType ) , component . getComponentName ( ) ) ; } jndiName = ( ( ( ( "java:app//" + ( moduleDescription . getModuleName ( ) ) ) + "//" ) + ( component . getComponentName ( ) ) ) + "!" ) + foundType ; } JaxrsLogger . JAXRS_LOGGER . debugf ( "Found<seq2seq4repair_space>JAX-RS<seq2seq4repair_space>Managed<seq2seq4repair_space>Bean:<seq2seq4repair_space>%s<seq2seq4repair_space>local<seq2seq4repair_space>jndi<seq2seq4repair_space>jaxRsTypeName:<seq2seq4repair_space>%s" , component . getComponentClassName ( ) , jndiName ) ; StringBuilder buf = new StringBuilder ( ) ; buf . append ( jndiName ) . append ( ";" ) . append ( component . getComponentClassName ( ) ) . append ( ";" ) . append ( "true" ) ; resteasy . getScannedJndiComponentResources ( ) . add ( buf . toString ( ) ) ; resteasy . getScannedResourceClasses ( ) . remove ( component . getComponentClassName ( ) ) ; } else if ( component instanceof ManagedBeanComponentDescription ) { String jndiName = ( ( "java:app//" + ( moduleDescription . getModuleName ( ) ) ) + "//" ) + ( component . getComponentName ( ) ) ; JaxrsLogger . JAXRS_LOGGER . debugf ( "Found<seq2seq4repair_space>JAX-RS<seq2seq4repair_space>Managed<seq2seq4repair_space>Bean:<seq2seq4repair_space>%s<seq2seq4repair_space>local<seq2seq4repair_space>jndi<seq2seq4repair_space>name:<seq2seq4repair_space>%s" , component . getComponentClassName ( ) , jndiName ) ; StringBuilder buf = new StringBuilder ( ) ; buf . append ( jndiName ) . append ( ";" ) . append ( component . getComponentClassName ( ) ) . append ( ";" ) . append ( "true" ) ; resteasy . getScannedJndiComponentResources ( ) . add ( buf . toString ( ) ) ; resteasy . getScannedResourceClasses ( ) . remove ( component . getComponentClassName ( ) ) ; } } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
Class [ ] jaxrsType = GetRestful . getSubResourceClasses ( componentClass ) ;