2 asland1986 asland1986 于 2014.10.09 17:34 提问

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个回答

lovesummerforever
lovesummerforever   2015.04.01 10:57

我也是这样的问题,您解决了吗。。。求救,各种办法都试用过了,但还是有这样的问题。

jialipu
jialipu   2015.11.06 17:48

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

Csdn user default icon
上传中...
上传图片
插入图片