Category Archives: Error

[Solved] JpaRepository Error: Paging query needs to have a Pageable parameter! Offending method public abstract

When practicing spring data JPA, use the paging interface pageable to query data. After the interface is implemented, run and report an error:

Paging query needs to have a Pageable parameter! Offending method public abstract

Implementation code summary:

import org.springframework.data.domain.Page;
import java.awt.print.Pageable
...
@Service
public class AyUserServiceImpl implements AyUserService {
    @Resource
        private AyUserRepository ayUserRepository;
    ...
    @Override
        public Page<AyUser> findAll(Pageable pageable){
            return ayUserRepository.findAll(pageable);
        }
}

Later, it was found that the package name of pageable was wrong and changed to

import org.springframework.data.domain.Pageable;

It works normally

java.lang.NoClassDefFoundError java.lang.NoClassDefFoundError: javax.mail.internet.MimeMultipart cannot be found by

1. Analysis reason:

  java.lang.NoClassDefFoundError     The reason is that this class does not exist in this project.

But the code compilation phase can be passed. Moreover, this error will not be reported when running on other machines, but only on specific machines.

Possible causes:

A. JDK is not version 1.8, because there are many fewer jar packages in version 1.9, which are very different when running with 1.9 and 1.8,

After troubleshooting, the JDK of the machine reporting an error is also 1.8.

        The final cause of this problem is still unable to locate

2. Problem solving

Add mail. Jar, because the package contains javax. Mail. Internet. Mimemultipart. The problem is solved.

[Solved] mindspore Error: cannot allocate memory in static TLS block

preface

Use other packages in mindscore to report errors

OSError: /home/ma-user/miniconda3/envs/MindSpore-python3.7-aarch64/lib/python3.7/site-packages/torch/lib/libgomp-d22c30c5.so.1: cannot allocate memory in static TLS block

Solution:

Modify the import order of packages and put other packages in front

OSError: [Errno 24] Too many open files [How to Solve]

When you use tensorboard to open too many files at one time, an error will be reported;


Enter the following command:

$ ulimit -n

> 1024

The display system can open up to 1024 files


Temporary modification method:

$ ulimit -n 2048

This method is a temporary modification and is currently valid. Restore the original setting after exiting.


Permanent modification method:

$ sudo vim /etc/security/limits.conf

soft nofile 2048

hard nofile 2048

Restart after saving.

[Solved] TS error: element implicitly has the type ‘any’ because the type of the index expression is not ‘number’‘

preface

When developing my gift package for VIP requirements, I encountered a TS error reporting element that implicitly has the type of “any”, because the type of index expression is not ‘number’‘

Solution:

1. The wrong wording is:

window["CESIUM_BASE_URL"]="src/assets/cesium"

2. The correct wording is:

(window as any).CESIUM_BASE_URL = 'src/assets/cesium/';

[Solved] Vs2022 installat error: unable to install microsoft.netcore.hostpath

1. Official solution: https://developercommunity2.visualstudio.com/t/PackageId:MicrosoftNetCoreHostPath;Pac/1595503?entry=problem#T-ND1604890

2. I’m looking for it because PowerShell can’t be opened

3. Solution: Computer – Management – Service – Windows modules installer, set the startup type to “automatic” and start

Note: the premise is to enable ‘windows PowerShell 2.0’ in the program – [enable or disable windows features].

Error in JMeter import JMX file cannotresolveclassexception: kg.apc.jmeter.perfmon.perfmoncollector solution

When using jmeter5.1.1 to import external scripts today, you will be prompted with an error message: cause: cannotresolveclassexception: kg.apc.jmeter.perfmon.perfmoncollector detail: com.thoughtworks.xstream.converters.conversionexception: — debugging information —- cause exception: com.thoughtworks.xstream.converters.conve

 

Cause: the jar package is missing, but we don’t know which one is missing, so we can go to the official website to download the JMeter plug-in manager, let the manager automatically detect the necessary jar package when importing JMX files, and then click Install to download automatically.

1. JMeter plug-in manager download address: https://jmeter-plugins.org/install/Install/

 

2. Put the plug-ins in this folder

 

3. Restart JMeter, drag the script into, and you will be prompted to install

 

4. JMeter restarts and completes the script import

[Solved] tortoisegit error: git did not exit cleanly (exit code 128)

After the gitlab address of the company’s new project was sent, I pulled the code again with the new address, but I couldn’t pull it down;

Git did not exit cleanly (exit code 128) is prompted every time;

I checked my permissions and the address of the GIT project, and they were all OK.

Later, I found that when I used the new address to pull the code, the password I entered for the first time was still the password of the old gitlab account, and tortoisegit would not verify the correctness of the password. When the password was wrong, it would prompt me of the error I encountered.

Delete the tortoisegit credential in [control panel – user account – manage windows credentials];

When I pull the code again, I will be prompted to enter the user name and password. After entering the correct user name and password, I can pull the code.