org.apache.ibatis.exceptions.PersistenceException:
Error building SqlSession.
The error may exist in DepartmentMapper.xml
Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource DepartmentMapper.xml
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:64)
at com.rtl.mybatis.test.MybatisTest.getSqlSessionFactory(MybatisTest.java:26)
at com.rtl.mybatis.test.MybatisTest.test2(MybatisTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource DepartmentMapper.xml
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:120)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:98)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:78)
… 25 more
Caused by: java.io.IOException: Could not find resource DepartmentMapper.xml
at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:114)
at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:100)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:366)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:118)
… 27 more
Process finished with exit code -1
The reason for this problem is.
It is not correct to write this below.
It should look like this.
Read More:
- Error building SqlSession. ### Cause: org.apache.ibatis.builder.BuilderException: Error creating d
- Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibat
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- How to Fix The error may exist in com/kuang/dao/UserMapper.xml
- solve org.apache.ibatis . binding.BindingException : invalid bound statement (not found)
- When I first learned mybatis org.apache.ibatis . binding.BindingException report errors
- org.apache.ibatis.type.TypeException: Error setting non null for parameter #4 with JdbcType null
- Remember a mybatis error org.apache.ibatis . session.defaults.DefaultSqlSession
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.dao.UserDao
- org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘com/hujin
- Error reporting: error building sqlsession
- Does the version of idea2020.1 import mybayis jar package or report an error? Error: (4,28) Java: package org.apache.ibatis.io does not exist
- [solved] closingontransa ctionalSqlSessionorg.apache.ibatis . session.defaults.DefaultSqlSession @20] No information after that.
- Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
- FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(me
- org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].Standar
- Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign
- tomcat Issues org.apache.catalina.LifecycleException: Failed to start component
- [How to Fix] org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
- Failed: execution error, return code 1 from org.apache.hadoop . hive.ql.exec .DDLTask…