Tag Archives: bug handling

How to Solve Error: Error parsing mapper XML

[Solved] Error parsing Mapper XML

Error parsing mapper xml
this error message is essentially a mapper XML error
failed resolve xxx XML, etc.
here we analyze some problems that will not become popular when writing, and that will cause errors when starting

1. ID conflict

The conflicts here are
resultmap

<resultMap type="com.newtouch.business.module.dto.T01agentComDTO" id="t01agentComMap">

<resultMap type="com.cpi.newtouch.business.module.dto.T01comDTO" id="t01agentComMap">

Specific SQL

<select id="findBy" >
<update id="findBy">

As long as two or more IDs are the same, an error will be reported. This usually happens because you don’t pay attention to copy and paste. You need to be careful!

2. Return type error

<resultMap type="com.newtouch.business.module.dto.T01agentComDTO" id="t01agentComMap">
<select id="findBy" resultType="t01agentComMap">

Like here, I returned the resultmap, but wrote the resulttype

Similarly, for example, if I return a string type, but I write a resultmap, I will also report an error

3. Not writing the full class name

<resultMap type="com.newtouch.business.module.dto.T01agentComDTO" id="t01agentComMap">

The resultmap, if I write it like this

<resultMap type="T01agentComDTO" id="t01agentComMap">

An error will be reported. Of course, if relevant settings are configured

[How to Solve] error at ::0 formal unbound in pointcut

error at ::0 formal unbound in pointcut

This error was reported when using aop’s @before for log prenotification

Error code here

	@Before(value = "webLogAspect()")
    public void logBefore(JoinPoint joinPoint,Object ret) {
        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        HttpServletRequest request = attributes.getRequest();
        //在attribute中加入开始时间
        request.setAttribute("time",System.currentTimeMillis());
    }

Then, after I remove the second parameter, it is normal

@Before(value = "webLogAspect()")
public void logBefore(JoinPoint joinPoint) {

Explain that other operations are required when multiple parameters are used, otherwise an error will be reported

@Before(value = "webLogAspect() && args(ret)")
public void logBefore(JoinPoint joinPoint, Object ret) {

Problem-solving

Error BC: command not found when git bash runs shell script

catalog:

1. Problem Description: 2. Error reporting reason: 3. Solution:

1. Problem Description:

Under Windows system, an error occurs when running shell script with git bash:

bc: command not found

2. Error reporting reason:

Git is missing the BC module, and git cannot directly install the BC module

3. Solution:

By downloading msys2, download the BC package in msys2 and copy it to git
specific steps:
(1) install msys2 and download the address https://www.msys2.org/
(2) After installation, open the msys2 shell and install BC with the following command

pacman -S bc

(3) Go to the msys64 \ usr \ bin folder under the msys2 installation directory and find bc.exe
(4) copy the bc.exe file to the GIT \ usr \ bin folder under the GIT installation directory
re run the shell script in Git bash, and there will be no BC: command not found error.

error: resource android:attr/lStar not found [How to Solve]

error: resource android:attr/lStar not found…….

After searching for a long time, there is nothing related to LSTAR under my attr directory. The project has not added LSTAR related fields from the beginning to the end, but the project inexplicably reported this error, that is, it can’t run. It can run in the first minute. Suddenly it can’t run. Do you say it’s annoying or not

To get down to business, the reason is that Android. Core: core KTX: + is referenced in the third-party library, and then the system automatically updates to version 1.6.0, resulting in an error: resource Android: attr/LSTAR not found. Change the version to Android. Core: core KTX: 1.6.0, synchronize and compile it.