Buggy code:
public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBeanPostProcessor implements Serializable , BeanFactoryAware , InstantiationAwareBeanPostProcessor { private static Class < ? extends Annotation > webServiceRefClass = null ; private static Class < ? extends Annotation > ejbRefClass = null ; private final Set < String > ignoredResourceTypes = new HashSet < String > ( 1 ) ; private boolean fallbackToDefaultTypeMatch = true ; private boolean alwaysUseJndiLookup = false ; private transient BeanFactory jndiFactory = new SimpleJndiBeanFactory ( ) ; private transient BeanFactory resourceFactory ; private transient BeanFactory beanFactory ; private transient final Map < Class < ? > , InjectionMetadata > injectionMetadataCache = new ConcurrentHashMap < Class < ? > , InjectionMetadata > ( ) ; public CommonAnnotationBeanPostProcessor ( ) { } public void ignoreResourceType ( String resourceType ) { } public void setFallbackToDefaultTypeMatch ( boolean fallbackToDefaultTypeMatch ) { } public void setAlwaysUseJndiLookup ( boolean alwaysUseJndiLookup ) { } public void setJndiFactory ( BeanFactory jndiFactory ) { } public void setResourceFactory ( BeanFactory resourceFactory ) { } public void setBeanFactory ( BeanFactory beanFactory ) throws BeansException { } @ Override public void postProcessMergedBeanDefinition ( RootBeanDefinition beanDefinition , Class beanType , String beanName ) { } public Object postProcessBeforeInstantiation ( Class beanClass , String beanName ) throws BeansException { } public boolean postProcessAfterInstantiation ( Object bean , String beanName ) throws BeansException { } public PropertyValues postProcessPropertyValues ( PropertyValues pvs , PropertyDescriptor [ ] pds , Object bean , String beanName ) throws BeansException { } private InjectionMetadata findResourceMetadata ( final Class clazz ) { } protected Object getResource ( CommonAnnotationBeanPostProcessor . LookupElement element , String requestingBeanName ) throws BeansException { } protected Object autowireResource ( BeanFactory factory , CommonAnnotationBeanPostProcessor . LookupElement element , String requestingBeanName ) throws BeansException { } protected abstract class LookupElement extends InjectionMetadata . InjectedElement { protected String name ; protected boolean isDefaultName = false ; protected Class < ? > lookupType ; protected String mappedName ; public LookupElement ( Member member , PropertyDescriptor pd ) { } protected abstract void initAnnotation ( AnnotatedElement ae ) { } public final String getName ( ) { } public final Class < ? > getLookupType ( ) { } public final DependencyDescriptor getDependencyDescriptor ( ) { } } private class ResourceElement extends CommonAnnotationBeanPostProcessor . LookupElement { protected boolean shareable = true ; public ResourceElement ( Member member , PropertyDescriptor pd ) { } @ Override protected void initAnnotation ( AnnotatedElement ae ) { } @ Override protected Object getResourceToInject ( Object target , String requestingBeanName ) { return getResource ( this , requestingBeanName ) ; } } private class WebServiceRefElement extends CommonAnnotationBeanPostProcessor . LookupElement { private Class elementType ; private String wsdlLocation ; public WebServiceRefElement ( Member member , PropertyDescriptor pd ) { } @ Override protected void initAnnotation ( AnnotatedElement ae ) { } @ Override protected Object getResourceToInject ( Object target , String requestingBeanName ) { Service service = null ; try { service = ( ( Service ) ( getResource ( this , requestingBeanName ) ) ) ; } catch ( NoSuchBeanDefinitionException notFound ) { if ( Service . class . equals ( this . lookupType ) ) { throw new IllegalStateException ( ( ( ( ( ( "No<seq2seq4repair_space>resource<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>'" + ( this . name ) ) + "'<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>context,<seq2seq4repair_space>" ) + "and<seq2seq4repair_space>no<seq2seq4repair_space>specific<seq2seq4repair_space>JAX-WS<seq2seq4repair_space>Service<seq2seq4repair_space>subclass<seq2seq4repair_space>specified.<seq2seq4repair_space>The<seq2seq4repair_space>typical<seq2seq4repair_space>solution<seq2seq4repair_space>is<seq2seq4repair_space>to<seq2seq4repair_space>either<seq2seq4repair_space>specify<seq2seq4repair_space>" ) + "a<seq2seq4repair_space>LocalJaxWsServiceFactoryBean<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>name<seq2seq4repair_space>or<seq2seq4repair_space>to<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>(generated)<seq2seq4repair_space>Service<seq2seq4repair_space>" ) + "subclass<seq2seq4repair_space>as<seq2seq4repair_space>@WebServiceRef(...)<seq2seq4repair_space>value." ) ) ; } if ( StringUtils . hasLength ( this . wsdlLocation ) ) { try { Constructor ctor = this . lookupType . getConstructor ( new Class [ ] { URL . class , QName . class } ) ; WebServiceClient clientAnn = this . lookupType . getAnnotation ( WebServiceClient . class ) ; if ( clientAnn == null ) { throw new IllegalStateException ( ( ( "JAX-WS<seq2seq4repair_space>Service<seq2seq4repair_space>class<seq2seq4repair_space>[" + ( this . lookupType . getName ( ) ) ) + "]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>carry<seq2seq4repair_space>a<seq2seq4repair_space>WebServiceClient<seq2seq4repair_space>annotation" ) ) ; } <START_BUG> service = ( ( Service ) ( BeanUtils . instantiateClass ( ctor , new Object [ ] { new URL ( this . wsdlLocation ) , new QName ( clientAnn . targetNamespace ( ) , clientAnn . name ( ) ) } ) ) ) ; <END_BUG> } catch ( NoSuchMethodException ex ) { throw new IllegalStateException ( ( ( ( ( "JAX-WS<seq2seq4repair_space>Service<seq2seq4repair_space>class<seq2seq4repair_space>[" + ( this . lookupType . getName ( ) ) ) + "]<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>(URL,<seq2seq4repair_space>QName)<seq2seq4repair_space>constructor.<seq2seq4repair_space>Cannot<seq2seq4repair_space>apply<seq2seq4repair_space>specified<seq2seq4repair_space>WSDL<seq2seq4repair_space>location<seq2seq4repair_space>[" ) + ( this . wsdlLocation ) ) + "]." ) ) ; } catch ( MalformedURLException ex ) { throw new IllegalArgumentException ( ( ( "Specified<seq2seq4repair_space>WSDL<seq2seq4repair_space>location<seq2seq4repair_space>[" + ( this . wsdlLocation ) ) + "]<seq2seq4repair_space>isn't<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>URL" ) ) ; } } else { service = ( ( Service ) ( BeanUtils . instantiateClass ( this . lookupType ) ) ) ; } } return service . getPort ( this . elementType ) ; } } private class EjbRefElement extends CommonAnnotationBeanPostProcessor . LookupElement { private String beanName ; public EjbRefElement ( Member member , PropertyDescriptor pd ) { } @ Override protected void initAnnotation ( AnnotatedElement ae ) { } @ Override protected Object getResourceToInject ( Object target , String requestingBeanName ) { if ( StringUtils . hasLength ( this . beanName ) ) { if ( ( ( beanFactory ) != null ) && ( beanFactory . containsBean ( this . beanName ) ) ) { Object bean = beanFactory . getBean ( this . beanName , this . lookupType ) ; if ( ( beanFactory ) instanceof ConfigurableBeanFactory ) { ( ( ConfigurableBeanFactory ) ( beanFactory ) ) . registerDependentBean ( this . beanName , requestingBeanName ) ; } return bean ; } else if ( ( this . isDefaultName ) && ( ! ( StringUtils . hasLength ( this . mappedName ) ) ) ) { throw new NoSuchBeanDefinitionException ( this . beanName , "Cannot<seq2seq4repair_space>resolve<seq2seq4repair_space>'beanName'<seq2seq4repair_space>in<seq2seq4repair_space>local<seq2seq4repair_space>BeanFactory.<seq2seq4repair_space>Consider<seq2seq4repair_space>specifying<seq2seq4repair_space>a<seq2seq4repair_space>general<seq2seq4repair_space>'name'<seq2seq4repair_space>value<seq2seq4repair_space>instead." ) ; } } return getResource ( this , requestingBeanName ) ; } } private static class LookupDependencyDescriptor extends DependencyDescriptor { private final Class lookupType ; public LookupDependencyDescriptor ( Field field , Class lookupType ) { } public LookupDependencyDescriptor ( Method method , Class lookupType ) { }

Fix:
service = ( ( Service ) ( BeanUtils . instantiateClass ( ctor , new URL ( this . wsdlLocation ) , new QName ( clientAnn . targetNamespace ( ) , clientAnn . name ( ) ) ) ) ) ;