Cause: java.lang.ClassNotFoundException: Cannot find class: com.kuang.pojo.User

error

Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; 
nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource:
'file [E:\javaproject\Demo11\spring-01-hellospring\spring-09-transaction\target\classes\com\kuang\mapper\UserMapper.xml]';
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file
[E:\javaproject\Demo11\spring-01-hellospring\spring-09-transaction\target\classes\com\kuang\mapper\UserMapper.xml]'.
Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException:
Could not resolve type alias 'com.kuang.pojo.User'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.kuang.pojo.User

Cause: the location of the entity class package does not correspond to the SQL mapping file correctly

Similar Posts: