BOS项目中出现的错误以及解决方案

Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/
 spring-context.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element 
 of the document is not <xsd:schema>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 
 'context:property-placeholder'.

这个错误怎么引起的我也不知道。这个错误的原因就是spring、hibernate、struts2的配置智能提示失效的问题。重新配置之后再重新打开项目即可

ERROR ContextLoader:307 - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘regionServiceImpl’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.itheima.bos.dao.IRegionDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER)}

这个错误是由于遗失了service实现类中dao的注解所致。
请在DAO实现类上加上@Repository的注解

This application is not currently available

发生原因:
已经开启tomcat
解决方案:
1.到任务管理关闭javaw.exe
2.使用命令:taskkill /t /f /im javaw.exe

ids for this class must be manually assigned before calling save()

通过查证,错误原因有以下几点:
- 1.此类的id值为空(没有set该值 或 手工生成的值为null)
- 2.对应的id配置类型以及长度不正确
- 3.外键关联配置管理的多对一映射,传递的对象为null(导致手工set时为null)

我自己本身的错误是主键id采用assign。在项目中并不合适。因此我将assign改为uuid之后就从成功了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值