javax.naming.NameNotFoundException: EName [xxxx] is not bound in this Context. Unable to find [xxxx]

11 篇文章 1 订阅
9 篇文章 0 订阅

完整报错信息如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘agencySybaseSessionFactory’ defined in class path resource [spring/DAO.xml]: Invocation of init method failed; nested exception is org.springframework.jndi.JndiLookupFailureException: JndiObjectTargetSource failed to obtain new target object; nested exception is javax.naming.NameNotFoundException: Name [xxxxxxx] is not bound in this Context. Unable to find xxxx].

Caused by: org.springframework.jndi.JndiLookupFailureException: JndiObjectTargetSource failed to obtain new target object; nested exception is javax.naming.NameNotFoundException: Name [agy-hpsyb01-aidcconfig-utf8] is not bound in this Context. Unable to find [agy-hpsyb01-aidcconfig-utf8].
Caused by: javax.naming.NameNotFoundException: Name [xxxxxxxxx] is not bound in this Context. Unable to find [agy-hpsyb01-aidcconfig-utf8].

这是一个idea tomcatlocal 控制台的报错,最近新拉的项目,搭环境还是要熟悉这个项目的同事搭吧,找了一天多,没有解决,后来让同事解决了
这个报错大概是,创建 agencySybaseSessionFactory ben 失败,在spring/dao.xml文件里,找不到 xxxxx 这个上下文域

解决办法:
1.在本地tomcat conten.xml 文件里配置名为 xxxxxxx 的数据配置信息
2.确保 dao.xml能读取到这个这条 xxxxxxxx 配置
项目成功

在这里插入图片描述
配置文件里有个类爆红,其实可以不用理他,浪费了大量时间找jar包,也找不到这个类

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值