camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Behrens (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8895) camel-swagger component throws exception, when multiple different camel-contexts in jmx
Date Wed, 24 Jun 2015 06:28:43 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-8895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14598944#comment-14598944
] 

Jens Behrens commented on CAMEL-8895:
-------------------------------------

Scenario 1:
Let's assume we have 2 webapps A and B.
A is a webapp using camel-swagger in its camel-context ctx1 (camel 2.15.1)
B is a completely different webapp not using camel-swagger but other components in its camel-context
ctx2 (camel 2.13.0)
In this scenario the webapp is throwing the mentioned exception.

Scenario 2:
Let's again assume we have 2 webapps A and B
A is a webapp using camel-swagger in its camel-context ctx1 (camel 2.15.1)
B is a webapp using camel-swagger in its camel-context ctx2 (camel 2.15.1)
In this scenario the both webapps are exporting api-docs of webapp A (and only these). Shouldn't
this be seperated?
I would assume that accessing webapp A i get the api-docs of only the rest-methods of webapp
A and when I access B I should only get the api-docs of the methods from B.


> camel-swagger component throws exception, when multiple different camel-contexts in jmx
> ---------------------------------------------------------------------------------------
>
>                 Key: CAMEL-8895
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8895
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-swagger
>    Affects Versions: 2.15.1
>         Environment: Linux, Tomcat 7
>            Reporter: Jens Behrens
>
> When deploying multiple camel-contexts (in different wars!) to a tomcat and one of the
camel-contexts is e.g. of version 2.13.0, the camel-context that uses camel-swagger throws
following exception when accessing /api-docs.
> Additionally it is not possible to deploy 2 camel-swagger using webapps, because only
one set of rest-methods (of one of the deployed contexts!) are exported via /api-docs.
> {code}
> javax.servlet.ServletException: Servlet execution threw an exception
> 	org.apache.camel.component.swagger.RestSwaggerCorsFilter.doFilter(RestSwaggerCorsFilter.scala:44)
> root cause
> javax.management.MBeanException: Operation dumpRestsAsXml not in ModelMBeanInfo
> 	javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:961)
> 	com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> 	com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> 	org.apache.camel.component.swagger.DefaultCamelSwaggerServlet.getRestDefinitions(DefaultCamelSwaggerServlet.scala:49)
> 	org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet.renderResourceListing(RestSwaggerApiDeclarationServlet.scala:168)
> 	org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet.doGet(RestSwaggerApiDeclarationServlet.scala:98)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> 	org.apache.camel.component.swagger.RestSwaggerCorsFilter.doFilter(RestSwaggerCorsFilter.scala:44)
> root cause
> javax.management.ServiceNotFoundException: Operation dumpRestsAsXml not in ModelMBeanInfo
> 	javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:961)
> 	com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> 	com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> 	org.apache.camel.component.swagger.DefaultCamelSwaggerServlet.getRestDefinitions(DefaultCamelSwaggerServlet.scala:49)
> 	org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet.renderResourceListing(RestSwaggerApiDeclarationServlet.scala:168)
> 	org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet.doGet(RestSwaggerApiDeclarationServlet.scala:98)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> 	org.apache.camel.component.swagger.RestSwaggerCorsFilter.doFilter(RestSwaggerCorsFilter.scala:44)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message