Groovy Web Services and org.apache.cxf.endpoint.dynamic.DynamicClientFactory

The title of this blog entry is meaningless... except... if you want to use Groovy Web Services with JDK 6.x (instead of JDK 5.x). I wrote about the embarrassingly easy web services in Groovy before and then today ran into the error that starts with this line:

org.apache.cxf.endpoint.dynamic.DynamicClientFactory outputDebug

Yes, it is an illuminating start to a long stack trace, isn't it? (That's why I put it in the title of this blog entry, hoping to draw frustrated Googlers here, so they can see for themselves what the solution is.) So here's hoping that Google will bring you to this blog entry, because (good news!) ALL YOU NEED TO DO IS PUT JAVA_HOME/BIN ON THE CLASSPATH! (Read more here which is where I found this tip.) IntelliJ people might also benefit from this knowledge, as evidenced here:

So, to reiterate, in JDK 6.x, you need JAVA_HOME/bin on the classpath (not just JAVA_HOME, as was the case with JDK 5.x), otherwise you'll get a nightmarish stack trace instead of your wonderful web service payload retrieved from the web.


hi there,

easy web services in groovy : refers to web service client or server ?

I never put JAVA_HOME or its bin in the PATH. So, what kind of classes are inside the BIN directory in java 6 ?

Thank you,


Posted by anjan bacchu on September 18, 2008 at 10:26 AM PDT #

Hello Geertjan,
I get a similar error when trying to call a Java web service deployed on Glassfish from a Groovy client using GroovyWS 0.3.1.
You can have a look to the Romen's post about "Consuming WCF Web Service Using Groovy Client" (, in witch Romen takls about a bug on CFX bundled which GroovyWS, and its solution.



Posted by Bertrand Goetzmann on September 29, 2008 at 11:54 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« November 2015