title: Java Linkage Error JAX-WS
body: <p>I am getting this Error while Trying to use WebServices. I googled for it and found that it occurs because different versions of same class files maybe present or some conflict occurs. I tried giving an endorsed Directory path while running Web Application, still no luck. The environment I am using is JDK 1.6.0.20 and JBoss 5.0.:</p>
  
  <pre><code>java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.&lt;init&gt;(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/abc/amservice/AMService, and the class loader (instance of &lt;bootloader&gt;) for resolved class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature
      com.abc.amservice.AMService.&lt;init&gt;(AMService.java:48)
      com.abcx.accessmanager.plugin.provider.webservice.ServiceConnection.createAndInitializeNewService(ServiceConnection.java:103)
      com.abcx.accessmanager.plugin.provider.webservice.ServiceConnection.getAMService(ServiceConnection.java:91)
      com.abcx.accessmanager.plugin.provider.webservice.ServiceConnection.createNewServicePort(ServiceConnection.java:136)
      com.abcx.accessmanager.plugin.provider.webservice.ServiceConnection.getWebServicePort(ServiceConnection.java:69)
      com.abcx.accessmanager.plugin.provider.webservice.AuthenticationProviderWebService.getWebServicePort(AuthenticationProviderWebService.java:536)
      com.abcx.accessmanager.plugin.provider.webservice.AuthenticationProviderWebService.authenticateUser(AuthenticationProviderWebService.java:80)
      com.abcx.accessmanager.plugin.provider.validator.ValidatingAuthenticationProvider.authenticateUser(ValidatingAuthenticationProvider.java:59)
      com.abcx.accessmanager.plugin.api.AccessManagementServiceConnector.authenticateUser(AccessManagementServiceConnector.java:61)
      com.qwe.spring.security.MyAuthenticationProvider.additionalAuthenticationChecks(MyAuthenticationProvider.java:33)
      org.springframework.security.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:137)
      org.springframework.security.providers.ProviderManager.doAuthentication(ProviderManager.java:188)
      org.springframework.security.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:46)
      org.springframework.security.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:82)
      org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:259)
      org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
      org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
      org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
      org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
      org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  </code></pre>
  
  <p>Would appreciate any help. Thanks</p>