glassfish
  1. glassfish
  2. GLASSFISH-18745

ClassCastException upon request to /management/application.wadl

    Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: rest-interface
    • Labels:
      None
    • 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)
      |#]
      

        Activity

        Hide
        kungmarkatta added a comment -

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

        Show
        kungmarkatta added a comment - For what it's worth, I'm also getting this error on two different installations. One vanilla install, and one with applications deployed.
        Hide
        ymajoros added a comment -

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

        Show
        ymajoros added a comment - Same here on all GF 3.1.2 I could check (8 servers, Linux & Windows, quite different environments).
        Hide
        smithbr4 added a comment -

        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.

        Show
        smithbr4 added a comment - 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.
        Hide
        Jason Lee added a comment -

        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.

        Show
        Jason Lee added a comment - 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.

          People

          • Assignee:
            Jason Lee
            Reporter:
            pdudits
          • Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: