Websphere6.1部署项目时报错,连接不上jndi Name not found in context "java:"

最近在websphere 上部署一个项目时,总是报下面的错误,在tomcat上是好的。websphere上我已经配置好jndi 测试连接也是通过的。网上查了很多资料,还是没有好的解决办法。我用的是spring ,数据源是这样配置的
<bean id="baseDaoEntity" class="com.para.osc.framework.common.base.BaseDaoEntity" init-method="initEntity">
<property name="dataSource" ref="dataSource" />
<property name="dataBaseType">
<value>MYSQL</value>
</property>
<property name="jndiName">
<value>jdbc/oscdb</value>
</property>
</bean>

javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. [Root exception is javax.naming.NameNotFoundException: Name not found in context "java:".]

小弟是初次在websphere上部署项目

猜你喜欢

转载自lhyhh1024.iteye.com/blog/1677570