[GLASSFISH-18745] ClassCastException upon request to /management/application.wadl Created: 21/May/12  Updated: 26/Mar/13

Status: In Progress
Project: glassfish
Component/s: rest-interface
Affects Version/s: 3.1.2
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: pdudits Assignee: Jason Lee
Resolution: Unresolved Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP, JDK1.7.0_03



 Description   

When making request to http://localhost:10048/management/application.wadl (where 10048 is management port of freshly created domain with --portbase 10000), I get response

An error occurred while processing the request. Please see the server logs for details.

The log contains following errors:

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.lang.String|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class org.glassfish.admin.rest.results.ActionReportResult|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class org.glassfish.admin.rest.results.ActionReportResult|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class org.glassfish.admin.rest.results.ActionReportResult|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class org.glassfish.admin.rest.results.ActionReportResult|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class org.glassfish.admin.rest.results.ActionReportResult|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class org.glassfish.admin.rest.results.ActionReportResult|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class org.glassfish.admin.rest.results.ActionReportResult|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.777+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class com.sun.jersey.multipart.FormDataMultiPart|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.util.HashMap|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.lang.Object|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.lang.Object|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class java.lang.Object|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|INFO|glassfish3.1.2|com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator|_ThreadID=60;_ThreadName=Thread-2;|Couldn't find JAX-B element for class javax.ws.rs.core.Response|#]

[#|2012-05-21T15:37:40.792+0200|SEVERE|glassfish3.1.2|com.sun.jersey.spi.container.ContainerResponse|_ThreadID=60;_ThreadName=Thread-2;|The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
	at com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator.attachTypes(WadlGeneratorJAXBGrammarGenerator.java:498)
	at com.sun.jersey.server.wadl.WadlBuilder.generate(WadlBuilder.java:124)
	at com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.getApplication(WadlApplicationContextImpl.java:105)
	at com.sun.jersey.server.impl.wadl.WadlResource.getWadl(WadlResource.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
	at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
	at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)
	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:722)
|#]


 Comments   
Comment by kungmarkatta [ 13/Jul/12 ]

For what it's worth, I'm also getting this error on two different installations. One vanilla install, and one with applications deployed.

Comment by ymajoros [ 25/Jul/12 ]

Same here on all GF 3.1.2 I could check (8 servers, Linux & Windows, quite different environments).

Comment by smithbr4 [ 08/Mar/13 ]

I am running GF 3.1.2 build 23 and getting this error. If anyone has a copy of what the wadl should look like I would really like to have that.

Comment by Jason Lee [ 26/Mar/13 ]

I am not seeing this issue in trunk, but there is another issue with WADL for which a JIRA has been raised against Jersey (http://java.net/jira/browse/JERSEY-1818). Once that is resolved, I will close this issue.

Generated at Sat Mar 07 02:23:05 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.