0
Jboss eap 6.1.0 서버에 war 파일을 배포했습니다. 나는 내 프로젝트에서 Spring 프레임 워크를 사용하고있다. sample-ds.xml (JBOSS 배포 폴더 아래에 보관)과 dataSourceConfiguration.xml (war 파일의 일부이며 applicationContext.xml 파일에 의해로드 됨)이라는 두 파일을 사용하여 JNDI를 구성했습니다. dataSourceConfiguration.xml은 다음과 같습니다 :JBOSS eap 6.1.0의 Spring 프레임 워크 JNDI 구성 문제
<beans>
<jee:jndi-lookup id="awd" jndi-name="CS/AWD_QA" resource-ref="false" />
<!-- Don't change the id of the bean com.dsths.cs.awd.utils.RoutingDataSource -->
<bean id="routingDataSource" class="com.dsths.cs.awd.utils.RoutingDataSource">
<property name="targetDataSources">
<map key-type="java.lang.String"></map>
</property>
</bean>
내 샘플-ds.xml은 다음과 같습니다 :
<datasources>
<datasource enabled="true" jndi-name="java:jboss/CS/AWD_QA" jta="true" pool-name="AWDCS" use-ccm="true" use-java-context="false">
<connection-url>jdbc:oracle:thin:@XXXXX:1521:AWD</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<transaction-isolation>TRANSACTION_NONE</transaction-isolation>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>10</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>sample</user-name>
<password>sample</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<use-fast-fail>false</use-fast-fail>
<exception-sorter class-name="org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"/>
</validation>
<timeout>
<idle-timeout-minutes>15</idle-timeout-minutes>
<xa-resource-timeout>0</xa-resource-timeout>
</timeout>
<statement>
<track-statements>false</track-statements>
</statement>
</datasource>
</datasources>
</beans>
나는 위의 JNDI 구성을 사용하여 war 파일을 배포
, 나는 다음과 같은 오류를 얻고있다 :Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AWDScriptController': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: private com.dsths.cs.awd.services.ScriptTextFetcherService com.dsths.cs.awd.rest.ws.AWDScriptController.scriptService; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scriptTextFetcherService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.dsths.cs.awd.dao.AWDFormDao com.dsths.cs.awd.services.ScriptTextFetcherService.awdDao;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AWDFormDao':
Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource com.dsths.cs.awd.dao.AWDFormDao.dataSource; nested exception is org.springframework.beans.
factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations:
{@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=awd)}
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'awd': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: CS/AWD_QA – service jboss.naming.context.java.CS.AWD_QA
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'awd': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: CS/AWD_QA – service jboss.naming.context.java.CS.AWD_QA
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'awd': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: CS/AWD_QA
여기에 무슨 문제가 있습니까?