Announcement Announcement Module
Collapse
No announcement yet.
Problem in looking up container DataSource Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem in looking up container DataSource

    Hi,

    I am using JBoss application server and configured DataSource.

    Following is my applicationContext.xml from where I am trying to use the JNDI DataSource.

    Code:
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:jee="http://springframework.org/schema/jee"
    	xsi:schemaLocation="
    	   		http://www.springframework.org/schema/beans 
    	   		http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    	   		http://www.springframework.org/schema/tx 
    	   		http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
    	   		http://www.springframework.org/schema/aop 
    	   		http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
    	   		http://www.springframework.org/schema/jee 
    	   		http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
    
    
    		<bean id="attributes" class="org.springframework.metadata.commons.CommonsAttributes"/>
    
     		
     		
     		<jee:jndi-lookup id="dataSource" jndi-name="jdbc/OracleDS"/>
     		
     		<bean id="financialService" class="com.cnn.service.FinanceServiceImpl" />
    	
    
    		<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
    		<tx:annotation-driven />
    
    		<!-- enable the configuration of transactional behavior based on xml  -->
    		<aop:config>
    			<aop:pointcut id="financialOperations" expression="execution(* com.cnn.service.*.*(..))"/>
    			<aop:advisor pointcut-ref="financialOperations" advice-ref="txAdvice"/>
    		</aop:config>
    		
    		<tx:advice id="txAdvice">
    			<tx:attributes>
    				<tx:method name="credit" read-only="true" propagation="REQUIRED" isolation="READ_COMMITTED"/>
    				<tx:method name="debit" read-only="true" propagation="REQUIRED"  isolation="READ_COMMITTED"/>
    			</tx:attributes>
    		</tx:advice>
    		
    		
    </beans>
    I am using SpringSource Tool Suite Version: 2.1.0.SR01.

    In editor, I am continously getting following error. I am completely stuck. Can anyone please help me to sort out this.

    Multiple annotations found at this line:
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'.
    - Unable to locate Spring NamespaceHandler for element 'jee:jndi-lookup' of schema namespace 'http://springframework.org/
    schema/jee'


    Thanks in advance - Roy

  • #2
    Thanks. I got this sorted. "www" from "springframework.org/schema/jee" was missing.

    Rgds - ssroy

    Comment

    Working...
    X