Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9856

RestSwaggerProcessor fails with "Provider org.apache.xalan.processor.TransformerFactoryImpl not found"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 2.16.3
    • 2.18.0
    • camel-core, karaf
    • None
    • Karaf 4.0.3, Java 8

    • Unknown

    Description

      When I try to query the Swagger API output for my REST routes, which are defined in a Blueprint context with the XML DSL, any request to a path that I think should return API information yields an empty response body (status 200) on the client and this error on the server. The error is raised by RestSwaggerSupport::getRestDefinitions(String) (line 147).

      2016-04-11 16:45:29,136 | WARN  | qtp215489304-167 | RestSwaggerProcessor             | 78 - org.apache.camel.camel-swagger-java - 2.16.3 |   | Error rendering Swagger API due RuntimeException thrown in RequiredModelMBean while trying to invoke operation dumpRestsAsXml
      javax.management.MBeanException: RuntimeException thrown in RequiredModelMBean while trying to invoke operation dumpRestsAsXml
      	at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1285)[:1.8.0_77]
      	at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1085)[:1.8.0_77]
      	at org.apache.camel.management.MixinRequiredModelMBean.invoke(MixinRequiredModelMBean.java:70)[71:org.apache.camel.camel-core:2.16.3]
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)[:1.8.0_77]
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)[:1.8.0_77]
      	at org.apache.camel.swagger.RestSwaggerSupport.getRestDefinitions(RestSwaggerSupport.java:147)[78:org.apache.camel.camel-swagger-java:2.16.3]
      	at org.apache.camel.swagger.RestSwaggerSupport.renderResourceListing(RestSwaggerSupport.java:198)[78:org.apache.camel.camel-swagger-java:2.16.3]
      	at org.apache.camel.swagger.RestSwaggerProcessor.process(RestSwaggerProcessor.java:95)[78:org.apache.camel.camel-swagger-java:2.16.3]
      	at org.apache.camel.component.rest.RestApiProducer.process(RestApiProducer.java:36)[71:org.apache.camel.camel-core:2.16.3]
      	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[71:org.apache.camel.camel-core:2.16.3]
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)[71:org.apache.camel.camel-core:2.16.3]
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[71:org.apache.camel.camel-core:2.16.3]
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)[71:org.apache.camel.camel-core:2.16.3]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)[71:org.apache.camel.camel-core:2.16.3]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)[71:org.apache.camel.camel-core:2.16.3]
      	at org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:191)[74:org.apache.camel.camel-jetty-common:2.16.3]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[63:javax.servlet-api:3.1.0]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[122:org.eclipse.jetty.servlet:9.2.10.v20150310]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[122:org.eclipse.jetty.servlet:9.2.10.v20150310]
      	at org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:146)[123:org.eclipse.jetty.servlets:9.2.10.v20150310]
      	at org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:43)[74:org.apache.camel.camel-jetty-common:2.16.3]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[122:org.eclipse.jetty.servlet:9.2.10.v20150310]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[122:org.eclipse.jetty.servlet:9.2.10.v20150310]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[121:org.eclipse.jetty.server:9.2.10.v20150310]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[122:org.eclipse.jetty.servlet:9.2.10.v20150310]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[121:org.eclipse.jetty.server:9.2.10.v20150310]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[121:org.eclipse.jetty.server:9.2.10.v20150310]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[121:org.eclipse.jetty.server:9.2.10.v20150310]
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)[121:org.eclipse.jetty.server:9.2.10.v20150310]
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)[121:org.eclipse.jetty.server:9.2.10.v20150310]
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[121:org.eclipse.jetty.server:9.2.10.v20150310]
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)[113:org.eclipse.jetty.io:9.2.10.v20150310]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[124:org.eclipse.jetty.util:9.2.10.v20150310]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[124:org.eclipse.jetty.util:9.2.10.v20150310]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_77]
      Caused by: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.xerces.dom.DocumentImpl to the required type: java.lang.String with value [#document: null] due javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:610)
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:177)
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:156)
      	at org.apache.camel.core.osgi.OsgiTypeConverter.mandatoryConvertTo(OsgiTypeConverter.java:112)
      	at org.apache.camel.management.mbean.ManagedCamelContext.dumpRestsAsXml(ManagedCamelContext.java:388)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_77]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_77]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_77]
      	at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_77]
      	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)[:1.8.0_77]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_77]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_77]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_77]
      	at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_77]
      	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)[:1.8.0_77]
      	at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1252)
      	at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_77]
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)[:1.8.0_77]
      	at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1246)[:1.8.0_77]
      	... 34 more
      Caused by: org.apache.camel.RuntimeCamelException: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
      	at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1652)
      	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1247)
      	at org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:78)
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:293)
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:168)
      	... 51 more
      Caused by: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
      	at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:121)[:2.5.0]
      	at org.apache.camel.converter.jaxp.XmlConverter.createTransformerFactory(XmlConverter.java:1158)
      	at org.apache.camel.converter.jaxp.XmlConverter.getTransformerFactory(XmlConverter.java:1051)
      	at org.apache.camel.converter.jaxp.XmlConverter.createTransformer(XmlConverter.java:1153)
      	at org.apache.camel.converter.jaxp.XmlConverter.toResult(XmlConverter.java:127)
      	at org.apache.camel.converter.jaxp.XmlConverter.toResult(XmlConverter.java:116)
      	at org.apache.camel.converter.jaxp.XmlConverter.toString(XmlConverter.java:238)
      	at org.apache.camel.converter.jaxp.XmlConverter.toString(XmlConverter.java:282)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_77]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_77]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_77]
      	at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_77]
      	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1243)
      	... 54 more
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            ralfsteppacher Ralf Steppacher
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: