BingAds / BingAds-Java-SDK

Other
43 stars 47 forks source link

Struggling to use in an uberjar #141

Open olymk2 opened 1 year ago

olymk2 commented 1 year ago

I have an application I am using which works until I try to build an uberjar.

I am seeing this error after I run the same code through I generated jar, I believe this is some kind on config I require but can not find any mention of needing any thing specific when running from a jar file.

Exception: #error {
 :cause Cannot invoke "org.apache.cxf.jaxws.spi.WrapperClassCreator.generate(org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean, org.apache.cxf.service.model.InterfaceInfo, boolean)" because "wrapperGen" is null
 :via
 [{:type java.lang.NullPointerException
   :message Cannot invoke "org.apache.cxf.jaxws.spi.WrapperClassCreator.generate(org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean, org.apache.cxf.service.model.InterfaceInfo, boolean)" because "wrapperGen" is null
   :at [org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean generatedWrapperBeanClass JaxWsServiceFactoryBean.java 670]}]

Anyone able to give any pointers ?

qitia commented 1 year ago

hi @olymk2, I did some more search and here is a post on similar issue: https://blog.csdn.net/qq_32539053/article/details/109385844

the original post is in Chinese, I tried to summarize the steps as below:

  1. open cxf-core-3.4.0.jar、cxf-rt-bindings-soap-3.4.0.jar、cxf-rt-transports-http-3.4.0.jar、cxf-rt-transports-http-jetty-3.4.0.jar、cxf-rt-wsdl-3.4.0.jar and find the META-INF\cxf\bus-extensions.txt file
  2. create a new file META-INF\cxf\bus-extensions.txt under you src folder
  3. copy contents from all fiels in step 1 into the new file
  4. create the uberjar and try again.

would you give it a try and let me know?