Skip to main content

JWSDP and Glassfish

3 replies [Last post]
maudet
Offline
Joined: 2006-02-27

Integration of JWSDP in Glassfish v.b42 seems to be weird. I can't run my client without having an exception:

Retrieving port from the service com.webservice.dataservice.DataService@153113d
[exec] java.lang.TypeNotPresentException: Type javax.xml.bind.annotation.AccessType not present
[exec] at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
[exec] at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
[exec] at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
[exec] at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:351)
[exec] at sun.reflect.annotation.AnnotationParser.parseEnumValue(AnnotationParser.java:388)
[exec] at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:262)
[exec] at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:206)
[exec] at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
[exec] at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
[exec] at java.lang.Class.initAnnotationsIfNecessary(Class.java:2998)
[exec] at java.lang.Class.getAnnotation(Class.java:2958)
[exec] at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassAnnotation(RuntimeInlineAnnotationReader.java:62)
[exec] at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassAnnotation(RuntimeInlineAnnotationReader.java:17)
[exec] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:199)
[exec] at com.sun.xml.bind.v2.runtime.JAXBContextImpl$1.run(JAXBContextImpl.java:343)
[exec] at com.sun.xml.bind.v2.runtime.JAXBContextImpl$1.run(JAXBContextImpl.java:341)
[exec] at java.security.AccessController.doPrivileged(Native Method)
[exec] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:340)
[exec] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:204)
[exec] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:585)
[exec] at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:76)
[exec] at com.sun.xml.ws.model.RuntimeModel$1.run(RuntimeModel.java:194)
[exec] at java.security.AccessController.doPrivileged(Native Method)
[exec] at com.sun.xml.ws.model.RuntimeModel.createJAXBContext(RuntimeModel.java:191)
[exec] at com.sun.xml.ws.model.RuntimeModel.postProcess(RuntimeModel.java:77)
[exec] at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:253)
[exec] at com.sun.xml.ws.client.ServiceContextBuilder.processAnnotations(ServiceContextBuilder.java:117)
[exec] at com.sun.xml.ws.client.ServiceContextBuilder.completeServiceContext(ServiceContextBuilder.java:85)
[exec] at com.sun.xml.ws.client.WSServiceDelegate.processServiceContext(WSServiceDelegate.java:114)
[exec] at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:266)
[exec] at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:152)
[exec] at com.sun.enterprise.webservice.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:82)
[exec] at javax.xml.ws.Service.getPort(Service.java:94)
[exec] at com.webservice.dataservice.DataService.getDataPortPort(PatientMonitoringDataService.java:54)
[exec] at client.JAXClient.doTest(JAXClient.java:45)
[exec] at client.JAXClient.main(JAXClient.java:26)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:585)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
[exec] at com.sun.enterprise.appclient.MainWithModuleSupport.(MainWithModuleSupport.java:328)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:180)
[exec] Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.AccessType
[exec] at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:697)
[exec] at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:595)
[exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[exec] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[exec] at java.lang.Class.forName0(Native Method)
[exec] at java.lang.Class.forName(Class.java:242)
[exec] at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)

Even if my project is compiled with the last version of JDSP, I have a problem with the annotation. It seems that javaee.jar and jaxb-impl.jar use the same class( AccessType or XMLAccessType in the package annotation ) with a different definition.

What I can do?

I just reinstalled JWSDP and glassfish.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vijaysr
Offline
Joined: 2003-06-11

There is no need for you to integrate JWSDP into GF. GF has all JAX* technologies integrated in itself. All apps developed using JavaWSDP2.0 will deploy and run on GF as is (although the app will not be recognized as a webservice by GF because they are not JSR109 compliant).

Having said that, the problem you are seeing is because of a late change in the spec. For uniformity, spec was changed to change the API (like for example, AccessType got changed to XMLAccessType). you are probably using the old JavaWSDP2.0 release a while back which is not in sync with GFb42 which has the (almost) final spec implementation.

Let us know if this reply helps

vijaysr
Offline
Joined: 2003-06-11

One more tip : if you are using Mustang as your Java SDK, then you will have to move over to the latest Mustang builds that have the latest APIs

maudet
Offline
Joined: 2006-02-27

Thank you! It solve the problem.