Grails-Plugin-Consortium / grails-cxf-client

Easy cxf client for grails
http://grails.org/plugin/cxf-client
27 stars 30 forks source link

error creating client bean #59

Open sufyanshoaib opened 8 years ago

sufyanshoaib commented 8 years ago

I have added these client configuration into Config:

cxf {
  client {
    paymentRequestClient {
        wsdl = "https://sandbox.demo.com/payments.wsdl"
        namespace = "com.demo.soap"
        clientInterface = com.demo.soap.PaymentPortType
        serviceEndpointAddress = "https://sandbox.demo.com/payments.php"
    }

  }
}

After running grails wsdl2java grails has generated the required Java classes against the provided WSDL except for PaymentPortType class.

On running the application, I am getting this error:

Web service client paymentRequestClient cannot be created before setting the clientInterface=[:] and serviceEndpointAddress=https://sandbox.demo.com/payments.php properties
[ERROR] 2015-10-27 12:00:11,899 CxfClientGrailsPlugin - Web service client paymentRequestClient cannot be created before setting the clientInterface=[:] and serviceEndpointAddress=https://sandbox.demo.com/payments.php properties
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security REST ...
... finished configuring Spring Security REST
[ERROR] 2015-10-27 12:00:39,401 
org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener -             Error initializing the application: Error creating bean with name 'paymentRequestClient': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'clientInterface'; nested exception is java.lang.IllegalArgumentException: Could not load class []!

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'paymentRequestClient': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'clientInterface'; nested exception is java.lang.IllegalArgumentException: Could not load class []!
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'clientInterface'; nested exception is java.lang.IllegalArgumentException: Could not load class []!
... 4 more

Caused by: java.lang.IllegalArgumentException: Could not load class []!
... 4 more

What could be the possible issue?

andrebrov commented 8 years ago

I had exactly the same problem, solved it by creating empty class from clientInterface.