> -----Original Message-----
> From: KARR, DAVID
> Sent: Thursday, March 09, 2017 2:47 PM
> To: [email protected]
> Subject: Getting "ClassCastException: class
> org.apache.cxf.bus.spring.SpringBusFactory" for CXF/Spring app in Tomcat
> (TomEE)
>
> I'm currently using CXF 3.1.9 in an app built with Gradle, and running
> in Tomcat (TomEE).
This might be relevant. I'm using Spring v4.3.5.RELEASE.
> I currently only specify the following explicit CXF dependencies:
> -----------
> ['cxf-rt-rs-extension-providers', 'cxf-rt-management'].each {
> compile "org.apache.cxf:${it}:3.1.9"
> }
> -----------
>
> This gets several other artifacts transitively.
>
> Up to now, the app has just been serving REST requests, and it's been
> working fine. I'm now trying to add a simple request out to another
> service, using ClientBuilder. When I try to send that message, I get
> this:
> --------------------
> SEVERE: Failed to determine BusFactory implementation class name.
> java.lang.ClassCastException: class
> org.apache.cxf.bus.spring.SpringBusFactory
> at java.lang.Class.asSubclass(Class.java:3404)
> at
> org.apache.cxf.BusFactory.getBusFactoryClass(BusFactory.java:390)
> ------------------
>
> I noticed that some other people have gotten a similar error, but I
> don't see a solution that makes sense for my situation.