Home > Back-end >  Study of mybatis great god help have a look
Study of mybatis great god help have a look

Time:12-05


The Exception in the thread "main" org. Apache. Ibatis. Exceptions. PersistenceException:
# # # Error building SqlSession.
# # # The error may exist in SQL Mapper Configuration
# # # Cause: org. Apache. Ibatis. Builder. BuilderException: Error parsing SQL Mapper Configuration. The Cause: org. Apache. Ibatis. The datasource. DataSourceException: Unknown datasource property: psssword
The at org. Apache. Ibatis. Exceptions. ExceptionFactory. WrapException (30) ExceptionFactory. Java:
The at org. Apache. Ibatis. Session. The SqlSessionFactoryBuilder is. Build (80). The SqlSessionFactoryBuilder is Java:
The at org. Apache. Ibatis. Session. The SqlSessionFactoryBuilder is. Build (64). The SqlSessionFactoryBuilder is Java:
At com. Itheima. Test. MybaatisTest. Main (MybaatisTest. Java: 22)
Under Caused by: org. Apache. Ibatis. Builder. BuilderException: Error parsing SQL Mapper Configuration. The Cause: org. Apache. Ibatis. The datasource. DataSourceException: Unknown datasource property: psssword
The at org. Apache. Ibatis. Builder. XML. XMLConfigBuilder. ParseConfiguration (XMLConfigBuilder. Java: 121)
The at org. Apache. Ibatis. Builder. XML. XMLConfigBuilder. Parse (XMLConfigBuilder. Java: 99)
The at org. Apache. Ibatis. Session. The SqlSessionFactoryBuilder is. Build (78). The SqlSessionFactoryBuilder is Java:
. 2 more
Under Caused by: org. Apache. Ibatis. The datasource. DataSourceException: Unknown datasource property: psssword
The at org. Apache. Ibatis. The datasource. Unpooled. UnpooledDataSourceFactory. SetProperties (55) UnpooledDataSourceFactory. Java:
The at org. Apache. Ibatis. Builder. XML. XMLConfigBuilder. DataSourceElement (XMLConfigBuilder. Java: 326)
The at org. Apache. Ibatis. Builder. XML. XMLConfigBuilder. EnvironmentsElement (XMLConfigBuilder. Java: 280)
The at org. Apache. Ibatis. Builder. XML. XMLConfigBuilder. ParseConfiguration (XMLConfigBuilder. Java: 116)
. 4 more

Process finished with exit code 1

CodePudding user response:

Should be a database connection profile error

CodePudding user response:

The Exception in the thread "main" Java. IO. IOException: Could not find the resource getSqlMapConfig. XML
At org. Apache. Ibatis. IO. Resources. GetResourceAsStream (114) Resources. Java:
At org. Apache. Ibatis. IO. Resources. GetResourceAsStream (100) Resources. Java:
At com. Itheima. Test. MybatisTest. Main (MybatisTest. Java: 22)
Become like this now

CodePudding user response:

Database connection, the configuration file database password

CodePudding user response:

Didn't find the corresponding XML file, if your XML file name and the mapper is not the same as the interface name

CodePudding user response:

refer to the second floor Gong_xuesong response:
Exception in the thread "is the main" Java. IO. IOException: Could not find the resource getSqlMapConfig. XML
At org. Apache. Ibatis. IO. Resources. GetResourceAsStream (114) Resources. Java:
At org. Apache. Ibatis. IO. Resources. GetResourceAsStream (100) Resources. Java:
At com. Itheima. Test. MybatisTest. Main (MybatisTest. Java: 22)
Now become so
can't find your configuration files, and then your test class also has a problem, the blue point in an error

CodePudding user response:

Mybatis configuration file problems, carefully check the configuration file (see what is write wrong)

CodePudding user response:

Unknown DataSource property: psssword
See if the datasource configuration file the document had the wrong password

CodePudding user response:

Three reasons:
A. Is mybatis can't read the configuration file, or configuration class read less than
2. The password error
Three. The driver package may be wrong

CodePudding user response:

Unknown DataSource property: psssword
Obviously the
  • Related