org.springframework.Bohnen.factory.NoSuchBeanDefinitionException: No bean named 'documentumServiceForIDP' definiert ist
Habe ich ein Szenario, wo wir schickten zwei OHR auf JBoss4.2.3. Jedes Ohr hat seine eigene Datei ApplicationContext definiert. Aber ich merkte beim Debuggen einer Anwendung, die bean-Definitionen überschreiben die anderen.
Hier der server log:
09:23:23,962 INFO
> [XmlWebApplicationContext] Refreshing
> org.springframework.web.context.support.XmlWebApplicationContext@1b4aee4:
> display name [Root
> WebApplicationContext]; startup date
> [Thu Jul 08 09:23:23 MDT 2010]; root
> of context hierarchy 09:23:24,103 INFO
> [XmlBeanDefinitionReader] Loading XML
> bean definitions from ServletContext
> resource
> [/WEB-INF/applicationContext-idp.xml]
> 09:23:24,166 INFO
> [XmlBeanDefinitionReader] Loading XML
> bean definitions from URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp608645178333044413IDP.ear-contents/IDPEJB.jar!/META-INF/applicationContext.xml]
> 09:23:24,181 INFO
> [XmlWebApplicationContext] Bean
> factory for application context
> [org.springframework.web.context.support.XmlWebApplicationContext@1b4aee4]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@8478d0
> 09:23:24,384 INFO
> [DefaultListableBeanFactory]
> Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@8478d0:
> defining beans
> [**powersuiteServiceFactory,url,qname,powersuiteService,IDPDocumentumServiceFactory,documentumServiceForIDP,applicationUserName,IDPApplicationContextProvider,idpdctmfactory,externalService,brokerIp,jmsConnectionFactory,redeliveryPolicy,jmsDestination,IDPjmsTemplate,jmsProducer,jmsListener,transactionManager,IDPJmsContainer**];
> root of factory hierarchy
>
> [[/SecureClaim]] Initializing Spring
> root WebApplicationContext
> 09:23:45,260 INFO [ContextLoader]
> Root WebApplicationContext:
> initialization started 09:23:45,275
> INFO [XmlWebApplicationContext]
> Refreshing
> org.springframework.web.context.support.XmlWebApplicationContext@1fbf66c:
> display name [Root
> WebApplicationContext]; startup date
> [Thu Jul 08 09:23:45 MDT 2010]; root
> of context hierarchy 09:23:45,275 INFO
> [XmlBeanDefinitionReader] Loading XML
> bean definitions from ServletContext
> resource
> [/WEB-INF/applicationContext.xml]
> 09:23:45,291 INFO
> [XmlBeanDefinitionReader] Loading XML
> bean definitions from URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp608645178333044413IDP.ear-contents/IDPEJB.jar!/META-INF/applicationContext.xml]
> 09:23:45,306 INFO
> [XmlBeanDefinitionReader] Loading XML
> bean definitions from URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp7456914759893588436SecureClaim.ear-contents/SipsFacelet.jar!/META-INF/applicationContext.xml]
> 09:23:45,322 INFO
> [DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'applicationContextProvider':
> replacing [Generic bean: class
> [org.idahosif.sips.common.spring.ApplicationContextProvider];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in
> ServletContext resource
> [/WEB-INF/applicationContext.xml]]
> with [Generic bean: class
> [org.idahosif.sips.common.spring.ApplicationContextProvider];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp7456914759893588436SecureClaim.ear-contents/SipsFacelet.jar!/META-INF/applicationContext.xml]]
> 09:23:45,322 INFO
> [XmlBeanDefinitionReader] Loading XML
> bean definitions from URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp7456914759893588436SecureClaim.ear-contents/SipsMessaging.jar!/META-INF/applicationContext.xml]
> 09:23:45,322 INFO
> [DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'brokerIp': replacing [Generic bean:
> class
> [org.apache.activemq.ActiveMQConnectionFactory];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp608645178333044413IDP.ear-contents/IDPEJB.jar!/META-INF/applicationContext.xml]]
> with [Generic bean: class
> [org.apache.activemq.ActiveMQConnectionFactory];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp7456914759893588436SecureClaim.ear-contents/SipsMessaging.jar!/META-INF/applicationContext.xml]]
> 09:23:45,322 INFO
> [DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'redeliveryPolicy': replacing [Generic
> bean: class
> [org.apache.activemq.RedeliveryPolicy];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp608645178333044413IDP.ear-contents/IDPEJB.jar!/META-INF/applicationContext.xml]]
> with [Generic bean: class
> [org.apache.activemq.RedeliveryPolicy];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp7456914759893588436SecureClaim.ear-contents/SipsMessaging.jar!/META-INF/applicationContext.xml]]
> 09:23:45,338 INFO
> [DefaultListableBeanFactory]
> Overriding bean definition for bean
> 'transactionManager': replacing
> [Generic bean: class
> [org.springframework.transaction.jta.JtaTransactionManager];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp608645178333044413IDP.ear-contents/IDPEJB.jar!/META-INF/applicationContext.xml]]
> with [Generic bean: class
> [org.springframework.transaction.jta.JtaTransactionManager];
> scope=singleton; abstract=false;
> lazyInit=false; autowireMode=0;
> dependencyCheck=0;
> autowireCandidate=true; primary=false;
> factoryBeanName=null;
> factoryMethodName=null;
> initMethodName=null;
> destroyMethodName=null; defined in URL
> [jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp7456914759893588436SecureClaim.ear-contents/SipsMessaging.jar!/META-INF/applicationContext.xml]]
> 09:23:45,338 INFO
> [XmlWebApplicationContext] Bean
> factory for application context
> [org.springframework.web.context.support.XmlWebApplicationContext@1fbf66c]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@1632823
> 09:23:45,494 INFO
> [DefaultListableBeanFactory]
> Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@1632823:
> defining beans
> [**powersuiteServiceFactory,url,qname,powersuiteService,documentumServiceFactory,documentumRepository,applicationContextProvider,brokerIp,jmsConnectionFactory,redeliveryPolicy,jmsDestination,IDPjmsTemplate,jmsProducer,jmsListener,transactionManager,IDPJmsContainer,externalServiceFactory,configProperties,externalServiceForIndex,appExternalVarForCAP,processVariables,connectionFactory,destination,jmsTemplate,jmsSender,messageListener,jmsContainer**];
> root of factory hierarchy**
Ich kämpfen, auf diese für ein paar Tage, aber ich habe keine Lösung finden. Bitte helfen Sie mir, wenn jeder Weg durch dieses Problem vor.
- Ich sehe nicht, was der Betreff-Zeile hat mit der Frage zu tun
- Haben Sie Ihre applicationContext.xml Dateien in eine Jar?
Du musst angemeldet sein, um einen Kommentar abzugeben.
Nicht sicher, was Sie sah, während des Debuggens, aber auf der Grundlage der Protokolle, die Sie zur Verfügung gestellt haben, haben Sie zwei separate BeanFactories:
DefaultListableBeanFactory@8478d0 verbindet bean-Definitionen aus
DefaultListableBeanFactory@1632823 verbindet bean-Definitionen aus
Ich nehme an, Sie haben zwei web-apps (eines in jedem Ohr) und Sie beide setup-Anwendung Kontext.
Ihre Probleme zu sein scheint, verbunden, um den zweiten Kontext:
ApplicationContextProvider
(bean nameapplicationContextProvider
), definiert in beide:SecureClaim.ear/SipsFacelet.jar!/META-INF/applicationContext.xml
und/WEB-INF/applicationContext.xml
ActiveMQConnectionFactory
(bean namebrokerIp
), definiert in beide:IDP.ear/IDPEJB.jar!/META-INF/applicationContext.xml
undSecureClaim.ear/SipsMessaging.jar!/META-INF/applicationContext.xml
RedeliveryPolicy
(bean nameRedeliveryPolicy
), definiert in beide:IDP.ear/IDPEJB.jar!/META-INF/applicationContext.xml
undSecureClaim.ear/SipsMessaging.jar!/META-INF/applicationContext.xml
JtaTransactionManager
(bean nametransactionManager
), definiert in beide:RedeliveryPolicy
(bean nameRedeliveryPolicy
), definiert in beide:IDP.ear/IDPEJB.jar!/META-INF/applicationContext.xml
undSecureClaim.ear/SipsMessaging.jar!/META-INF/applicationContext.xml
Müssen Sie sicherstellen, dass Sie brauchen, um alle diese applicationContext.xml -Dateien. Wenn das der Fall ist (was ich bezweifle wirklich, aber immer noch) Sie sollten geben Sie Ihre Bohnen unterschiedliche Namen.
Besser zu verstehen, was Los ist, können Sie veröffentlichen Sie Ihre web.xml für beide web-apps hier?