Tag Archives: Bug set

Springboot integrates Redis annotation and access error: java.io.NotSerializableException: com.demo.entity.MemberEntity

Problem Description.
SpringBoot integration with Redis annotations, requesting an error:

java.io.NotSerializableException: com.demo.entity.MemberEntity at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
~[na:1.8.0_191] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
~[na:1.8.0_191] at
java.util.ArrayList.writeObject(ArrayList.java:766) ~[na:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_191] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:1.8.0_191] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_191] at java.lang.reflect.Method.invoke(Method.java:498)
~[na:1.8.0_191] at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1140)
~[na:1.8.0_191] at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
~[na:1.8.0_191] at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
~[na:1.8.0_191] at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
~[na:1.8.0_191] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
~[na:1.8.0_191]

Problem: Serialization is not performed in the entity class
Solution: Serializable interface is implemented in the entity class

SpringBoot IntegratenRedis Annotations and access error: EL1008E: Property or field ‘getListMember‘ cannot be found on object of type

Problem Description.
Springboot integration redis annotations, request access with the following error:

org.springframework.expression.spel.SpelEvaluationException: EL1008E:
Property or field ‘getListMember’ cannot be found on object of type
‘org.springframework.cache.interceptor.CacheExpressionRootObject’ –
maybe not public or not valid?



Reason: missing single quotes in redis tag

Solution:
Add single quotes to the redis tag

[Solved] SpringBoot Project Startup Error: Field userMapper in com.demo.controller.MemberController required a bean of type ‘c

Error:
SpringBoot Project Startup Error: ‘com.xxx.mapper.XxxxMapper’ that could not be found

*************************** APPLICATION FAILED TO START


Description:
Field userMapper in com.demo.controller.MemberController required a
bean of type ‘com.demo.mapper.UserMapper’ that could not be found.
Action:
Consider defining a bean of type ‘com.demo.mapper.UserMapper’ in your
configuration.
Process finished with exit code 1

Reason: Cound not scan to find the mapper

Solution: Add @MapperScan("com.demo.mapper") in startup

[Solved] NRM Error: error code: ‘err’_INVALID_ARG_Type ‘

Commandnpm install nrm -g to install nrm 1.2.1 error:

[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
  at validateString (internal/validators.js:122:11)
  at Object.join (path.js:375:7)
  at Object.<anonymous> (C:\Users\liyin\AppData\Roaming\npm\node_modules\nrm\cli.js:17:20)
  at Module._compile (internal/modules/cjs/loader.js:1076:30)
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
  at Module.load (internal/modules/cjs/loader.js:941:32)
  at Function.Module._load (internal/modules/cjs/loader.js:782:14)
  at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
  at internal/main/run_main_module.js:17:47

] {
  code: 'ERR_INVALID_ARG_TYPE'
}

Locate the NRM directory (error line 4)

Open cli.js line 17 is modified to

//const NRMRC = path.join(process.env.HOME, '.nrmrc'); (DELETE)
const NRMRC = path.join(process.env[(process.platform == 'win32') ?'USERPROFILE' : 'HOME'], '.nrmrc');

After saving, reopen the command line to run the NRM LS command normally

C:\Windows\system32>nrm ls
  npm -------- [https://registry.npmjs.org/](https://registry.npmjs.org/)
  yarn ------- [https://registry.yarnpkg.com/](https://registry.yarnpkg.com/)
  cnpm ------- [http://r.cnpmjs.org/](http://r.cnpmjs.org/)
- taobao ----- [https://registry.npm.taobao.org/](https://registry.npm.taobao.org/)
  nj --------- [https://registry.nodejitsu.com/](https://registry.nodejitsu.com/)
  npmMirror -- [https://skimdb.npmjs.com/registry/](https://skimdb.npmjs.com/registry/)
  edunpm ----- [http://registry.enpmjs.org/](http://registry.enpmjs.org/)
  [TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:122:11)
    at Object.join (path.js:375:7)
    at Object.<anonymous> (C:\Users\liyin\AppData\Roaming\npm\node_modules\nrm\cli.js:17:20)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
  ] {
    code: 'ERR_INVALID_ARG_TYPE'
  }

MySQL (version 8.0) connection error: 1251 [How to Solve]

1. Error reporting

2. Reasons for error reporting

Because the encryption method of MySQL 8.0 is different from that of MySQL 5.0, an error will be reported when connecting

3. Solutions

You need to change the encryption method to connect successfully (follow the steps below).

1. Enter the DOS command and execute the following code to enter the database

mysql -uroot -proot //-u(database account) -p(database password)

2. Execute the following command

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password set during mysql installation';

You can also change the password with this command: change the password in the command to the new one

After completing the above two steps, there will be no error when connecting again.

Error in project operation org.springframework.beans . factory.BeanCreationException : error creating bean with name can be configured by

I encountered this problem because the JDK memory and Tomcat I configured were not large enough, so the project ran with an error. I solved this problem through configuration.

JDK configuration memory size

-Xms500m -Xmx1024m -XX:NewSize=800m -XX:MaxPermSize=800m

Run eclipse normally, open window preferences Java, and the page window will pop up

 

 

Tomcat configuration is divided into two steps

The first step is to configure in eclipse

-Xms500m -Xmx1024m -XX:NewSize=256m -XX:MaxPermSize=512m

 

Find the path to configure and install tomcat, enter the bin file, and install Tomcat 7 by myself

-Xms500m
-Xmx1024m
-XX:PermSize=64M
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=48m
– Duser.timezone=GMT +08

 

After the configuration is completed, there is no error in running the project! Problem solving