Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8965291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:46:32+00:00 2026-06-15T16:46:32+00:00

I have a Third party jar that contains class SampleClass with @javax.xml.ws.WebServiceClient annotation. I

  • 0

I have a Third party jar that contains class SampleClass with @javax.xml.ws.WebServiceClient annotation. I have used CXF in my project for REST layer and not for Web Services. However, since CXF infrastructure is configured for my project, it is trying to auto-wire into SampleClass when I instantiate it (In fact it is ending up in an error when trying to do so). I want to use the class as a simple POJO and not web service client. is there a way I can tell CXF to ignore @javax.xml.ws.WebServiceClient annotation?

Just for information, the exception I get is:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:302)
    at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:86)
    at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessAfterInitialization(Jsr250BeanPostProcessor.java:58)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:357)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1308)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:463)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:260)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:184)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:430)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
    at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:88)
    at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:103)
    at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:94)
    at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
    at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
    at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
    at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:70)
    at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:107)
    at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:98)
    at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:64)
    at javax.xml.ws.Service.<init>(Unknown Source)

Caused by: java.lang.NullPointerException
    at org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister.createCompatExtensor(WSDLExtensionRegister.java:63)
    at org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister.registerYokoCompatibleExtensors(WSDLExtensionRegister.java:47)
    ... 34 more
java.lang.ExceptionInInitializerError

Caused by: java.lang.NullPointerException
    at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
    at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:141)
    at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:133)
    at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:65)
    at javax.xml.ws.Service.<init>(Unknown Source)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:46:33+00:00Added an answer on June 15, 2026 at 4:46 pm

    We had used Super() in our class which extends from Service.
    The code for the parent “Service” class is

    http://grepcode.com/file/repo1.maven.org/maven2/javax.xml.ws/jaxws-api/2.2.8/javax/xml/ws/Service.java#92

    Which in turn calls the Static method “Provider.provider()” to load the
    provider at the runtime.
    Code for which is

    http://grepcode.com/file/repo1.maven.org/maven2/javax.xml.ws/jaxws-api/2.2.8/javax/xml/ws/spi/Provider.java#Provider.provider%28%29

    Javadoc comment on this method is:

    Blockquote

    Creates a new provider object.

    The algorithm used to locate the provider subclass to use consists of the
    following steps:

    • If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider
      exists, then its first line, if present, is used as the UTF-8 encoded name
      of the implementation class.
    • If the $java.home/lib/jaxws.properties file exists and it is readable by
      the java.util.Properties.load(InputStream) method and it contains an entry
      whose key is javax.xml.ws.spi.Provider, then the value of that entry is used
      as the name of the implementation class.
    • If a system property with the name javax.xml.ws.spi.Provider is defined,
      then its value is used as the name of the implementation class.
    • Finally, a default implementation class name is used.

    Blockquote

    CXF seems to have chosen first way to load its Provider implementation. i.e:
    “If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider
    exists, then its first line, if present, is used as the UTF-8 encoded name
    of the implementation class.”

    CXF jar has this file inside the jar with Provider class mentioned as a CXF implementation. Since this is the first thing that is used for lookup, CXF’s provider will be loaded instead of the default provider. However, our implementation expected default provider to be loaded.

    The only viable work around that we could think of is to add the file javax.xml.ws.spi.Provider ourselves under META-INF\services and specify the provider as default implementation class com.sun.xml.internal.ws.spi.ProviderImpl. The only risk with this is class com.sun.xml.internal.ws.spi.ProviderImpl is an internal implementation of JRE and is not bound to API contract. So the class name/package can potentially change with future releases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a third party web service that returns this xml <book> <release_date>0000-00-00</release_date> </book>
We have a project that includes all of our re-usable classes, third-party library JARs
I have a third-party jar file that comes with the javadocs for only part
I have the third party jar's in my WEB project placed at /src/main/webapp/WEB-INF/lib/ I
I have a third party jar that connects to a server and executes command
I have some third party library Foo with class FooBar . I think that
I use maven 3.0.3 and have tried to generate pom for third-party jar like
I have third-party C code that writes data to a file. I want to
I have third party sites that link to some images on my site. The
I have a third-party library that is sometimes throwing an exception. So I decided

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.