1 Reply Latest reply on Jul 31, 2014 5:58 AM by wdfink

    Problem in Datasource

    rafaelroque

      Hi all,

       

      I´m using JBoss 7.1.1 and my datasource is configured in standalone.xml as follows:

       

      <subsystem xmlns="urn:jboss:domain:datasources:1.0">
                 
      <datasources>
                     
      <datasource jndi-name="java:jboss/datasources/OracleDS1" pool-name="java:jboss/datasources/OracleDS1" enabled="true" use-java-context="false">
                         
      <connection-url>jdbc:oracle:thin:@xxxx:xxxx:xxxx</connection-url>
                         
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                         
      <driver>oracle</driver>
                         
      <pool>
                             
      <min-pool-size>10</min-pool-size>
                             
      <max-pool-size>100</max-pool-size>
                             
      <prefill>true</prefill>
                         
      </pool>
                         
      <security>
                             
      <user-name>xxxx</user-name>
                             
      <password>xxxx</password>
                         
      </security>
                     
      </datasource>
                     
      <drivers>
                         
      <driver name="oracle" module="com.oracle">
                             
      <xa-datasource-class>oracle.jdbc.driver.OracleDriver</xa-datasource-class>
                         
      </driver>
                     
      </drivers>
                 
      </datasources>
             
      </subsystem>




      My applicationContext.xml is configured as follows:


      <jee:jndi-lookup id="dataSource" jndi-name="java:jboss/datasources/OracleDS1" expected-type="javax.sql.DataSource" />   

      <bean id="sessionFactory"
             
      class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
               
      <property name="hibernateProperties">
                 
      <util:map>
                     
      <entry key="hibernate.dialect">
                        
      <value>org.hibernate.dialect.Oracle10gDialect</value>
                     
      </entry>
                 
      </util:map>
             
      </property>
             
      <property name="dataSource" ref="dataSource" />

       



      Although my datasource appears enabled in the Admin Console the following error continues to happen:

      Caused by: javax.naming.NameNotFoundException: Error looking up datasources/OracleDS1, service service jboss.naming.context.java.jboss.datasources.OracleDS1 is not started


      Any ideas?


      Regards,

      Rafael Roque