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之后就从成功了。