Buggy code:
public class JaxrsIntegrationProcessor implements DeploymentUnitProcessor { private static final Logger log = Logger . getLogger ( "org.jboss.jaxrs" ) ; public static final String CDI_INJECTOR_FACTORY_CLASS = "org.jboss.resteasy.cdi.CdiInjectorFactory" ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; if ( ! ( JaxrsDeploymentMarker . isJaxrsDeployment ( deploymentUnit ) ) ) { return ; } final WarMetaData warMetaData = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ; final JBossWebMetaData webdata = warMetaData . getMergedJBossWebMetaData ( ) ; final ResteasyDeploymentData resteasy = deploymentUnit . getAttachment ( RESTEASY_DEPLOYMENT_DATA ) ; if ( resteasy == null ) return ; if ( ! ( resteasy . getScannedResourceClasses ( ) . isEmpty ( ) ) ) { StringBuffer buf = null ; for ( String resource : resteasy . getScannedResourceClasses ( ) ) { if ( buf == null ) { buf = new StringBuffer ( ) ; buf . append ( resource ) ; } else { buf . append ( "," ) . append ( resource ) ; } } String resources = buf . toString ( ) ; JaxrsIntegrationProcessor . log . debug ( ( "Adding<seq2seq4repair_space>JAX-RS<seq2seq4repair_space>resource<seq2seq4repair_space>classes:<seq2seq4repair_space>" + resources ) ) ; JaxrsIntegrationProcessor . setContextParameter ( webdata , RESTEASY_SCANNED_RESOURCES , resources ) ; } if ( ! ( resteasy . getScannedProviderClasses ( ) . isEmpty ( ) ) ) { StringBuffer buf = null ; for ( String provider : resteasy . getScannedProviderClasses ( ) ) { if ( buf == null ) { buf = new StringBuffer ( ) ; buf . append ( provider ) ; } else { buf . append ( "," ) . append ( provider ) ; } } String providers = buf . toString ( ) ; JaxrsIntegrationProcessor . log . debug ( ( "Adding<seq2seq4repair_space>JAX-RS<seq2seq4repair_space>provider<seq2seq4repair_space>classes:<seq2seq4repair_space>" + providers ) ) ; JaxrsIntegrationProcessor . setContextParameter ( webdata , RESTEASY_SCANNED_PROVIDERS , providers ) ; } if ( ! ( resteasy . getScannedJndiComponentResources ( ) . isEmpty ( ) ) ) { StringBuffer buf = null ; for ( String resource : resteasy . getScannedJndiComponentResources ( ) ) { if ( buf == null ) { buf = new StringBuffer ( ) ; buf . append ( resource ) ; } else { buf . append ( "," ) . append ( resource ) ; } } String providers = buf . toString ( ) ; JaxrsIntegrationProcessor . log . debug ( ( "Adding<seq2seq4repair_space>JAX-RS<seq2seq4repair_space>jndi<seq2seq4repair_space>component<seq2seq4repair_space>resource<seq2seq4repair_space>classes:<seq2seq4repair_space>" + providers ) ) ; JaxrsIntegrationProcessor . setContextParameter ( webdata , RESTEASY_SCANNED_JNDI_RESOURCES , providers ) ; } boolean useScannedApplicationClass = false ; if ( ( resteasy . getScannedApplicationClass ( ) ) != null ) { if ( ( JaxrsIntegrationProcessor . findContextParam ( webdata , "javax.ws.rs.Application" ) ) == null ) { useScannedApplicationClass = true ; JaxrsIntegrationProcessor . setContextParameter ( webdata , "javax.ws.rs.Application" , resteasy . getScannedApplicationClass ( ) . getName ( ) ) ; } } try { module . getClassLoader ( ) . loadClass ( JaxrsIntegrationProcessor . CDI_INJECTOR_FACTORY_CLASS ) ; <START_BUG> if ( WeldDeploymentMarker . isWeldDeployment ( deploymentUnit ) ) { <END_BUG> JaxrsIntegrationProcessor . log . debug ( "Found<seq2seq4repair_space>CDI,<seq2seq4repair_space>adding<seq2seq4repair_space>injector<seq2seq4repair_space>factory<seq2seq4repair_space>class" ) ; JaxrsIntegrationProcessor . setContextParameter ( webdata , "resteasy.injector.factory" , JaxrsIntegrationProcessor . CDI_INJECTOR_FACTORY_CLASS ) ; } } catch ( ClassNotFoundException ignored ) { } if ( ! ( resteasy . isUnwrappedExceptionsParameterSet ( ) ) ) { JaxrsIntegrationProcessor . setContextParameter ( webdata , RESTEASY_UNWRAPPED_EXCEPTIONS , "javax.ejb.EJBException" ) ; } if ( ( resteasy . hasBootClasses ( ) ) || ( resteasy . isDispatcherCreated ( ) ) ) return ; if ( ( ( ( ( resteasy . getScannedApplicationClass ( ) ) == null ) && ( resteasy . getScannedJndiComponentResources ( ) . isEmpty ( ) ) ) && ( resteasy . getScannedProviderClasses ( ) . isEmpty ( ) ) ) && ( resteasy . getScannedResourceClasses ( ) . isEmpty ( ) ) ) return ; FilterMetaData filter = new FilterMetaData ( ) ; filter . setFilterClass ( Filter30Dispatcher . class . getName ( ) ) ; filter . setName ( "Resteasy" ) ; filter . setAsyncSupported ( true ) ; FilterMappingMetaData mapping = new FilterMappingMetaData ( ) ; mapping . setFilterName ( "Resteasy" ) ; List < String > patterns = new ArrayList < String > ( ) ; if ( useScannedApplicationClass && ( resteasy . getScannedApplicationClass ( ) . isAnnotationPresent ( ApplicationPath . class ) ) ) { ApplicationPath path = resteasy . getScannedApplicationClass ( ) . getAnnotation ( ApplicationPath . class ) ; String pathValue = path . value ( ) . trim ( ) ; if ( ! ( pathValue . startsWith ( "//" ) ) ) { pathValue = "//" + pathValue ; } String prefix = pathValue ; if ( pathValue . endsWith ( "//" ) ) { pathValue += "*" ; } else { pathValue += "//*" ; } patterns . add ( pathValue ) ; JaxrsIntegrationProcessor . setContextParameter ( webdata , "resteasy.servlet.mapping.prefix" , prefix ) ; } else { patterns . add ( "//*" ) ; } mapping . setUrlPatterns ( patterns ) ; if ( ( webdata . getFilters ( ) ) == null ) { webdata . setFilters ( new FiltersMetaData ( ) ) ; } webdata . getFilters ( ) . add ( filter ) ; List < FilterMappingMetaData > mappings = webdata . getFilterMappings ( ) ; if ( mappings == null ) { mappings = new ArrayList < FilterMappingMetaData > ( ) ; webdata . setFilterMappings ( mappings ) ; } mappings . add ( mapping ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } protected void setFilterInitParam ( FilterMetaData filter , String name , String value ) { } public static ParamValueMetaData findContextParam ( JBossWebMetaData webdata , String name ) { } public static void setContextParameter ( JBossWebMetaData webdata , String name , String value ) { } }

Fix:
if ( WeldDeploymentMarker . isPartOfWeldDeployment ( deploymentUnit ) ) {