Module Name: GL, Error: weblogic.management.DeploymentException: Error creating bean with name 'myDataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'myDataSource1' while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myDataSource1' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'webglDS' Resolved ; remaining name 'webglDS']; Link Remaining Name: 'webglDS' - with nested exception:
[javax.naming.NameNotFoundException: Unable to resolve 'webglDS' Resolved ; remaining name 'webglDS']
}
[javax.naming.NameNotFoundException: Unable to resolve 'webglDS' Resolved ; remaining name 'webglDS']
}
myDataSource myDataSource1
是不是有问题了。你可以把代码帖出来看看啊
- Application context definition for JPetStore's business layer.
- Contains bean references to the transaction manager and to the DAOs in
- dataAccessContext-local/jta.xml (see web.xml's "contextConfigLocation").
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<!-- ========================= GENERAL DEFINITIONS ========================= --> <bean id="myDataSource" class="com.anyi.gp.debug.DataSourceWrapper">
<constructor-arg index="0">
<ref bean="myDataSource1"/>
</constructor-arg>
</bean> <bean id="myDataSource1" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/webglDS</value>
</property>
</bean> <bean id="currentTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/> <tx:advice id="txAdvice" transaction-manager="currentTransactionManager">
<tx:attributes>
<tx:method name="*" rollback-for="Exception"/>
</tx:attributes>
</tx:advice> <bean id="actionsConfig" class="com.anyi.gp.config.ActionsConfigImpl">
<constructor-arg index="0">
<ref bean="actionConfigParser"/>
</constructor-arg>
<constructor-arg index="1">
<list>
<value>classpath:config/config_gp.xml</value>
<value>classpath:config/config_wf.xml</value>
<value>WEB-INF/config_busi.xml</value>
<value>WEB-INF/config_am.xml</value>
<value>WEB-INF/config_bb.xml</value>
<value>WEB-INF/config_bd.xml</value>
<value>WEB-INF/config_bi.xml</value>
<value>WEB-INF/config_cp.xml</value>
<value>WEB-INF/config_db.xml</value>
<value>WEB-INF/config_dp.xml</value>
<value>WEB-INF/config_gk.xml</value>
<value>WEB-INF/config_fa.xml</value>
<value>WEB-INF/config_tr.xml</value>
<value>WEB-INF/config_ma.xml</value>
<value>WEB-INF/config_pd.xml</value>
<value>WEB-INF/config_pr.xml</value> <value>WEB-INF/config_bg.xml</value>
<value>WEB-INF/config_cu.xml</value>
<value>WEB-INF/config_gf.xml</value>
<value>WEB-INF/config_gl.xml</value>
<value>WEB-INF/config_rp.xml</value>
<value>WEB-INF/config_ys.xml</value>
<value>WEB-INF/config_gi.xml</value>
<value>WEB-INF/config_gb.xml</value>
<value>WEB-INF/config_sw.xml</value>
<value>WEB-INF/config_ba.xml</value>
<value>WEB-INF/config_nt.xml</value>
<value>WEB-INF/config_bm.xml</value>
<value>WEB-INF/config_sh.xml</value>
<value>WEB-INF/config_hd.xml</value>
</list>
</constructor-arg>
</bean> <bean id="actionConfigParser" class="com.anyi.gp.config.XmlActionConfigParser"/> <bean id="filterVariableConfig" class="com.anyi.gp.config.FilterVariableConfig">
<constructor-arg index="0">
<value>classpath:config/global.xml</value>
</constructor-arg>
<constructor-arg index="1">
<ref bean="options"/>
</constructor-arg>
</bean> <bean id="environmentConfig" class="com.anyi.gp.context.EnvironmentConfig">
<constructor-arg index="0">
<value>classpath:config/environment.properties</value>
</constructor-arg>
</bean> <bean id="dbdml" class="com.anyi.gp.persistence.DBdml" scope="prototype">
<constructor-arg index="0">
<ref bean="myDataSource"/>
</constructor-arg>
</bean> <bean id="rowmanager" class="com.anyi.gp.persistence.RowManagerSupport" scope="prototype">
<constructor-arg index="0">
<ref bean="myDataSource" />
</constructor-arg>
</bean> <aop:config>
<aop:pointcut id="rowmanangerRun" expression="execution(* com.anyi.gp.persistence.RowManagerSupport.*(..))" />
<aop:pointcut id="geneRun" expression="execution(* com.anyi.gp.persistence.Gene.*(..))" />
<aop:pointcut id="listFileImportRun" expression="execution(* com.anyi.gp.persistence.ListFileImport.*(..))" />
<aop:pointcut id="dbdmlRun" expression="execution(* com.anyi.gp.persistence.DBdml.*(..))" /> <aop:advisor pointcut-ref="rowmanangerRun" advice-ref="txAdvice" />
<aop:advisor pointcut-ref="geneRun" advice-ref="txAdvice" />
<aop:advisor pointcut-ref="listFileImportRun" advice-ref="txAdvice" />
<aop:advisor pointcut-ref="dbdmlRun" advice-ref="txAdvice" /> </aop:config> <bean id="gene" class="com.anyi.gp.persistence.Gene" scope="prototype">
<constructor-arg index="0">
<ref bean="myDataSource"/>
</constructor-arg>
</bean> <bean id="listFileImport" class="com.anyi.gp.persistence.ListFileImport" scope="prototype"/> <bean id="getRuleDataAction" class="com.anyi.erp.access.GetRuleDataAction" scope="prototype"/> <bean id="getRuleDeltaAction" class="com.anyi.erp.access.GetRuleDeltaAction" scope="prototype"/> <bean id="options" class="com.anyi.gp.pub.Options">
<constructor-arg index="0">
<ref bean="myDataSource"/>
</constructor-arg>
</bean> <bean id="wfConnectionFactory" class="com.kingdrive.workflow.db.ConnectionFactory">
<constructor-arg index="0">
<ref bean="myDataSource" />
</constructor-arg>
</bean> <bean id="filterHelper" class="com.anyi.erp.control.FilterHelper">
<constructor-arg index="0">
<ref bean="actionsConfig" />
</constructor-arg>
</bean>
<bean id="licenseService" class="com.anyi.gp.license.LicenseService">
<property name="dataSource" ref="myDataSource"/>
</bean>
<bean id="socketCommunication" class="com.anyi.gp.license.SocketCommunication" scope="prototype">
</bean>
<bean id="licenseManager" class="com.anyi.gp.license.LicenseManager">
</bean>
</beans>
<property name="jndiName">
<value>java:comp/env/webglDS</value>
</property>
很有可能是你配置额JNDI名字(webglDS)写错了,或者是org.springframework.jndi.JndiObjectFactoryBean 这个类有问题