Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JWSDP2.0 - problem in deploying hello-jaxws sample application

 
Sac Anand
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am having a problem in deploying hello-jaxws sample application on Sun Application Server 9.0

Log file is showing some errors as below:

[#|2006-06-14T15:30:10.104+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=11;_ThreadName=Timer-4;_RequestID=58484d41-d950-40c2-962f-00dd3dbc3007;|C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\endpoint_Hello\endpoint\jaxws\GetHelloResponse.java:12: incompatible types
found : javax.xml.bind.annotation.AccessType
required: javax.xml.bind.annotation.XmlAccessType
@XmlAccessorType(AccessType.FIELD)
^
|#]

[#|2006-06-14T15:30:10.150+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=11;_ThreadName=Timer-4;_RequestID=58484d41-d950-40c2-962f-00dd3dbc3007;|C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\endpoint_Hello\endpoint\jaxws\GetHello.java:12: incompatible types
found : javax.xml.bind.annotation.AccessType
required: javax.xml.bind.annotation.XmlAccessType
@XmlAccessorType(AccessType.FIELD)
^
|#]

[#|2006-06-14T15:30:15.465+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=11;_ThreadName=Timer-4;_RequestID=58484d41-d950-40c2-962f-00dd3dbc3007;|C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\endpoint_Hello\endpoint\jaxws\GetHelloResponse.java:12: incompatible types
|#]

[#|2006-06-14T15:30:15.465+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=11;_ThreadName=Timer-4;_RequestID=58484d41-d950-40c2-962f-00dd3dbc3007;|found : javax.xml.bind.annotation.AccessType
|#]


Can anybody help me on this?
 
Roel De Nijs
Sheriff
Posts: 9933
113
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have the same problem i have (click here to read), but got no answer or solutions on that thread
 
Sac Anand
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah .. if you find any luck, please let me know.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the code of the generated GetHelloResponse.java look like?
Bill
(I'm a newbie to JWSDP2.0 so dont expect a miracle)
 
Sac Anand
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code for GetHelloResponse.java is generated by the Sun Application Server 9.0 at run time and it looks like:



Code for GetHello.java is also generated by Sun App Server 9.0 and it looks like:



One more strange thing is that after reporting all the errors App server deletes all the artifacts generated at run time. I copied it before it got deleted.
 
Sac Anand
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution.

To make the web service work, just rename appserv-ws-update.jar to appserv-w.jar

The above mentioned jar file can be found at C:\Sun\AppServer\lib
(Change the path as per your installation of the app server)

If anybody wants why this is happening, please ask me i'll explain.
 
Aladdin Mohamed
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why did you rename the Jar file and how that solve the problem
 
J Bolla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sac,

I renamed appserv-ws-update.jar to appserv-w.jar

i am able to deploy the war. But the server console shows errors :

[#|2006-07-17T17:32:40.570+0530|SEVERE|sun-appserver-pe9.0|javax.enterprise.syst
em.container.web|_ThreadID=18;_ThreadName=Thread-30;_RequestID=02338988-48ac-438
e-9f4d-6b65058b7cf4;|WebModule[/hello-jaxws]Exception sending context initialize
d event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSSe
rvletContextListener
WSSERVLET11: failed to parse runtime descriptor: java.lang.annotation.Annotation
TypeMismatchException: Incorrectly typed data found for annotation element publi
c abstract javax.xml.bind.annotation.XmlAccessType javax.xml.bind.annotation.Xml
AccessorType.value() (Found data of type Ljavax/xml/bind/annotation/AccessType;.
FIELD)


As a result i cant run the client.

I had read somewhere that javax.xml.bind.annotation.XmlAccessType
thing has been modified in jaxb and a latest build has to be taken..


Can anybody pls help me :roll:
 
Torben Vesterager
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even though this document:
https://jaxb.dev.java.net/guide/Which_JAXB_RI_is_included_in_which_JDK_.html
suggests that JDK 6 Update 3 should have JAXB RI 2.1.3, it seems to only have 2.0.3

Anyway to solve your problem, go to this page:
https://jaxb.dev.java.net/2.0.3/

Download the binary - run it, and you'll get a dir called 'jaxb-ri-20061013'

Move (or copy) this directory into your 'jwsdp-2.0'-folder

When you generate the JAXB code, use 'jwsdp-2.0\jaxb-ri-20061013\bin\xjc.bat'

Remember to change your compile & runtime classpath to this folder too.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic