Issue Details (XML | Word | Printable)

Key: JERSEY-796
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Pavel Bucek
Reporter: gdavison
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

OPTIONS doesn't work for sub resources on extended-wadl-webapp

Created: 21/Oct/11 11:22 AM   Updated: 24/Oct/11 06:26 PM   Resolved: 24/Oct/11 06:26 PM
Component/s: examples
Affects Version/s: 1.8
Fix Version/s: 1.10

Time Tracking:
Not Specified


Mac server, 10.7, and Linux client using curl

Participants: gdavison and Pavel Bucek

 Description  « Hide

I ran and deployed the service and could access the application.wadl; but I saw the following error when I tried to access the WADL for a particular resources:

curl -X OPTIONS http://localhost:8080/extended-wadl-webapp/issues

<Unable to render embedded object: File (//"><html><head><title>GlassFish Server Open Source Edition 3.1 - Error report</title><style type="text/css"><) not found.--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><hr/><p><b>type</b> Exception report</p><p><b>message</b></p><p><b>description</b>The server encountered an internal error () that prevented it from fulfilling this request.</p><p><b>exception</b> <pre> javax.xml.bind.MarshalException

  • with linked exception:
    [javax.xml.bind.JAXBException: com.sun.jersey.server.wadl.generators.resourcedoc.xhtml.XhtmlElementType is not known to this context]</pre></p><p><b>note</b> <u>The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1 logs.</u></p><hr/><h3>GlassFish Server Open Source Edition 3.1</h3></body></html>

The reason why this is important is that I am testing out a writing a GUI testing tool that needs to try to use options to look up the datatypes for a particular resource. If there is an obvious workaround then I would be very interested, also doesn't work in 1.9_SNAPSHOT I had lying about.

Pavel Bucek added a comment - 21/Oct/11 01:20 PM

yeah, makes sense. I was actually little curious when I discovered that GET and OPTIONS requests for WADL are handled differently (they don't share same marshaller/jaxbContext) and was expecting similar issue to appear somewhere.

easiest "workaround" would be using just GET contextRoot/application.wadl for now, which shouldn't produce this exception.

Pavel Bucek added a comment - 24/Oct/11 06:26 PM

fixed in the trunk