Buggy code:
public class EjbRefProcessor extends AbstractDeploymentDescriptorBindingsProcessor { protected List < BindingConfiguration > processDescriptorEntries ( DeploymentUnit deploymentUnit , DeploymentDescriptorEnvironment environment , EEModuleDescription moduleDescription , ComponentDescription componentDescription , ClassLoader classLoader , DeploymentReflectionIndex deploymentReflectionIndex , final EEApplicationClasses applicationClasses ) throws DeploymentUnitProcessingException { final RemoteEnvironment remoteEnvironment = environment . getEnvironment ( ) ; final DeploymentClassIndex index = deploymentUnit . getAttachment ( CLASS_INDEX ) ; List < BindingConfiguration > bindingDescriptions = new ArrayList < BindingConfiguration > ( ) ; EJBReferencesMetaData ejbRefs = remoteEnvironment . getEjbReferences ( ) ; if ( ejbRefs != null ) { for ( EJBReferenceMetaData ejbRef : ejbRefs ) { String name = ejbRef . getEjbRefName ( ) ; String ejbName = ejbRef . getLink ( ) ; String lookup = ejbRef . getLookupName ( ) ; String remoteInterface = ejbRef . getRemote ( ) ; String home = ejbRef . getHome ( ) ; Class < ? > remoteInterfaceType = null ; if ( ! ( isEmpty ( home ) ) ) { try { remoteInterfaceType = index . classIndex ( home ) . getModuleClass ( ) ; } catch ( ClassNotFoundException e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>home<seq2seq4repair_space>interface<seq2seq4repair_space>type<seq2seq4repair_space>" + home ) , e ) ; } } else if ( ! ( isEmpty ( remoteInterface ) ) ) { try { remoteInterfaceType = index . classIndex ( remoteInterface ) . getModuleClass ( ) ; } catch ( ClassNotFoundException e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>remote<seq2seq4repair_space>interface<seq2seq4repair_space>type<seq2seq4repair_space>" + remoteInterface ) , e ) ; } } if ( ! ( name . startsWith ( "java:" ) ) ) { name = ( environment . getDefaultContext ( ) ) + name ; } LookupInjectionSource injectionSource = new LookupInjectionSource ( name ) ; remoteInterfaceType = processInjectionTargets ( moduleDescription , componentDescription , applicationClasses , injectionSource , classLoader , deploymentReflectionIndex , ejbRef , remoteInterfaceType ) ; if ( remoteInterfaceType == null ) { throw new DeploymentUnitProcessingException ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>determine<seq2seq4repair_space>type<seq2seq4repair_space>of<seq2seq4repair_space>ejb-ref<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>for<seq2seq4repair_space>component<seq2seq4repair_space>" ) + componentDescription ) ) ; } final BindingConfiguration bindingConfiguration ; EjbInjectionSource ejbInjectionSource = null ; if ( ! ( isEmpty ( lookup ) ) ) { if ( ! ( lookup . startsWith ( "java:" ) ) ) { bindingConfiguration = new BindingConfiguration ( name , new EjbLookupInjectionSource ( lookup , remoteInterfaceType ) ) ; } else { bindingConfiguration = new BindingConfiguration ( name , new LookupInjectionSource ( lookup ) ) ; } } else if ( ! ( isEmpty ( ejbName ) ) ) { bindingConfiguration = new BindingConfiguration ( name , ( ejbInjectionSource = new EjbInjectionSource ( ejbName , remoteInterfaceType . getName ( ) ) ) ) ; } else { bindingConfiguration = new BindingConfiguration ( name , ( ejbInjectionSource = new EjbInjectionSource ( remoteInterfaceType . getName ( ) ) ) ) ; } if ( ejbInjectionSource != null ) { deploymentUnit . addToAttachmentList ( EJB_INJECTIONS , ejbInjectionSource ) ; } bindingDescriptions . add ( bindingConfiguration ) ; } } if ( remoteEnvironment instanceof Environment ) { EJBLocalReferencesMetaData ejbLocalRefs = ( ( Environment ) ( remoteEnvironment ) ) . getEjbLocalReferences ( ) ; if ( ejbLocalRefs != null ) { for ( EJBLocalReferenceMetaData ejbRef : ejbLocalRefs ) { String name = ejbRef . getEjbRefName ( ) ; String ejbName = ejbRef . getLink ( ) ; String lookup = ejbRef . getLookupName ( ) ; String localInterface = ejbRef . getLocal ( ) ; String localHome = ejbRef . getLocalHome ( ) ; Class < ? > localInterfaceType = null ; if ( ! ( isEmpty ( localHome ) ) ) { try { localInterfaceType = index . classIndex ( localHome ) . getModuleClass ( ) ; } catch ( ClassNotFoundException e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>local<seq2seq4repair_space>home<seq2seq4repair_space>interface<seq2seq4repair_space>type<seq2seq4repair_space>" + localHome ) , e ) ; } } else if ( ! ( isEmpty ( localInterface ) ) ) { try { <START_BUG> localInterfaceType = classLoader . loadClass ( localInterface ) ; <END_BUG> } catch ( ClassNotFoundException e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>local<seq2seq4repair_space>interface<seq2seq4repair_space>type<seq2seq4repair_space>" + localInterface ) , e ) ; } } if ( ! ( name . startsWith ( "java:" ) ) ) { name = ( environment . getDefaultContext ( ) ) + name ; } LookupInjectionSource injectionSource = new LookupInjectionSource ( name ) ; localInterfaceType = processInjectionTargets ( moduleDescription , componentDescription , applicationClasses , injectionSource , classLoader , deploymentReflectionIndex , ejbRef , localInterfaceType ) ; if ( localInterfaceType == null ) { throw new DeploymentUnitProcessingException ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>determine<seq2seq4repair_space>type<seq2seq4repair_space>of<seq2seq4repair_space>ejb-local-ref<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>for<seq2seq4repair_space>component<seq2seq4repair_space>" ) + componentDescription ) ) ; } final BindingConfiguration bindingConfiguration ; EjbInjectionSource ejbInjectionSource = null ; if ( ! ( isEmpty ( lookup ) ) ) { if ( ! ( lookup . startsWith ( "java:" ) ) ) { bindingConfiguration = new BindingConfiguration ( name , new EjbLookupInjectionSource ( lookup , localInterfaceType ) ) ; } else { bindingConfiguration = new BindingConfiguration ( name , new LookupInjectionSource ( lookup ) ) ; } } else if ( ! ( isEmpty ( ejbName ) ) ) { bindingConfiguration = new BindingConfiguration ( name , ( ejbInjectionSource = new EjbInjectionSource ( ejbName , localInterfaceType . getName ( ) ) ) ) ; } else { bindingConfiguration = new BindingConfiguration ( name , ( ejbInjectionSource = new EjbInjectionSource ( localInterfaceType . getName ( ) ) ) ) ; } if ( ejbInjectionSource != null ) { deploymentUnit . addToAttachmentList ( EJB_INJECTIONS , ejbInjectionSource ) ; } bindingDescriptions . add ( bindingConfiguration ) ; } } } return bindingDescriptions ; } private boolean isEmpty ( String string ) { } }

Fix:
localInterfaceType = index . classIndex ( localInterface ) . getModuleClass ( ) ;