dev@jax-ws.java.net

Re: AnnotationTypeMismatchException thrown out when creating SEIStub

From: Jian Liao <jian.liao_at_gmail.com>
Date: Sat, 13 Jan 2007 02:38:06 -0800

After a fully clean build, the problem gone. Please ignore it.

On 1/13/07, Jian Liao <jian.liao_at_gmail.com> wrote:
>
> Hi all,
> I've sync my local to head. Then I got the following exception while
> creating a SEIStub.
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at com.sun.xml.ws.client.Stub.<init>( Stub.java:104)
> at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:57)
> at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseP
> roxy(WSServiceDelegate.java:540)
> at com.sun.xml.ws.client.WSServiceDelegate.getPort (WSServiceDele
> gate.java:288)
> at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDele
> gate.java:270)
> at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDele
> gate.java:263)
> at javax.xml.ws.Service.getPort(Service.java:92)
> at mime.client.HelloService.getHelloPort(HelloService.java:51)
> at mime.client.MimeApp.main(MimeApp.java:10)
> Caused by: java.lang.annotation.AnnotationTypeMismatchException : Inc
> orrectly typed data found for annotation element public abstract
> java.lang.Strin
> g[] com.sun.xml.ws.api.PropertySet$Property.value() (Found data of type
> class ja
> va.lang.String[javax.xml.ws.service.endpoint.address ])
> at sun.reflect.annotation.AnnotationTypeMismatchExceptionProxy.g
> enerateException(AnnotationTypeMismatchExceptionProxy.java:38)
> at sun.reflect.annotation.AnnotationInvocationHandler.invoke(Ann
> otationInvocationHandler.java :56)
> at $Proxy30.value(Unknown Source)
> at com.sun.xml.ws.api.PropertySet$1.run(PropertySet.java:170)
> at com.sun.xml.ws.api.PropertySet$1.run(PropertySet.java:146)
> at java.security.AccessController.doPrivileged (Native Method)
> at com.sun.xml.ws.api.PropertySet.parse(PropertySet.java:145)
> at com.sun.xml.ws.client.RequestContext.<clinit>(RequestContext.
> java:388)
>
> -------------------------
>
> My client code as following:
> public static void main (String[] args){
> try {
> Object port = new HelloService().getHelloPort ();
> if(port == null){
> System.out.println ("Mime TEST FAILURE: Couldnt get
> port!");
> System.exit (-1);
> }
>
> Hello h = (Hello)port;
> URL u = new URL("http://localhost:8080/");
> DataHandler dn = new DataHandler(u);
> System.out.println(h.add(1, dn));
>
> } catch (Exception ex) {
> ex.printStackTrace ();
> }
> }
>
> Could someone help me on this?
> --
> thanks,
> - Jian Liao




-- 
thanks,
- Jian Liao