You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Bruno Melloni <Br...@chickasaw.net> on 2009/07/14 18:36:21 UTC

Reading bean from cxf/Spring context file

I think I am missing the point on something basic.  Would somebody enlighten me?

I would like to read a custom bean that I added to the cxf/spring context file.  What is the correct syntax for reading it?

My configuration:

a) In web.xml:

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
  </context-param>
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

b) Context files:

  WEB-INF/applicationContext-ws.xml (for the web service)
  WEB-INF/classes/applicationContext-app.xml (for other beans)

c) Loading beans from applicationContext-app.xml (works OK):

  ApplicationContext ctx = new ClassPathXmlApplicationContext( "applicationContext-app.xml" );
  myBean = (MyBeanClass)ctx.getBean("myBean");

d) Loading beans from applicationContext-ws.xml does not work. I tried:

  - similar code to that in (c)
  - autowiring
  - using the ServletContextAware interface (crazy idea of course - CXF is not Spring MVC)

Any help will be greatly welcome... I know this must be terribly basic and I am feeling really stupid.

Re: Reading bean from cxf/Spring context file

Posted by Daniel Kulp <dk...@apache.org>.
As Ian suggested, having spring inject your bean in as a property or similar 
is normally the way to go.

The other option is to make your impl bean or similar implement the Spring 
ApplicationContextAware interface.    Then Spring will pass the 
ApplicationContext into your bean where you can query anything you want.

Dan


On Tue July 14 2009 5:17:12 pm Bruno Melloni wrote:
> No, sorry.  I guess I did not communicate it clearly.
>
> <jaxws:endpoint implementor="#webServiceImpl" ... /> works great.
>
> The problem happens when I add a vanilla bean to the context:
>
> <bean id="myBean".... />
>
> I try to read the bean fail miserably.
>
> - I already tried adding "private MyBeanClass myBean" and the corresponding
> getter/setter in my code.  No luck. - I also tried to add @Autowire to that
> attribute.  Still no luck.
>
> Clearly what I'm missing is 'how to grab' a bean from that context that was
> already loaded.  My classes don't seem to be aware of the CXF context - not
> even my service Impl class.
>
> I agree that reloading the context like I'm doing is insane (even though it
> is the only thing I could do to make it work - so I was punting).  What
> code would *you* use to get a reference to myBean?
>
> thanks
>
> -----Original Message-----
> From: Ian Roberts [mailto:i.roberts@dcs.shef.ac.uk]
> Sent: Tuesday, July 14, 2009 2:19 PM
> To: users@cxf.apache.org
> Subject: Re: Reading bean from cxf/Spring context file
>
> Bruno Melloni wrote:
> > The problem was the classpath - it includes WEB-INF/classes but not
> > WEB-INF. I ended up reading the bean from the CXF context file with
> > the following code:
> >
> > ApplicationContext ctx = new ClassPathXmlApplicationContext(
> > "../applicationContext-ws.xml" ); myBean =
> > (MyBeanClass)ctx.getBean("myBeanID");
> >
> > The key was the "../".
> >
> > Still, even though this works, it doesn't feel right.  There must be
> > a cleaner way of reading context files that reside in WEB-INF, or
> > even more specifically - to read (or even autowire) beans from the
> > CXF context file - just like you do in Spring MVC.
>
> This isn't right - what you're doing there is creating a whole new
> ApplicationContext that just happens to be based on the same bean
> definition files as the main context (created for you by the
> ContextLoaderListener).  You already have a context including all the
> bean definitions in WEB-INF/applicationContext-ws.xml plus those in
> WEB-INF/classes/applicationContext-app.xml, which was loaded at startup
> by the ContextLoaderListener.
>
> The correct way to proceed depends on what you want to do.  I presume
> your applicationContext-ws.xml contains something like
>
> <jaxws:endpoint implementor="my.example.WebServiceImpl" ... />
>
> and you want to get at your Spring beans from inside your WebServiceImpl
> class?  If that is the case then the easiest thing to do is to change it
> to say
>
> <jaxws:endpoint implementor="#webServiceImpl" ... />
>
> <bean id="webServiceImpl" class="my.example.WebServiceImpl">
> </bean>
>
> This makes your web service object a Spring bean in its own right rather
> than having CXF create it by reflection.  So now if you want a reference
> to myBean within your service class, you can do it in the normal Spring
> style - add a public void setSomething(MyBean b) method to the
> WebServiceImpl class and add <property name="something" ref="myBean" />
> inside the webServiceImpl <bean> definition.  You don't need to call
> getBean directly.
>
> Does this help?
>
> Ian

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: Strange error messages

Posted by Daniel Kulp <dk...@apache.org>.
JBoss has a strange process for mapping the j.u.l messages that CXF produces 
into their logging stuff.   It results in any "info" level stuff we log being 
pushed out as ERROR level in their logs.   It's a bug on their side.

Dan


On Wed July 15 2009 4:55:17 pm Bruno Melloni wrote:
> I wrote an email web service and deployed it on both Tomcat 6 and jBoss EAP
> 4.3.  It deploys and works fine on both servers.
>
> But... during deploy on jBoss I see the error messages at the bottom of the
> listing.  Note that this does not seem to affect the ability to function.
>
> Does anybody have an idea as to why this is happening, and if possible how
> to correct it?
>
> b.
>
>
> 2009-07-15 15:40:13,449 INFO  [org.jboss.web.tomcat.service.TomcatDeployer]
> deploy, ctxPath=/UtilityWebServices,
> warUrl=.../tmp/deploy/tmp3909931085383771154UtilityWebServices-exp.war/
> 2009-07-15 15:40:13,762 INFO  [org.apache.catalina.core.ContainerBase]
> Initializing Spring root WebApplicationContext 2009-07-15 15:40:13,762 INFO
>  [org.springframework.web.context.ContextLoader] Root
> WebApplicationContext: initialization started 2009-07-15 15:40:14,059 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from ServletContext resource
> [/WEB-INF/applicationContext-app.xml] 2009-07-15 15:40:14,293 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from ServletContext resource
> [/WEB-INF/applicationContext-ws.xml] 2009-07-15 15:40:14,387 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from class path resource [META-INF/cxf/cxf.xml] 2009-07-15
> 15:40:14,449 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from class path resource
> [META-INF/cxf/cxf-extension-soap.xml] 2009-07-15 15:40:14,840 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml]
> 2009-07-15 15:40:15,199 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean '.proxyFactory': replacing [Root bean:
> class
> [org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpr
>ingClientProxyFactoryBean]; scope=singleton; abstract=false; lazyInit=false;
> autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null] with [Root bean: class
> [org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpr
>ingClientProxyFactoryBean]; scope=singleton; abstract=false; lazyInit=false;
> autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null] 2009-07-15 15:40:15,340 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from file
> [D:\JBoss\jbossEAP4.3CP03\jboss-eap-4.3\jboss-as\server\default\deploy\Cust
>omApplications\CECommon.sar\applicationContext-auditTrail.xml] 2009-07-15
> 15:40:15,574 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from file
> [D:\JBoss\jbossEAP4.3CP03\jboss-eap-4.3\jboss-as\server\default\tmp\deploy\
>tmp3909931085383771154UtilityWebServices-exp.war\WEB-INF\classes\application
>Context-client.xml] 2009-07-15 15:40:15,605 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from class path resource [META-INF/cxf/cxf.xml] 2009-07-15
> 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean 'cxf': replacing [Generic bean: class
> [org.apache.cxf.bus.CXFBusImpl]; scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
> primary=false; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.bus.CXFBusImpl]; scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
> primary=false; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] 2009-07-15 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.bus.spring.BusApplicationListener': replacing [Generic
> bean: class [org.apache.cxf.bus.spring.BusApplicationListener];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.bus.spring.BusApplicationListener]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor': replacing
> [Generic bean: class
> [org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] 2009-07-15 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor': replacing [Generic
> bean: class [org.apache.cxf.bus.spring.Jsr250BeanPostProcessor];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.bus.spring.Jsr250BeanPostProcessor]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.bus.spring.BusExtensionPostProcessor': replacing [Generic
> bean: class [org.apache.cxf.bus.spring.BusExtensionPostProcessor];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.bus.spring.BusExtensionPostProcessor]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.resource.ResourceManager': replacing [Generic bean: class
> [org.apache.cxf.bus.resource.ResourceManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
> class [org.apache.cxf.bus.resource.ResourceManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.configuration.Configurer': replacing [Generic bean: class
> [org.apache.cxf.configuration.spring.ConfigurerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
> class [org.apache.cxf.configuration.spring.ConfigurerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] 2009-07-15 15:40:15,652 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.binding.BindingFactoryManager': replacing [Generic bean:
> class [org.apache.cxf.binding.BindingFactoryManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
> class [org.apache.cxf.binding.BindingFactoryManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.transport.DestinationFactoryManager': replacing [Generic
> bean: class [org.apache.cxf.transport.DestinationFactoryManagerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.transport.DestinationFactoryManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.transport.ConduitInitiatorManager': replacing [Generic
> bean: class [org.apache.cxf.transport.ConduitInitiatorManagerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.transport.ConduitInitiatorManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean 'org.apache.cxf.wsdl.WSDLManager':
> replacing [Generic bean: class [org.apache.cxf.wsdl11.WSDLManagerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.wsdl11.WSDLManagerImpl]; scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
> primary=false; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] 2009-07-15 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean 'org.apache.cxf.phase.PhaseManager':
> replacing [Generic bean: class [org.apache.cxf.phase.PhaseManagerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.phase.PhaseManagerImpl]; scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
> primary=false; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] 2009-07-15 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.workqueue.WorkQueueManager': replacing [Generic bean: class
> [org.apache.cxf.workqueue.WorkQueueManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
> class [org.apache.cxf.workqueue.WorkQueueManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.buslifecycle.BusLifeCycleManager': replacing [Generic bean:
> class [org.apache.cxf.buslifecycle.CXFBusLifeCycleManager];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.buslifecycle.CXFBusLifeCycleManager]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.endpoint.ServerRegistry': replacing [Generic bean: class
> [org.apache.cxf.endpoint.ServerRegistryImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
> class [org.apache.cxf.endpoint.ServerRegistryImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.endpoint.ServerLifeCycleManager': replacing [Generic bean:
> class [org.apache.cxf.endpoint.ServerLifeCycleManagerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.endpoint.ServerLifeCycleManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.endpoint.ClientLifeCycleManager': replacing [Generic bean:
> class [org.apache.cxf.endpoint.ClientLifeCycleManagerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.endpoint.ClientLifeCycleManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.transports.http.QueryHandlerRegistry': replacing [Generic
> bean: class [org.apache.cxf.transport.http.QueryHandlerRegistryImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.transport.http.QueryHandlerRegistryImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.endpoint.EndpointResolverRegistry': replacing [Generic
> bean: class [org.apache.cxf.endpoint.EndpointResolverRegistryImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.endpoint.EndpointResolverRegistryImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean 'org.apache.cxf.headers.HeaderManager':
> replacing [Generic bean: class [org.apache.cxf.headers.HeaderManagerImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.headers.HeaderManagerImpl]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.catalog.OASISCatalogManager': replacing [Generic bean:
> class [org.apache.cxf.catalog.OASISCatalogManager]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean:
> class [org.apache.cxf.catalog.OASISCatalogManager]; scope=singleton;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf.xml]] 2009-07-15
> 15:40:15,699 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.endpoint.ServiceContractResolverRegistry': replacing
> [Generic bean: class
> [org.apache.cxf.endpoint.ServiceContractResolverRegistryImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Generic bean: class
> [org.apache.cxf.endpoint.ServiceContractResolverRegistryImpl];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] 2009-07-15 15:40:15,699 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from class path resource
> [META-INF/cxf/cxf-extension-soap.xml] 2009-07-15 15:40:15,730 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.binding.soap.SoapBindingFactory': replacing [Generic bean:
> class [org.apache.cxf.binding.soap.SoapBindingFactory]; scope=singleton;
> abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]] with
> [Generic bean: class [org.apache.cxf.binding.soap.SoapBindingFactory];
> scope=singleton; abstract=false; lazyInit=true; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf-extension-soap.xml]] 2009-07-15 15:40:15,730 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.binding.soap.SoapTransportFactory': replacing [Generic
> bean: class [org.apache.cxf.binding.soap.SoapTransportFactory];
> scope=singleton; abstract=false; lazyInit=true; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf-extension-soap.xml]] with [Generic bean: class
> [org.apache.cxf.binding.soap.SoapTransportFactory]; scope=singleton;
> abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null;
> defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]]
> 2009-07-15 15:40:15,730 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.binding.soap.customEditorConfigurer': replacing [Generic
> bean: class
> [org.springframework.beans.factory.config.CustomEditorConfigurer];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf-extension-soap.xml]] with [Generic bean: class
> [org.springframework.beans.factory.config.CustomEditorConfigurer];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf-extension-soap.xml]] 2009-07-15 15:40:15,730 INFO 
> [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML
> bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml]
> 2009-07-15 15:40:15,762 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'org.apache.cxf.transport.servlet.ServletTransportFactory': replacing
> [Generic bean: class
> [org.apache.cxf.transport.servlet.ServletTransportFactory];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf-servlet.xml]] with [Generic bean: class
> [org.apache.cxf.transport.servlet.ServletTransportFactory];
> scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
> dependencyCheck=0; autowireCandidate=true; primary=false;
> factoryBeanName=null; factoryMethodName=null; initMethodName=null;
> destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf-servlet.xml]] 2009-07-15 15:40:16,559 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@8edd79
>: defining beans
> [mailSender,ctxProperties,cxf,org.apache.cxf.bus.spring.BusApplicationListe
>ner,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.c
>xf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtension
>PostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configu
>ration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cx
>f.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitia
>torManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager
>,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLi
>feCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoin
>t.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.
>apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.Endp
>ointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.cat
>alog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegi
>stry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.s
>oap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,
>org.apache.cxf.transport.servlet.ServletTransportFactory,email,.proxyFactory
>,emailRelay,auditDao,org.springframework.orm.jpa.support.PersistenceAnnotati
>onBeanPostProcessor#0,entityManagerFactory,dataSource,transactionManager,org
>.springframework.aop.config.internalAutoProxyCreator,org.springframework.tra
>nsaction.annotation.AnnotationTransactionAttributeSource#0,org.springframewo
>rk.transaction.interceptor.TransactionInterceptor#0,org.springframework.tran
>saction.config.internalTransactionAdvisor,emailClient.proxyFactory,emailClie
>nt]; root of factory hierarchy 2009-07-15 15:40:19,356 ERROR [STDERR] Jul
> 15, 2009 3:40:19 PM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass INFO: Creating Service
> {http://email.utilityws.cndc.net/}EmailImplService from class
> net.cndc.utilityws.email.Email 2009-07-15 15:40:20,731 ERROR [STDERR] Jul
> 15, 2009 3:40:20 PM org.apache.cxf.endpoint.ServerImpl initDestination
> INFO: Setting the server's publish address to be /Email
> 2009-07-15 15:40:20,934 ERROR [STDERR] Jul 15, 2009 3:40:20 PM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass INFO: Creating Service
> {http://email.utilityws.cndc.net/}EmailService from class
> net.cndc.utilityws.email.Email 2009-07-15 15:40:23,731 ERROR [STDERR] Jul
> 15, 2009 3:40:23 PM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass INFO: Creating Service
> {http://email.utilityws.cndc.net/}EmailService from class
> net.cndc.utilityws.email.Email 2009-07-15 15:40:23,746 INFO 
> [org.springframework.web.context.ContextLoader] Root WebApplicationContext:
> initialization completed in 9984 ms 2009-07-15 15:40:23,746 ERROR [STDERR]
> Jul 15, 2009 3:40:23 PM org.apache.cxf.transport.servlet.CXFServlet
> updateContext INFO: Load the bus with application context
> 2009-07-15 15:40:23,762 INFO 
> [org.apache.cxf.bus.spring.BusApplicationContext] Refreshing
> org.apache.cxf.bus.spring.BusApplicationContext@4416b: display name
> [org.apache.cxf.bus.spring.BusApplicationContext@4416b]; startup date [Wed
> Jul 15 15:40:23 CDT 2009]; parent:
> org.springframework.web.context.support.XmlWebApplicationContext@14bcb5c
> 2009-07-15 15:40:23,840 ERROR [STDERR] Jul 15, 2009 3:40:23 PM
> org.apache.cxf.bus.spring.BusApplicationContext getConfigResources INFO: No
> cxf.xml configuration file detected, relying on defaults. 2009-07-15
> 15:40:23,840 INFO  [org.apache.cxf.bus.spring.BusApplicationContext] Bean
> factory for application context
> [org.apache.cxf.bus.spring.BusApplicationContext@4416b]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@13dd7d
>1 2009-07-15 15:40:23,840 INFO 
> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
> Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@13dd7d
>1: defining beans []; parent:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@8edd79
> 2009-07-15 15:40:23,856 ERROR [STDERR] Jul 15, 2009 3:40:23 PM
> org.apache.cxf.transport.servlet.AbstractCXFServlet
> replaceDestinationFactory INFO: Servlet transport factory already
> registered

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Strange error messages

Posted by Bruno Melloni <Br...@chickasaw.net>.
I wrote an email web service and deployed it on both Tomcat 6 and jBoss EAP 4.3.  It deploys and works fine on both servers.

But... during deploy on jBoss I see the error messages at the bottom of the listing.  Note that this does not seem to affect the ability to function.

Does anybody have an idea as to why this is happening, and if possible how to correct it?

b.


2009-07-15 15:40:13,449 INFO  [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/UtilityWebServices, warUrl=.../tmp/deploy/tmp3909931085383771154UtilityWebServices-exp.war/
2009-07-15 15:40:13,762 INFO  [org.apache.catalina.core.ContainerBase] Initializing Spring root WebApplicationContext
2009-07-15 15:40:13,762 INFO  [org.springframework.web.context.ContextLoader] Root WebApplicationContext: initialization started
2009-07-15 15:40:14,059 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-app.xml]
2009-07-15 15:40:14,293 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-ws.xml]
2009-07-15 15:40:14,387 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
2009-07-15 15:40:14,449 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml]
2009-07-15 15:40:14,840 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml]
2009-07-15 15:40:15,199 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean '.proxyFactory': replacing [Root bean: class [org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
2009-07-15 15:40:15,340 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from file [D:\JBoss\jbossEAP4.3CP03\jboss-eap-4.3\jboss-as\server\default\deploy\CustomApplications\CECommon.sar\applicationContext-auditTrail.xml]
2009-07-15 15:40:15,574 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from file [D:\JBoss\jbossEAP4.3CP03\jboss-eap-4.3\jboss-as\server\default\tmp\deploy\tmp3909931085383771154UtilityWebServices-exp.war\WEB-INF\classes\applicationContext-client.xml]
2009-07-15 15:40:15,605 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'cxf': replacing [Generic bean: class [org.apache.cxf.bus.CXFBusImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.bus.CXFBusImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.bus.spring.BusApplicationListener': replacing [Generic bean: class [org.apache.cxf.bus.spring.BusApplicationListener]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.bus.spring.BusApplicationListener]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor': replacing [Generic bean: class [org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor': replacing [Generic bean: class [org.apache.cxf.bus.spring.Jsr250BeanPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.bus.spring.Jsr250BeanPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor': replacing [Generic bean: class [org.apache.cxf.bus.spring.BusExtensionPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.bus.spring.BusExtensionPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.resource.ResourceManager': replacing [Generic bean: class [org.apache.cxf.bus.resource.ResourceManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.bus.resource.ResourceManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.configuration.Configurer': replacing [Generic bean: class [org.apache.cxf.configuration.spring.ConfigurerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.configuration.spring.ConfigurerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,652 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.binding.BindingFactoryManager': replacing [Generic bean: class [org.apache.cxf.binding.BindingFactoryManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.binding.BindingFactoryManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.transport.DestinationFactoryManager': replacing [Generic bean: class [org.apache.cxf.transport.DestinationFactoryManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.transport.DestinationFactoryManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.transport.ConduitInitiatorManager': replacing [Generic bean: class [org.apache.cxf.transport.ConduitInitiatorManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.transport.ConduitInitiatorManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.wsdl.WSDLManager': replacing [Generic bean: class [org.apache.cxf.wsdl11.WSDLManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.wsdl11.WSDLManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.phase.PhaseManager': replacing [Generic bean: class [org.apache.cxf.phase.PhaseManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.phase.PhaseManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.workqueue.WorkQueueManager': replacing [Generic bean: class [org.apache.cxf.workqueue.WorkQueueManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.workqueue.WorkQueueManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.buslifecycle.BusLifeCycleManager': replacing [Generic bean: class [org.apache.cxf.buslifecycle.CXFBusLifeCycleManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.buslifecycle.CXFBusLifeCycleManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.endpoint.ServerRegistry': replacing [Generic bean: class [org.apache.cxf.endpoint.ServerRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.endpoint.ServerRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.endpoint.ServerLifeCycleManager': replacing [Generic bean: class [org.apache.cxf.endpoint.ServerLifeCycleManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.endpoint.ServerLifeCycleManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.endpoint.ClientLifeCycleManager': replacing [Generic bean: class [org.apache.cxf.endpoint.ClientLifeCycleManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.endpoint.ClientLifeCycleManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.transports.http.QueryHandlerRegistry': replacing [Generic bean: class [org.apache.cxf.transport.http.QueryHandlerRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.transport.http.QueryHandlerRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.endpoint.EndpointResolverRegistry': replacing [Generic bean: class [org.apache.cxf.endpoint.EndpointResolverRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.endpoint.EndpointResolverRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.headers.HeaderManager': replacing [Generic bean: class [org.apache.cxf.headers.HeaderManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.headers.HeaderManagerImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.catalog.OASISCatalogManager': replacing [Generic bean: class [org.apache.cxf.catalog.OASISCatalogManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.catalog.OASISCatalogManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.endpoint.ServiceContractResolverRegistry': replacing [Generic bean: class [org.apache.cxf.endpoint.ServiceContractResolverRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]] with [Generic bean: class [org.apache.cxf.endpoint.ServiceContractResolverRegistryImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf.xml]]
2009-07-15 15:40:15,699 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml]
2009-07-15 15:40:15,730 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.binding.soap.SoapBindingFactory': replacing [Generic bean: class [org.apache.cxf.binding.soap.SoapBindingFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]] with [Generic bean: class [org.apache.cxf.binding.soap.SoapBindingFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]]
2009-07-15 15:40:15,730 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.binding.soap.SoapTransportFactory': replacing [Generic bean: class [org.apache.cxf.binding.soap.SoapTransportFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]] with [Generic bean: class [org.apache.cxf.binding.soap.SoapTransportFactory]; scope=singleton; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]]
2009-07-15 15:40:15,730 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.binding.soap.customEditorConfigurer': replacing [Generic bean: class [org.springframework.beans.factory.config.CustomEditorConfigurer]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]] with [Generic bean: class [org.springframework.beans.factory.config.CustomEditorConfigurer]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-extension-soap.xml]]
2009-07-15 15:40:15,730 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml]
2009-07-15 15:40:15,762 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Overriding bean definition for bean 'org.apache.cxf.transport.servlet.ServletTransportFactory': replacing [Generic bean: class [org.apache.cxf.transport.servlet.ServletTransportFactory]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-servlet.xml]] with [Generic bean: class [org.apache.cxf.transport.servlet.ServletTransportFactory]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/cxf/cxf-servlet.xml]]
2009-07-15 15:40:16,559 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8edd79: defining beans [mailSender,ctxProperties,cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,email,.proxyFactory,emailRelay,auditDao,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,entityManagerFactory,dataSource,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,emailClient.proxyFactory,emailClient]; root of factory hierarchy
2009-07-15 15:40:19,356 ERROR [STDERR] Jul 15, 2009 3:40:19 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://email.utilityws.cndc.net/}EmailImplService from class net.cndc.utilityws.email.Email
2009-07-15 15:40:20,731 ERROR [STDERR] Jul 15, 2009 3:40:20 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /Email
2009-07-15 15:40:20,934 ERROR [STDERR] Jul 15, 2009 3:40:20 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://email.utilityws.cndc.net/}EmailService from class net.cndc.utilityws.email.Email
2009-07-15 15:40:23,731 ERROR [STDERR] Jul 15, 2009 3:40:23 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://email.utilityws.cndc.net/}EmailService from class net.cndc.utilityws.email.Email
2009-07-15 15:40:23,746 INFO  [org.springframework.web.context.ContextLoader] Root WebApplicationContext: initialization completed in 9984 ms
2009-07-15 15:40:23,746 ERROR [STDERR] Jul 15, 2009 3:40:23 PM org.apache.cxf.transport.servlet.CXFServlet updateContext
INFO: Load the bus with application context
2009-07-15 15:40:23,762 INFO  [org.apache.cxf.bus.spring.BusApplicationContext] Refreshing org.apache.cxf.bus.spring.BusApplicationContext@4416b: display name [org.apache.cxf.bus.spring.BusApplicationContext@4416b]; startup date [Wed Jul 15 15:40:23 CDT 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@14bcb5c
2009-07-15 15:40:23,840 ERROR [STDERR] Jul 15, 2009 3:40:23 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
2009-07-15 15:40:23,840 INFO  [org.apache.cxf.bus.spring.BusApplicationContext] Bean factory for application context [org.apache.cxf.bus.spring.BusApplicationContext@4416b]: org.springframework.beans.factory.support.DefaultListableBeanFactory@13dd7d1
2009-07-15 15:40:23,840 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@13dd7d1: defining beans []; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@8edd79
2009-07-15 15:40:23,856 ERROR [STDERR] Jul 15, 2009 3:40:23 PM org.apache.cxf.transport.servlet.AbstractCXFServlet replaceDestinationFactory
INFO: Servlet transport factory already registered

Re: Reading bean from cxf/Spring context file

Posted by Ian Roberts <i....@dcs.shef.ac.uk>.
Bruno Melloni wrote:
> No, sorry.  I guess I did not communicate it clearly.  
> 
> <jaxws:endpoint implementor="#webServiceImpl" ... /> works great.
> 
> The problem happens when I add a vanilla bean to the context:
> 
> <bean id="myBean".... />
> 
> I try to read the bean fail miserably.
> 
> - I already tried adding "private MyBeanClass myBean" and the corresponding getter/setter in my code.  No luck.

OK, your webServiceImpl class has a

public void setMyBean(MyBeanClass b) { ... }

So to wire that up all you need is the relevant <property> tag in the
webServiceImpl bean definition:

<bean id="webServiceImpl" class="my.example.WebServiceImpl">
  <property name="myBean" ref="myBean" />
</bean>

This is how Spring is supposed to work - you don't "grab" beans from the
context, the context injects them for you.

Ian

P.S. The @Autowired annotation will also work but for that you need to
add <context:annotation-config /> to your XML
(http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-annotation-config)
in order to tell Spring to look for the annotation.

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

RE: Reading bean from cxf/Spring context file

Posted by Bruno Melloni <Br...@chickasaw.net>.
No, sorry.  I guess I did not communicate it clearly.  

<jaxws:endpoint implementor="#webServiceImpl" ... /> works great.

The problem happens when I add a vanilla bean to the context:

<bean id="myBean".... />

I try to read the bean fail miserably.

- I already tried adding "private MyBeanClass myBean" and the corresponding getter/setter in my code.  No luck.
- I also tried to add @Autowire to that attribute.  Still no luck.

Clearly what I'm missing is 'how to grab' a bean from that context that was already loaded.  My classes don't seem to be aware of the CXF context - not even my service Impl class.

I agree that reloading the context like I'm doing is insane (even though it is the only thing I could do to make it work - so I was punting).  What code would *you* use to get a reference to myBean?

thanks

-----Original Message-----
From: Ian Roberts [mailto:i.roberts@dcs.shef.ac.uk] 
Sent: Tuesday, July 14, 2009 2:19 PM
To: users@cxf.apache.org
Subject: Re: Reading bean from cxf/Spring context file

Bruno Melloni wrote:
> The problem was the classpath - it includes WEB-INF/classes but not
> WEB-INF. I ended up reading the bean from the CXF context file with
> the following code:
> 
> ApplicationContext ctx = new ClassPathXmlApplicationContext(
> "../applicationContext-ws.xml" ); myBean =
> (MyBeanClass)ctx.getBean("myBeanID");
> 
> The key was the "../".
> 
> Still, even though this works, it doesn't feel right.  There must be
> a cleaner way of reading context files that reside in WEB-INF, or
> even more specifically - to read (or even autowire) beans from the
> CXF context file - just like you do in Spring MVC.

This isn't right - what you're doing there is creating a whole new
ApplicationContext that just happens to be based on the same bean
definition files as the main context (created for you by the
ContextLoaderListener).  You already have a context including all the
bean definitions in WEB-INF/applicationContext-ws.xml plus those in
WEB-INF/classes/applicationContext-app.xml, which was loaded at startup
by the ContextLoaderListener.

The correct way to proceed depends on what you want to do.  I presume
your applicationContext-ws.xml contains something like

<jaxws:endpoint implementor="my.example.WebServiceImpl" ... />

and you want to get at your Spring beans from inside your WebServiceImpl
class?  If that is the case then the easiest thing to do is to change it
to say

<jaxws:endpoint implementor="#webServiceImpl" ... />

<bean id="webServiceImpl" class="my.example.WebServiceImpl">
</bean>

This makes your web service object a Spring bean in its own right rather
than having CXF create it by reflection.  So now if you want a reference
to myBean within your service class, you can do it in the normal Spring
style - add a public void setSomething(MyBean b) method to the
WebServiceImpl class and add <property name="something" ref="myBean" />
inside the webServiceImpl <bean> definition.  You don't need to call
getBean directly.

Does this help?

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

Re: Reading bean from cxf/Spring context file

Posted by Ian Roberts <i....@dcs.shef.ac.uk>.
Bruno Melloni wrote:
> The problem was the classpath - it includes WEB-INF/classes but not
> WEB-INF. I ended up reading the bean from the CXF context file with
> the following code:
> 
> ApplicationContext ctx = new ClassPathXmlApplicationContext(
> "../applicationContext-ws.xml" ); myBean =
> (MyBeanClass)ctx.getBean("myBeanID");
> 
> The key was the "../".
> 
> Still, even though this works, it doesn't feel right.  There must be
> a cleaner way of reading context files that reside in WEB-INF, or
> even more specifically - to read (or even autowire) beans from the
> CXF context file - just like you do in Spring MVC.

This isn't right - what you're doing there is creating a whole new
ApplicationContext that just happens to be based on the same bean
definition files as the main context (created for you by the
ContextLoaderListener).  You already have a context including all the
bean definitions in WEB-INF/applicationContext-ws.xml plus those in
WEB-INF/classes/applicationContext-app.xml, which was loaded at startup
by the ContextLoaderListener.

The correct way to proceed depends on what you want to do.  I presume
your applicationContext-ws.xml contains something like

<jaxws:endpoint implementor="my.example.WebServiceImpl" ... />

and you want to get at your Spring beans from inside your WebServiceImpl
class?  If that is the case then the easiest thing to do is to change it
to say

<jaxws:endpoint implementor="#webServiceImpl" ... />

<bean id="webServiceImpl" class="my.example.WebServiceImpl">
</bean>

This makes your web service object a Spring bean in its own right rather
than having CXF create it by reflection.  So now if you want a reference
to myBean within your service class, you can do it in the normal Spring
style - add a public void setSomething(MyBean b) method to the
WebServiceImpl class and add <property name="something" ref="myBean" />
inside the webServiceImpl <bean> definition.  You don't need to call
getBean directly.

Does this help?

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

RE: Reading bean from cxf/Spring context file

Posted by Bruno Melloni <Br...@chickasaw.net>.
The problem was the classpath - it includes WEB-INF/classes but not WEB-INF. I ended up reading the bean from the CXF context file with the following code:

      ApplicationContext ctx = new ClassPathXmlApplicationContext( "../applicationContext-ws.xml" );
      myBean = (MyBeanClass)ctx.getBean("myBeanID");

The key was the "../".

Still, even though this works, it doesn't feel right.  There must be a cleaner way of reading context files that reside in WEB-INF, or even more specifically - to read (or even autowire) beans from the CXF context file - just like you do in Spring MVC.

-----Original Message-----
From: Ian Roberts [mailto:i.roberts@dcs.shef.ac.uk] 
Sent: Tuesday, July 14, 2009 11:50 AM
To: users@cxf.apache.org
Subject: Re: Reading bean from cxf/Spring context file

What do you mean you would like to "read" a custom bean?  If you need
access to one bean from another bean in the context then just use the
normal dependency injection mechanism (declare a setFoo method and use
<property name="foo" ref="..." />).  If you need the ApplicationContext
within one of your Spring beans (e.g. to look up prototype beans
repeatedly) then you can have your bean implement BeanFactoryAware or
any of the other *Aware interfaces.

If you want access to a Spring bean from a non-Spring class you don't
need to create your own ClassPathApplicationContext; you can use
WebApplicationContextUtils.getWebApplicationContext(ServletContext) to
get a reference to the context that was loaded by the ContextLoaderListener.

If you want more details I'll need a better idea of what exactly you're
trying to do...

Ian

Bruno Melloni wrote:
> I think I am missing the point on something basic.  Would somebody enlighten me?
> 
> I would like to read a custom bean that I added to the cxf/spring context file.  What is the correct syntax for reading it?
> 
> My configuration:
> 
> a) In web.xml:
> 
>   <context-param>
>     <param-name>contextConfigLocation</param-name>
>     <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
>   </context-param>
>   <listener>
>     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>   </listener>
> 
> b) Context files:
> 
>   WEB-INF/applicationContext-ws.xml (for the web service)
>   WEB-INF/classes/applicationContext-app.xml (for other beans)
> 
> c) Loading beans from applicationContext-app.xml (works OK):
> 
>   ApplicationContext ctx = new ClassPathXmlApplicationContext( "applicationContext-app.xml" );
>   myBean = (MyBeanClass)ctx.getBean("myBean");
> 
> d) Loading beans from applicationContext-ws.xml does not work. I tried:
> 
>   - similar code to that in (c)
>   - autowiring
>   - using the ServletContextAware interface (crazy idea of course - CXF is not Spring MVC)
> 
> Any help will be greatly welcome... I know this must be terribly basic and I am feeling really stupid.


-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

Re: Reading bean from cxf/Spring context file

Posted by Ian Roberts <i....@dcs.shef.ac.uk>.
What do you mean you would like to "read" a custom bean?  If you need
access to one bean from another bean in the context then just use the
normal dependency injection mechanism (declare a setFoo method and use
<property name="foo" ref="..." />).  If you need the ApplicationContext
within one of your Spring beans (e.g. to look up prototype beans
repeatedly) then you can have your bean implement BeanFactoryAware or
any of the other *Aware interfaces.

If you want access to a Spring bean from a non-Spring class you don't
need to create your own ClassPathApplicationContext; you can use
WebApplicationContextUtils.getWebApplicationContext(ServletContext) to
get a reference to the context that was loaded by the ContextLoaderListener.

If you want more details I'll need a better idea of what exactly you're
trying to do...

Ian

Bruno Melloni wrote:
> I think I am missing the point on something basic.  Would somebody enlighten me?
> 
> I would like to read a custom bean that I added to the cxf/spring context file.  What is the correct syntax for reading it?
> 
> My configuration:
> 
> a) In web.xml:
> 
>   <context-param>
>     <param-name>contextConfigLocation</param-name>
>     <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
>   </context-param>
>   <listener>
>     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>   </listener>
> 
> b) Context files:
> 
>   WEB-INF/applicationContext-ws.xml (for the web service)
>   WEB-INF/classes/applicationContext-app.xml (for other beans)
> 
> c) Loading beans from applicationContext-app.xml (works OK):
> 
>   ApplicationContext ctx = new ClassPathXmlApplicationContext( "applicationContext-app.xml" );
>   myBean = (MyBeanClass)ctx.getBean("myBean");
> 
> d) Loading beans from applicationContext-ws.xml does not work. I tried:
> 
>   - similar code to that in (c)
>   - autowiring
>   - using the ServletContextAware interface (crazy idea of course - CXF is not Spring MVC)
> 
> Any help will be greatly welcome... I know this must be terribly basic and I am feeling really stupid.


-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK