Results 1 to 3 of 3

Thread: JMS Back Channel - No bean named 'connectionFactory' is defined

  1. #1
    Join Date
    Apr 2011
    Posts
    27

    Post JMS Back Channel - No bean named 'connectionFactory' is defined

    I have a simple jms backed message channel

    http://www.springframework.org/schem...on-jms-2.0.xsd

    <jms:channel id="sinaiCalypsoJMSChannel.0" queue="tradeQueue.0"/>

    <bean id="tradeQueue.0" class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg value="AMQ.Trade.Channel.0"/>
    </bean>

    Plus my Factory is defined else where ...

    <bean id="tradeJmsFactory" class="org.apache.activemq.pool.PooledConnectionFa ctory"
    init-method="start" destroy-method="stop">
    <property name="connectionFactory">
    <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <property name="brokerURL">
    <value>tcp://localhost:61616</value>
    </property>
    </bean>
    </property>
    </bean>



    I get this error

    "Error creating bean with name tradeQueue.0': Cannot resolve reference to bean 'connectionFactory' while setting bean property 'connectionFactory'; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'connectionFactory' is defined"

    So the question is how do I link my tradeJmsFactory factory with my sinaiCalypsoJMSChannel.0.

    Where do I set the connectionFactory property?

    Are there any complete examples to get this working as I can't find any where the connection factory is not called 'connectionFactory'?
    Last edited by robin.sharp; Sep 27th, 2011 at 03:51 AM.

  2. #2
    Join Date
    Apr 2011
    Posts
    27

    Default

    I looked at the xsd and figured it

    <jms:channel id="tradeJMSChannel.0" qconnection-factory="tradeJmsFactory" ueue="tradeQueue.0"/>

  3. #3
    Join Date
    Oct 2011
    Posts
    4

    Default

    Friends,

    I'm having trouble start in my Tomcat 6.0 server after implementation of Spring 3.1. Going up the server error occurs below

    No bean named 'springSecurityFilterChain' is defined


    My web.xml
    Code:
    [...]
    	<!-- SPRING -->
    
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    	<listener>
    		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    	</listener>
    	<listener>
    		<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
    	</listener>
    
    	<filter>
    		<filter-name>springSecurityFilterChain</filter-name>
    		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    	</filter>
    	<filter-mapping>
    		<filter-name>springSecurityFilterChain</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    
    
    	<context-param>
    		<param-name>contexConfigLocation</param-name>
    		<param-value>
    	 		/WEB-INF/applicationContext.xml
    	 		/WEB-INF/applicationContext-security.xml
    	 	</param-value>
    	</context-param>
    
    	<context-param>
    		<param-name>contextClass</param-name>
    		<param-value>    
                 org.springframework.web.context.support.AnnotationConfigWebApplicationContext    
             </param-value>
    	</context-param>
    
    	<!-- <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
    		</listener> -->
    	<!-- FECHA SPRING -->
    
    [...]
    MY applicationContext.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <b:beans xmlns="http://www.springframework.org/schema/security"
    	xmlns:b="http://www.springframework.org/schema/beans" 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-3.0.xsd 
    	http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
    	<http>
    		<intercept-url pattern="/admin/**" access="ROLE_ADMINISTRADOR" />
    		<intercept-url pattern="/restrito/**" access="ROLE_USUARIO" />
    		<form-login login-page="/publico/login.jsf"
    			always-use-default-target="true" default-target-url="/restrito/principal.jsf"
    			authentication-failure-url="/publico/login.jsf?login_error=1" />
    		<logout />
    		<remember-me />
    	</http>
    	<authentication-manager>
    		<authentication-provider>
    			<jdbc-user-service data-source-ref="sdkStoreDataSource"
    				authorities-by-username-query="SELECT 
    	u.login, p.permissao FROM usuario u, usuario_permissao p WHERE u.id_usuario 
    	= p.permissao AND u.login = ?"
    				users-by-username-query="SELECT login, senha, 
    	ativo FROM usuario WHERE login = ?" />
    		</authentication-provider>
    	</authentication-manager>
    </b:beans>

    My applicationContext-security.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	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-3.0.xsd">
    	<bean id="sdkStoreDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName">
    			<value>java:comp/env/jdbc/sdkStoreDB</value>
    		</property>
    	</bean>
    	<beans:bean id="springSecurityFilterChain" class="org.springframework.security.util.FilterChainProxy">
            <filter-chain-map path-type="ant">
                <filter-chain pattern="/**" filters="sif"/>
            </filter-chain-map>
        </beans:bean>
    
    	
    </beans>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •