Announcement Announcement Module
Collapse
No announcement yet.
Referenced bean FileWritingMessageHandlerFactoryBean#0 not found. STS Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Referenced bean FileWritingMessageHandlerFactoryBean#0 not found. STS Problem

    Hello,

    I'm having these problems:

    Referenced bean 'org.springframework.integration.file.config.FileW ritingMessageHandlerFactoryBean#0' not found... line 16 Spring Beans Problem
    With this application context file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:int="http://www.springframework.org/schema/integration"
    	xmlns:int-file="http://www.springframework.org/schema/integration/file"
    	xmlns:int-xml="http://www.springframework.org/schema/integration/xml"
    	xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
    	xmlns:oxm="http://www.springframework.org/schema/oxm"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="
    		http://www.springframework.org/schema/beans				http://www.springframework.org/schema/beans/spring-beans.xsd
    		http://www.springframework.org/schema/integration		http://www.springframework.org/schema/integration/spring-integration.xsd
    		http://www.springframework.org/schema/integration/file	http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
    		http://www.springframework.org/schema/integration/xml	http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd
    		http://www.springframework.org/schema/integration/jms	http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
    		http://www.springframework.org/schema/oxm				http://www.springframework.org/schema/oxm/spring-oxm.xsd
    	">
    
    <!-- ... Beginning omitted -->
    
    	<int:channel id="myChannelIn" />
    	
    	<int-file:outbound-channel-adapter id="objectsBackup" directory="${directory}" channel="myChannelIn" />
    
    </beans>
    I'm using:

    STS 2.9.1
    spring.version: 3.1.1.RELEASE
    spring.integration.version: 2.1.0.RELEASE

    Additionally I have the same problem with int-xml: Referenced bean 'org.springframework.integration.xml.transformer.M arshallingTransformer#0' not found... line 16 Spring Beans Problem

    If I change to
    spring.integration.version: 2.1.1.RELEASE

    The MarshallingTransformer#0 problem remains but instead of the problem with FileWritingMessageHandlerFactoryBean now is the "Referenced bean 'nullChannel'" is the bean that [can] not [be] found

    It seems an old problem:

    http://forum.springsource.org/showth...an-0-not-found

    http://forum.springsource.org/showth...ation-scenario

    And it seems to be solved:

    https://jira.springsource.org/browse/INT-2295

    But I can't fix these warnings.

    Can anybody help me with this issue?

    Thanks in advance.

  • #2
    I have added a Sticky thread here http://forum.springsource.org/showth...ngs-And-Errors

    Those steps usually solve these kinds of issues.

    Comment


    • #3
      Thank you very much for your prompt response.

      I followed all the steps and it didn't work.

      After some little clean up and lot of dispair, I tried to copy-paste the contents from the application context to a new fresh XML file.

      It worked

      Then, I remember that I created the original context file as a (right click) New Spring Bean Configuration File (I presume the 'S' that appears in the top right means something related to Spring. The new plain XML file doesn't have that 'S')

      Thanks again for your help and for the good Sticky thread.

      Comment


      • #4
        I Apologize, but the problem remains.

        Removing the Spring Nature from the application context files is not a solution, because I want STS to warn me any inconsistencies in the configuration (for instance, I was referencing inner beans with "ref" attribute in Spring integration artifacts without showing any error. Once I added the XML as bean configuration file, an error was shown)

        I'm currently have these errors:

        Referenced bean 'mailSender' not found
        Referenced bean 'nullChannel' not found
        Referenced bean 'org.springframework.integration.transformer.Heade rEnricher#0' not found
        Referenced bean 'org.springframework.integration.transformer.Heade rEnricher#1' not found
        Referenced bean 'org.springframework.integration.xml.transformer.M arshallingTransformer#0'
        Referenced bean 'org.springframework.mail.javamail.JavaMailSenderI mpl#0' not found
        With:
        Code:
        <?xml version="1.0" encoding="UTF-8"?>
        <beans xmlns="http://www.springframework.org/schema/beans"
        	xmlns:int="http://www.springframework.org/schema/integration"
        	xmlns:int-file="http://www.springframework.org/schema/integration/file"
        	xmlns:int-xml="http://www.springframework.org/schema/integration/xml"
        	xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
        	xmlns:oxm="http://www.springframework.org/schema/oxm"
        	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        	xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
        	xsi:schemaLocation="http://www.springframework.org/schema/integration/xml http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd
        		http://www.springframework.org/schema/integration/mail http://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd
        		http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
        		http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd
        		http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
        		http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
        
        ...
        
        	<int-mail:outbound-channel-adapter id="mailSender" host="${mail.host}" port="${mail.port}" username="${mail.username}" password="${mail.password}" />
        According org.springframework.integration.mail.MailSendingMe ssageHandler, a JavaMailSender is mandatory for it.

        But using the namespace, org.springframework.integration.mail.config.MailNa mespaceHandler will register org.springframework.integration.mail.config.MailOu tboundChannelAdapterParser as bean definition parser for "outbound-channel-adapter" and it generates a bean of the JavaMailSenderImpl class.

        Besides following the suggested steps, I don't know what else can I do.

        Any further suggestions?

        Thanks.

        Comment


        • #5
          I, too, am frustrated by these bogus warnings every day. These warnings appear to only occur for implicit bean references and explicit references to beans provided by the ApplicationContext by default at runtime. Some examples:
          Code:
          Referenced bean 'errorChannel' not found [config set: dtr-webapp/dtr-webapp-main]
          Code:
          Referenced bean 'org.springframework.integration.channel.interceptor.WireTap#0' not found [config set: dtr-webapp/dtr-webapp-main]
          In my opinion the STS config set validation (especially for Spring Integration) needs to be a lot smarter and/or less naive in its processing of a composite ApplicationContext definition. The problem has been present in all versions of STS, including the latest 3.0.0 release.

          Are there steps that I'm unaware to eliminate these bogus warnings? I followed the steps in the above sticky thread to no avail.

          Comment


          • #6
            If warnings/errors such as these are caused by errors in the SI namespace parsers, we do try to eliminate them when we encounter them, or when someone reports them.

            However, I think some of these warnings are due to some caching, or metadata, stored by the STS plugins.

            For example, I just found a file in my workspace that had the "Referenced bean 'errorChannel' not found" problem.

            I went to Window | Preferences | Spring and turned off the 'Beans Validator'. As one might expect, the warning went away. However, strangely, when I re-enabled the validator, the warning did not reappear, even when I restarted STS.

            Hence, it seems to be a problem lurking in the plugin, rather a problem with the SI parsers.

            Comment


            • #7
              Still struggling with this issue:

              "cvc-complex-type.3.2.2: Attribute 'fixed-rate is not allowed to appear in element 'intoller'"
              Now using STS 3.0.0 (with Maven Integration for Eclipse downloaded to 0.12, I mention this just in case it has something to do with the errors. Who knows)

              Code:
              <?xml version="1.0" encoding="UTF-8"?>
              <beans xmlns="http://www.springframework.org/schema/beans"
              	xmlns:int="http://www.springframework.org/schema/integration"
              	xmlns:int-file="http://www.springframework.org/schema/integration/file"
              	xmlns:int-http="http://www.springframework.org/schema/integration/http"
              	xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
              	xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
              	xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
              	xmlns:int-xml="http://www.springframework.org/schema/integration/xml"
              	xmlns:oxm="http://www.springframework.org/schema/oxm"
              	xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc"
              	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              	xsi:schemaLocation="http://www.springframework.org/schema/integration/http http://www.springframework.org/schema/integration/http/spring-integration-http.xsd
              		http://www.springframework.org/schema/integration/xml http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd
              		http://www.springframework.org/schema/integration/mail http://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd
              		http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
              		http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd
              		http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
              		http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
              		http://www.springframework.org/schema/integration/stream http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
              		http://www.springframework.org/schema/integration/jdbc http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd
              		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
              
              
              	<int:inbound-channel-adapter ref="planner" method="doStuff" >
              		<int:poller fixed-rate="15" />
              	</int:inbound-channel-adapter>
              	
              </beans>

              Comment

              Working...
              X