Tag Archives: java

Svn notes: error reporting in use

Error reported during use of SVN
1. The Error while creating module: org. Apache.. Subversion javahl. ClientException: Authorization failed
the SVN: authentication failed
Happened: after start SVN service, for the first time to submit project
solution: modify the configuration files of the storage directory svnserve. Conf, passwd, authz:
the first one to open the anonymous access. Modify the svnserve.conf file and change the anon-access value to write
.
modify svnserve.conf file:
en auth-access = write, password-db = passwd, authz-db = authz and set anon-access to none(otherwise error 5 will be reported)
m>y the passwd file:
add user username = password in the form of a

modify authz file: to add

set the permissions on the combination of operation such as:
[/] #
aifa = rw #
@kaifa = rw #
cesh>r # Read-Only
* = #
4
[/] # <>> @kaifa = rw #
ceshi = r # Read-Only
* = #
2. The Filesystem has no item SVN: URL ‘SVN:// localhost/OA/DesignPattern’ non – existent in revision 2

solution:
en this error occurs, we can find what symbol is on the project?And *, we just need to right-click, submit the project again,
and put it into the repository

3. SVN: E200009: Submission failed (details below):
SVN: E200009: “F:\workspace\SVN\SpaceJohnnie\OA\ hello.txt” is not under version control

F:\workspace\SVN\SpaceJohnnie\OA> SVN commit hello.txt
SVN commit hello.txt
br> SVN commit hello.txt

4. SVN: E205007: Commit failed (details below):
SVN: E205007: Unable to get log information using external editor; Consider setting the environment variable $SVN_EDITOR, or
with the –message (-m) or –file (-f) options
n: E205007: No SVN_EDITOR, VISUAL or EDITOR environment variables are set, and
h>o “editor-cmd” option in the runtime configuration parameters

SVN commit hello.txt
br> s>ommit -m “First commit” hello.txt

>commit -m “First commit” hello.txt
5.Item is not readable
SVN: encountered an unreadable path; Access denied.
happened: an error occurred when
access configuration, the anonymous access is not a value to none, namely: anon – access = none
solution:
modify svnserve. Conf file Settings anon – access = none

import org.junit.Test And @ test error reporting — solutions

Recently, when I was working on a project with Spring Framework, I found that there were errors in import org.junit.test and @test. If there is no error in package import, the solution is as follows:


Solution 1:
MyEclipse right-click on the Build Path properties of the project and select the Add Libararies screen. Select JUnit to import. Eclipse does the same.
Solution 2:
The reason is that the package in which the Java file resides is anonymous by default.
a new com. XXX. XXX is the name of package, move Java file under the name with respect to ok
Solution 3:
The Java class for writing JUnit tests is named test.java, and if you must use test.java, you can only add @org.jUnit. Test
to the method
Solution 4:
The class name of this Test class should be changed to another class name instead of Test. I have encountered this problem many times because the class name was used Test. After the change, no error was reported normally.

Failed to execute goal

To summarize, Maven packaging, a project engineering development tool called Idea14, uses JDK version 1.8
1. You need to close the idea before packaging, otherwise part of the files will not be deleted when MVN is clean, and files will also be lost when MVN is package.

2. MVN package packaging ERROR: [ERROR] Failed to execute goal. Org. Apache maven. Plugins: maven – clean – plugin: 2.6.1: clean (default – the clean) on the project
Solutions:
1. The POM configuration for the Maven plug-in is as follows:

<plugin>  
    <groupId>org.apache.maven.plugins</groupId>  
    <artifactId>maven-compiler-plugin</artifactId>  
    <version>3.1</version>  
    <configuration>  
        <verbose>true</verbose>  
        <fork>true</fork>  
        <executable>${JAVA_HOME}/bin/javac</executable>  
    </configuration>  
</plugin>  

${JAVA8_HOME} (${JAVA8_HOME}, ${JAVA8_HOME})

The ${JAVA8_HOME} variable is configured in settings.xml as follows:

<profile>  
            <id>custom-compiler</id>  
            <properties>  
                <JAVA8_HOME>C:\Program Files (x86)\Java\jdk1.8.0_73</JAVA8_HOME>  
            </properties>  
</profile>  

Of course this should be enabled, so the settings.xml file should also have the following configuration:

<activeProfiles>  
        <activeProfile>custom-compiler</activeProfile>  
</activeProfiles>  

Maven has a default repository. M2 repository and a default settings.xml configuration file. This default settings.xml file also adds a JAVA_HOME variable, and the compile is completed. If you are using the MVN package command in the CMD window, you are not using the settings.xml in idea. You are using the settings.xml in E: Tools\ maven \conf. You are using the Settings in E: Tools\ maven \conf. Because there is no default configuration to compile using the 1.8 version of the JDK, the JAVA_HOME could not be found before, resulting in a compilation failure.

About maven Pom.xml Personal solutions to reporting errors!!!

A personal solution for Maven’s pom.xml error!!
When importing someone else’s project or creating a project using Maven from the command line, you may encounter errors in the pom.xml file (as shown below).

The reason is the lack of a corresponding JAR package. (It may be that the corresponding JAR package failed to download locally when we updated it) we need to update and download the corresponding JAR package by ourselves; Here are the steps:
C:\Users\ Tian bin\.m2\ Repository: C:\Users\ Tian bin\.m2\ Repository
2. Go to the maven-resources-plugin folder with the correct version number (2.12.4 for me) and click on it. C:\Users\ Tian bin\.m2\ Repository \org\ Apache \ Maven \ Plugins \ Maven-Resources-Plugin

 
3, Delete all files ending with lastUpdated.
4. Open Eclipse, right click on our project Maven> Update project…

 
5. Click OK!

 
Note: if there are other similar this kind of mistake in the pom, in the same way, according to the error message, you know which jar package, lack is to own Maven download updates to the local path to find the jar location (jar is consistent with the name and the name of the folder), delete all ends in lastUpdated files in the folder, finally open eclipse, right-click on our engineering Maven> Update project… , click OK. That’s it!!
 
 
 
 
 
 
 
 
 
 
 
 
 
 

about rs.last () error reporting

When writing to the statements rs.last() and rs.beforeFirst() that are used when querying data from a database, these methods return an error because Microsoft SQL does not have this method and requires additional statements to be added.

String SQL =”select * from stu_info”;// query key code
PreparedStatement PSTMT = dbConn. PrepareStatement (SQL,
the ResultSet. TYPE_SCROLL_INSENSITIVE, ResultSet. CONCUR_READ_ONLY); .
ResultSet rs = PSTMT executeQuery ();
 
Add the key code for the scarlet letter, and rs.last() will work.
However, the ResultSet.CONCUR_UPDATETABLE in the reference article will return an error. I don’t know why…
Refer to the article links: https://blog.csdn.net/pzasdq/article/details/52602730
 

IntelliJ idea error: package not found or symbol not found

The article directories
IntelliJ IDEA error: package not found or symbol 1 not found. Use maven-reimport2.Invalidate and Restart3. 4. Recompile. 5. Use maven-install

IntelliJ IDEA Error: Could not find package or symbol

Appeared recently in the use of the IDEA of time, suddenly can’t find the package or can’t find the symbol of the situation, for the existence of their reference in determining the circumstances, can try the following several ways to solve, the following is a touch also solve during the development process of several ways, also Shared with everyone under the record, I hope it can help you.

1. The use of Maven – Reimport

2.Invalidate and Restart


3. Uniform coding

4. Recompile

Points to open the Project Structure program compiled output directory

will target directory file to empty

right click the Project to build

5. Use Maven – Install

maven-install / code> maven-install maven-install maven-install maven-install maven-install > maven-install / code> maven-install >

code> m>nstall
>install
MVN install If you are not familiar with this, you can go to Baidu by yourself.

Idea startup project Lombok error, no symbol found

The error message is as follows:

About the solution to this problem on-line machine-made, basic is lombok plug-in installation restart idea, or check the Enable the annotation processing, if these are not solve, might as well have a look at your project using the SDK version is too high lead to do not compatible with lombok, such as my idea version is 2019.3.3, default jdk11, and I install ombok plug-in version is 029-2019.3, the experiment proved that the version are not compatible. Solution:
Click “File” in the upper left corner and select Project Structure, as shown in the picture
: select the Module SDK from 1.8 or any other Lombok version that is compatible with your installation.

Idea error: error: Java: error: release 5 is not supported

When I test the class run, the following error occurs:

Possible cause: Java version inconsistencies The project builds the configuration using the wrong version of Java
Solution:
Step 1: File –Project Structure– Project (2 versions are changed to the same: the numbers in the second and third bars are 11)

File — –Project Structure– Modules (second bar changed from 9 to 11 as in Project)

Step 2: File– Setting– build, execution, deployment– Java Compiler (right-most, Target bytecode version 5)

 
 

Configuration error in mybatis configuration file

Development in mybatis mybatis project – config. After adding elements in the XML, found in the XML configuration label error: before and after the content for an error & lt; properties& gt; settings& gt; typeAliases& gt; typeHandlers& gt; objectFactory& gt; objectWrapperFactory& . >
Then find the answer in a development tool:
& lt; configuration> The child elements of the must follow: <<; properties> & lt; settings> & lt; typeAliases> & lt; typeHandlers> & lt; objectFactory> & lt; plugins>                                                                                                                                  & lt; enviroments>      & lt; databaseIdProvider>                                                               & lt; mappers>   In that order. Otherwise, MyBatis will report an error when parsing XML.