Skip to main content

ClassCastException: $Proxy while connecting to a JAX-WS webservice

1 reply [Last post]
gopiharan
Offline
Joined: 2011-12-21
Points: 0

Hi,

While trying to get the Port from Service in JAX-WS while connecting to the webservice from my client, i get the below exception. Any help would be appreciated how to resolve this.

Client JDK Version: JDK1.5

Exception:

java.lang.ClassCastException: $Proxy60
at sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:239)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:229)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3031)
at java.lang.Class.getAnnotation(Class.java:2989)
at com.sun.xml.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:179)
at com.sun.xml.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:178)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.RuntimeModeler.getPrivClassAnnotation(RuntimeModeler.java:177)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:213)
at com.sun.xml.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:661)
at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:649)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:343)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:308)
at javax.xml.ws.Service.getPort(Service.java:99)

Thanks,

Gopi.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miroslav.kos
Offline
Joined: 2011-08-01
Points: 0

Hi Gopi,

could you provide us with more info? What version of Metro/JAX-WS, what server... Also some testcase would help.

Thanks

Miran