Could not initialize class Com.sun.xml.ws.spi.ProviderImpl exception handling

Source: Internet
Author: User

Project scenario: Two sets of jar packages are automatically introduced when a new Web service client is created with JAX-ws mode:

Webservices-api.jar, Webservices-extra-api.jar and

Webservices-extra.jar, Webservices-rt.jar

The two sets of jars and a jar package in the Java EE conflict, reported the following exception:

------------------Exception Information---------------------

Java.lang.reflect.InvocationTargetException
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Com.tchzt.base.struts2base.BaseActionCallUtil.call (baseactioncallutil.java:44)
At Com.tchzt.cdbank.client.accounts.action.AccountsAction.execute (accountsaction.java:184)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Com.opensymphony.xwork2.DefaultActionInvocation.invokeAction (defaultactioninvocation.java:404)
At Com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly (defaultactioninvocation.java:267)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:229)
At Com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (Defaultworkflowinterceptor.java : 221)
At Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:86)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (validationinterceptor.java:150)
At Org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept ( ANNOTATIONVALIDATIONINTERCEPTOR.JAVA:48)
At Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:86)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (conversionerrorinterceptor.java:123 )
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (parametersinterceptor.java:186)
At Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:86)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (Staticparametersinterceptor.java : 105)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Org.apache.struts2.interceptor.CheckboxInterceptor.intercept (checkboxinterceptor.java:83)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Org.apache.struts2.interceptor.FileUploadInterceptor.intercept (fileuploadinterceptor.java:207)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (modeldriveninterceptor.java:74)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept (Scopedmodeldriveninterceptor.java : 127)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept (Profilingactivationinterceptor.java : 107)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (debugginginterceptor.java:206)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (chaininginterceptor.java:115)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (i18ninterceptor.java:143)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (prepareinterceptor.java:121)
At Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:86)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (servletconfiginterceptor.java:170)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (aliasinterceptor.java:123)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (Exceptionmappinginterceptor.java : 176)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Com.tchzt.base.interceptor.AuthorizationInterceptor.intercept (authorizationinterceptor.java:22)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:224)
At Com.opensymphony.xwork2.defaultactioninvocation$2.doprofiling (defaultactioninvocation.java:223)
At Com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (utiltimerstack.java:455)
At Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:221)
At Org.apache.struts2.impl.StrutsActionProxy.execute (strutsactionproxy.java:50)
At Org.apache.struts2.dispatcher.Dispatcher.serviceAction (dispatcher.java:504)
At Org.apache.struts2.dispatcher.FilterDispatcher.doFilter (filterdispatcher.java:419)
At Weblogic.servlet.internal.FilterChainImpl.doFilter (filterchainimpl.java:74)
At Com.tchzt.base.filter.EncodingFilter.doFilter (encodingfilter.java:30)
At Weblogic.servlet.internal.FilterChainImpl.doFilter (filterchainimpl.java:74)
At Weblogic.servlet.internal.RequestEventsFilter.doFilter (requesteventsfilter.java:27)
At Weblogic.servlet.internal.FilterChainImpl.doFilter (filterchainimpl.java:74)
At Weblogic.servlet.internal.webappservletcontext$servletinvocationaction.wraprun (WebAppServletContext.java : 3288)
At Weblogic.servlet.internal.webappservletcontext$servletinvocationaction.run (webappservletcontext.java:3254)
At Weblogic.security.acl.internal.AuthenticatedSubject.doAs (authenticatedsubject.java:321)
At Weblogic.security.service.SecurityManager.runAs (securitymanager.java:120)
At Weblogic.servlet.provider.WlsSubjectHandle.run (wlssubjecthandle.java:57)
At Weblogic.servlet.internal.WebAppServletContext.doSecuredExecute (webappservletcontext.java:2163)
At Weblogic.servlet.internal.WebAppServletContext.securedExecute (webappservletcontext.java:2089)
At Weblogic.servlet.internal.WebAppServletContext.execute (webappservletcontext.java:2074)
At Weblogic.servlet.internal.ServletRequestImpl.run (servletrequestimpl.java:1513)
At Weblogic.servlet.provider.containersupportproviderimpl$wlsrequestexecutor.run ( containersupportproviderimpl.java:254)
At Weblogic.work.ExecuteThread.execute (executethread.java:256)
At Weblogic.work.ExecuteThread.run (executethread.java:221)


caused by:java.lang.NoClassDefFoundError:Could not initialize class Com.sun.xml.ws.spi.ProviderImpl
At Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
At Sun.reflect.NativeConstructorAccessorImpl.newInstance (nativeconstructoraccessorimpl.java:39)
At Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (delegatingconstructoraccessorimpl.java:27)
At Java.lang.reflect.Constructor.newInstance (constructor.java:513)
At Java.lang.Class.newInstance0 (class.java:357)
At Java.lang.Class.newInstance (class.java:310)
At Javax.xml.ws.spi.FactoryFinder.newInstance (factoryfinder.java:36)
At Javax.xml.ws.spi.FactoryFinder.find (factoryfinder.java:95)
At Javax.xml.ws.spi.Provider.provider (provider.java:83)
At Javax.xml.ws.service.<init> (service.java:56)
At Com.tchzt.core.client.hxserver.<init> (hxserver.java:51)
At Com.tchzt.cdbank.client.accounts.action.AccountsAction.addajax (accountsaction.java:3089)
... More

Workaround: Remove these two sets of jars and it will be OK.

Could not initialize class Com.sun.xml.ws.spi.ProviderImpl exception handling

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.