Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5119

jetty endpoint may log exception when it is assigned to a non-default cxf bus in spring beans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.8, 2.7.5
    • 2.5.11, 2.6.9, 2.7.6
    • Transports
    • None
    • Unknown

    Description

      JettyHTTPServerEngineFactory's setBus method gets called twice in this case and the assert statement logs this error message.

      12.07.2013 10:42:10 org.apache.cxf.common.injection.ResourceInjector invokeSetter
      SCHWERWIEGEND: exception raied when invoking setter public final void org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.setBus(org.apache.cxf.Bus)
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.cxf.common.injection.ResourceInjector.invokeSetter(ResourceInjector.java:287)
      at org.apache.cxf.common.injection.ResourceInjector.visitMethod(ResourceInjector.java:232)
      at org.apache.cxf.common.annotation.AnnotationProcessor.processMethods(AnnotationProcessor.java:89)
      at org.apache.cxf.common.annotation.AnnotationProcessor.accept(AnnotationProcessor.java:72)
      at org.apache.cxf.common.injection.ResourceInjector.inject(ResourceInjector.java:118)
      at org.apache.cxf.common.injection.ResourceInjector.inject(ResourceInjector.java:112)
      at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:225)
      at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeansOfType(ExtensionManagerImpl.java:305)
      at org.apache.cxf.bus.spring.SpringBeanLocator.getBeansOfType(SpringBeanLocator.java:163)
      at org.apache.cxf.bus.CXFBusImpl.getExtension(CXFBusImpl.java:108)
      at org.apache.cxf.transport.http_jetty.JettyDestinationFactory.createDestination(JettyDestinationFactory.java:35)
      at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:305)
      at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:142)
      at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:93)
      at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:72)
      at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)
      at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
      at org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContext.java:107)
      at org.apache.cxf.bus.spring.BusApplicationContext$1.run(BusApplicationContext.java:105)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:105)
      at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:157)
      at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:148)
      at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:124)
      at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:94)
      ...

      Instead of using the assert line, we should avoid this problem by using @NoJSR250Annotations(unlessNull = "bus").

      Attachments

        Activity

          People

            ay Akitoshi Yoshida
            ay Akitoshi Yoshida
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: