Tag Archives: bug

[solved] closingontransa ctionalSqlSessionorg.apache.ibatis . session.defaults.DefaultSqlSession @20] No information after that.

Today in learning to follow the teacher learning Mybatis – plus technology found god in the use of the test class testing to add and delete operation, display Closing non transactional SqlSession [org. Apache. Ibatis. Session. Defaults. DefaultSqlSession @ 656922 a0] after no information feedback, no results after searching for some information.

The solution
Eventually find the main class does not start: @ MapperScan (com. Kuang. "mapper")
pay attention to the point, we need to start class up to scan our mapper package of all interface

to add @ MapperScan (" com. Kuang. Mapper ") scans we mapper under UserMapper interface inheritance parent class BaseMapper< User> . In order to identify all methods in the parent class.

import org.mybatis.spring.annotation.MapperScan;
@MapperScan("com.kuang.mapper")

Then test the class again and find that the data is present and the information is fed back.

java.lang.IllegalArgumentException : URI scheme is not “file” error resolution

Java. Lang. IllegalArgumentException: URI scheme is not “file” error

The code in
Map side setup is as follows

        URI[] uris = context.getCacheFiles();
        File file = new File(uris[0]);
        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));

Code cached in the Driver phase

job.addCacheFile(new URI("/MR/job/input/com.txt"));

After thinking about it and looking for some forums on the Internet, I thought it might be what I wanted to do, but I could not do it with File, so I should do it with Stream.
file f = new file (UI)
le f = new file (UI)
file f = new file (UI)
file f = new file (UI); The file protocol
is now the URL(” http://… “) ) it is impossible to document
so will some changes have been made the setup phase of the code

        URI[] cacheFiles = context.getCacheFiles();
        FileSystem fileSystem = FileSystem.get(cacheFiles[0], context.getConfiguration());
        FSDataInputStream inputStream = fileSystem.open(new Path(cacheFiles[0]));
        BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));

Found that after the change was really good

Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project

Complete error message

Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project jurisdiction_controller: Could not start Tomcat


Start the Maven project wrong, use Tomcat embedded in it
The solution
The dependent use of servlets is introduced in the pom.xml file


Change after

add scope tags, and the values is provided (only role in the compilation and testing, and at the same time not pass)
The scope label specifies the range of values
compile
The default scope, which means that all Dependencies can be used throughout the lifecycle. Furthermore, these dependencies are passed to the projects on which they depend. Applies to all phases and will be released along with the project
provided
Similar to compile, but indicating that dependency is provided by JDKs or containers, such as Servlet APs and some Java EE APIs. This scope can only be used during compilation and testing and has no transitivity.
runtime
Dependency does not apply at compile time, but does apply at run and test times, such as JDBC drivers, for the run and test phases.
test
Indicates that dependency is applied at test time, not at run time. Used only during testing, to compile and run test code. Will not be released with the project.
system
Similar to Provided, but provided in the system as an external JAR, Maven does not look for it in a repository.

Visual studio console program output window flashed by

Write at the front:
This blog post introduces a little annoying problem solving that isn’t a bug. Programming with Visual Studio often uses the console output window, but there is always a situation where the window flashes past and it is difficult to see the output of the program. Here, I write a blog post to record it, so as not to forget or make similar mistakes in the same type of problem.
Solution:
1. In the last line of the program, return 0, add system(” pause “) or getchar(); It solves some problems, which I often do when I do some OJ tests in order to test in my IDE;
2. Don’t Press F5 to run the program, Ctrl + F5 instead, a window will be displayed like this: “Press any key tocontinue…” The words. The reason is that F5 is in Debugging mode, while CTRL +F5 is in Start Without Debugging mode. I found this on the Internet. Can really solve the problem, but their lack of practical theoretical knowledge to support, so in the future to read a lot of attention to the process.

Solution to the problem that OpenGL can’t find glew32.dll in vs2019

#define GLEW_STATIC
#define GLEW_STATIC
#define GLEW_STATIC
#define GLEW_STATIC
#define GLEW_STATIC
#include < GL/glew.h>
#include < GLFW/glfw3.h>
#include
# pragma comment (lib, “glew32. Lib”)
int main() {

glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);


// Open GLFW Window
GLFWwindow* window = glfwCreateWindow(800, 600, "My OpenGL Game", NULL, NULL);

if (window == NULL)
{
	printf("open window failed");
	glfwTerminate();
	return -1;
}

glfwMakeContextCurrent(window);

// Init GLEW
GLboolean glewExperimental = true;
if (glewInit() != GLEW_OK)
{
	printf("init GLEW failed");
	glfwTerminate();
	return -1;
}

glViewport(0, 0, 800, 600);

while (!glfwWindowShouldClose(window))
{
	glfwSwapBuffers(window);
	glfwPollEvents();
}

glfwTerminate();
return 0;

}
Glew32.dll

1

1

1

1

1

1

br>
> You need to enter the C disk with admin privileges, then put a copy of glew32.dll into C:\Windows\SysWOW64, the problem is fixed, the window appears

Bug resolution of 0xc0000005: access conflict occurred when reading location of 0x00000000.

The error is as follows:


Error cause:
There’s a section in the program called cout <; < string; //char string[] But didn't notice that string can also be NULL, This leads to errors. Error analysis: When string is a null pointer, cout calls strlen to get the length of the string before printing it. So you need to access the null pointer (that is, the memory address of 0), and once the program accesses this memory, the system raises an exception, thus reporting an error.

Pcl1.9 + vs2017 + win10 installation instructions and MFC adaptation

At the time of this writing, the latest version of PCL is 1.9.1, and the address is here. But from all the indications on GitHub, 1.10 should be coming soon.
This article is done on the installation of PCL, and it is very detailed, so there is no need to repeat it.
The reason for this post is to explain that if you are using “AllInOne”, please do not select 1.9.1!!
Otherwise, when compiling release x64, it will report an error (x86 has not tried it, it will probably be enough). After a few hours of investigation, I saw someone mention this problem on GitHub, but the owner said that it is not recommended to use “AllInOne”, instead, use CMake, and then there is no such thing. After a long struggle, the guy decided to give up and use CMAKE to solve the problem.
After using Debug version n for a long time, I finally want to fix this problem today, so I want to try 1.9.0 instead of CMake, and then the problem will be solved…
 
Also, in some cases, PCL may need to be used with MFC, and its configuration is basically the same as if it were used on the console. However, there are a few issues that need to be noted, otherwise it will not compile.
1. Turn off SDL check: C/C++-> SDL check – & gt; No (/ SDL -)
2. Properties – & gt; Advanced – & gt; Use of MFC ->; Use MFC in a shared DLL, otherwise the following error will occur

3. VTKATOMIC. H with “::” before three “detail”

Python error: typeerror: not supported between instances of ‘STR’ and ‘Int’

Python: TypeError: ‘<<; 'not supported between instances of' STR 'and' int '
For example:
error:
me = input(‘ I’m Hi, what’s your name, please?\n ‘)
age = input(‘ I’m 8 years old, what about you?\ n ‘)
if (the age & lt; 30):
print(f” {age}”
print “How young you are, as young as a flower!”
age = input(‘ I’m 8 years old, what about you?\n ‘)
age = int(age)
(age < 30):
print(f” {age}”
print “How young you are, as young as a flower!” )

Error in @ param in idea2017.3.4 / * * / annotation

I changed a new version of IDEA these two days, and encountered the following situations in the process of writing the code:

When I saw the red bar, I was a little confused — annotate what error it reported, and then look at the top right corner to find two errors

The @param property must be owned by the following method, otherwise an error is reported.
So don’t be careless, don’t be careless!

Solution to the problem that listen TCP 0.0.0.0:3306: bind: address already in use port is occupied in Linux centos7

Problem description:
When installing the mysql container running docker in the host environment, the port is occupied

Reason analysis:
The port is occupied and cannot bind the address
Solutions:
netstat -nap look for port 3306 look at the pid that the program is running and find that it is actually occupied, remember the pid
netstat -nap | grep 3306

kill the process, here is kill 1107