Tag Archives: bug

[Solved] java.lang.reflect.InaccessibleObjectException: Unable to make protected java.net.http.HttpRequest()…

Error message:

Page:

Back end:

java.lang.reflect.InaccessibleObjectException: Unable to make protected java.net.http.HttpRequest() accessible: module java.net.http does not "opens java.net.http" to unnamed module @621f89b8

Solution:

Change the parameters passed in the controller:   HttpRequest   ——》  HttpServletRequest

[Solved] Android gradle Error: gradle project sync failed. Please fix your project and try again

Another error was reported during Android development. This is a version error. The first step is to synchronize the versions
error message:
Android studio error: gradle project sync failed. Please fix your project and try again

1. Version synchronization:

1.1 file> sync project with android gradle

If you succeed, you don’t have to look at the following

1.2 error reporting:

It can be seen or not solved:

It should be the version problem. If we can’t download it, we can download it directly manually (check the network first, and the agent has no problem, but it still can’t be solved)

2. Modify proxy parameters:

Agent:

2.1 open file> setting> Search proxy

2.2 configuration information

The address and port of the agent shall be filled in as follows:

URL: http://127.0.0.1:1080/pac

2.3 check whether the Ping is connected

    1. use check connection

      1. enter a website to test: www.baidu.com, and then test: </ OL>

Still not!

3. Manual Download

So let’s continue:

3.1 open the gradle wrapper properties file

3.2 download

Download the gradle in the last line of the website. Note that the version must be consistent. Download whatever he puts down.

3.3 modifying environment variables

Remember to modify the gradle environment variable in the computer:

        1. system environment variable:

          1. path:

3.4 modify the compilation environment configuration

Then unzip it, modify the gradle configuration in the environment, and it’s OK.

You can see that my environment is OK now:

Spring-boot-maven-plugin Error [How to Solve]

1. After using idea to create a spring project, it is found that the spring boot Maven plugin in pom.xml reports an error.

2. Compared with the springboot project created on the official website, it is found that < version> 2.4.12

3. Add the corresponding version to idea

Conclusion: the problem that is not a problem is the most people’s mentality

Dca1000 reports an error and the SPI port cannot be connected

Dca1000 reports an error and the SPI port cannot be connected

Article catalog

Dca1000 reports an error and the SPI port cannot be connected. Problem Description: problem cause: solution:

Problem Description:

When using dca1000evm board and mmwave Studio software to measure AWR/IWR board data, SPI cannot be connected

Cause of problem:

The possible causes are problems with the 60 pin HD cable of the dca1000evm, or problems with the SPI pin of the FPGA on the board

resolvent:

    replace the 60 pin HD cable. At present, TI company not only provides additional 60 pin HD cable. Therefore, it is necessary to re purchase the board or find other 60 pin HD connection lines to replace it. At present, it is known that the 60 pin HD connection line of mmwave Devpack can be used with the 60 pin HD connection line of dca1000evm to replace the FPGA chip on the board, or check whether there is faulty soldering and additional connection at the pin (metal wire may be attached to the pin)

[Solved] pycuda._driver.LogicError: cuFuncSetBlockShape failed: invalid resource handle

Invalid resource handle error in pycuda code

When running CUDA code, the following error occurs:

File "/mnt/lustre/demo/extract_disp_newtopo/face_registration-master/code/poisson.py", line 147, in blend_gs_cuda
    block = (1024, 1, 1))
  File "/mnt/lustre/miniconda3/envs/pycuda/lib/python3.6/site-packages/pycuda/driver.py", line 436, in function_call
    func._set_block_shape(*block)
pycuda._driver.LogicError: cuFuncSetBlockShape failed: invalid resource handle

Solution:
find the CUDA function part with the problem:

mod = SourceModule("""
			#include <stdint.h>
			__global__ void construct_b(
				const uint8_t* src, const int16_t* u, const int16_t* v,
				float* b,
				int pix_num, int size
			)

You can add any sentence in the following code before the function declaration

src = torch.cuda.ByteTensor(8)# Fill in the numbers at will, and the matrix is also fine, but the data type should be consistent with the data type in C++
b   = torch.cuda.FloatTensor(9)

The complete code is as follows:

src = torch.cuda.ByteTensor(8)
mod = SourceModule("""
			#include <stdint.h>
			__global__ void construct_b(
				const uint8_t* src, const int16_t* u, const int16_t* v,
				float* b,
				int pix_num, int size
			)

The specific reason is unknown because it occurs occasionally.

Failed to load plugin jsdoc: Cannot find module ‘eslint-plugin-jsdoc‘

In the egg project, NPM is installed for the first time   The following errors are reported when the package is:

Oops! Something went wrong! :(

ESLint: 5.16.0.
ESLint couldn't find the plugin "eslint-plugin-jsdoc". This can happen for a couple different reasons:

1. If ESLint is installed globally, then make sure eslint-plugin-jsdoc is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.

2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

     npm i eslint-plugin-jsdoc@latest --save-dev

Path to ESLint package: /Users/***/node_modules/eslint

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

The eslint does not work normally, and when the file does not comply with the eslint rules, an error is reported in the console log as follows:

Failed to load plugin jsdoc: Cannot find module 'eslint-plugin-jsdoc'....

reason:

When NPM v8.0 installed the project dependency, it did not correctly install the project dependency (eslint config egg) dependency (eslint plugin JSDoc)

solve:

After upgrading NPM to v8.1.2, delete the node in the project_ Modules and package-lock.json, and then reinstall

rm -rf node_modules
rm package-lock.json
npm i

Supplement:

If you have the same error, you can search globally   Eslint plugin JSDoc to locate dependencies with NPM command

➜  *** git:(master) ✗ npm ls eslint-plugin-jsdoc
***@1.0.0 /Users/***
└─┬ [email protected]
  └── [email protected]

Then determine whether to install or upgrade NPM manually or for other reasons.

How to Solve Brew install golangci-lint Error

Brew install golangci lint reports an error

Installation command:

brew install golangci-lint

report errors:

Error: No such file or directory @ rb_sysopen - /Users/...-go-1.16.6.big_sur.bottle.tar.gz

reason:

Go version problem

go 1.16.5 is already installed but outdated

Solution:

install go first and then golangci lint

brew install go
brew install golangci-lint

org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may

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.

[Solved] Vue Error: error ‘xxx‘ is defined but never used no-unused-vars

If there is an error, solve it: ‘action’ is defined but never used no unused vars

* * error reason: * * because the built Vue project selects the eslint verification specification -> The eslint specification is that you either don’t define a variable or you must use it if you define it

Solution:

Add the following code into the package.json file (restart the project after saving!!!)

"rules": {
    "generator-star-spacing": "off",
    "no-tabs":"off",
    "no-unused-vars":"off",
    "no-console":"off",
    "no-irregular-whitespace":"off",
    "no-debugger": "off"
}

[Solved] Failed to introspect Class [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfigura

Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@1f89ab83]

Solution: Introduce hystrix coordinates

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>

Error:Request failed with status code 401 [How to Solve]

Error: Request failed with status code 401

Error:

// Access to personal information
export const getUserInfoAPI = () => {
  return request({
    url: '/v1_0/user/profile',
    method: 'GET',
    Headers: {
      Authorization: `Bearer ${getToken()}`
    }
  })
}

Correct practice

// Access to personal information
export const getUserInfoAPI = () => {
  return request({
    url: '/v1_0/user/profile',
    method: 'GET',
    headers: {
      Authorization: `Bearer ${getToken()}`
    }
  })
}

In the process of writing request headers, the use of headers did not notice the case problem!!!

[Solved] Upload Files Error: Request processing failed;nested exception is org.springframework.web.multipart.MultipartExcepti

During a project development, the front-end uploaded a file and reported a bug without permission

Problem description

Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; Needed exception is org.apache.commons.fileupload.fileuploadbase $iofileuploadexception: processing of multipart/form data request failed

Error reporting reason

It should be because HTTP remote access does not have permission to access the temporary directory of Tomcat on the server

So we might as well directly set a temporary file upload path instead of using the default path of Tomcat

Solution:

Modify the uploaded temporary file path instead of the default temporary file path of Tomcat

When uploading the configuration file in applicationcontext.xml of spring, add

<property name="uploadTempDir" value="/temp"/>

The content in value is the temporary file directory you want to set