winking 2014-10-09 09:34 采纳率: 0%
浏览 4823

maven war:Caused by: java.lang.Error: Unresolved compilation problems:

背景:
1 maven 构建
2 项目 A
3 web项目 web-B 依赖项目a

过程
1 web-B 在Eclipse 编译并在servers中可以启动并正常运行。

2 使用m2.插件对项目web-B clean 再 install ,无报错。A项目已经install成功。

3 生成web-b.war,ok。

问题
部署到tomcat下,运行,报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [XXX.XX.Dao]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import XXX.common cannot be resolved
The import XXX.common cannot be resolved
The import XXX.common cannot be resolved
ConnectionA cannot be resolved to a type
ConnectionA cannot be resolved to a type
...
有人遇到过吗?请问怎么解决,谢谢!

  • 写回答

2条回答

  • jialipu 2015-11-06 09:48
    关注

    您好,问题解决了吗?我也是遇到这种问题

    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿