Category Archives: How to Fix

Error building SqlSession. ### Cause: org.apache.ibatis.builder.BuilderException: Error creating d

Debug:
I reported this error when I was a beginner of mybatis

Error building SqlSession.

Cause: org.apache.ibatis.builder.BuilderException: Error creating do

Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 6; Processing instruction targets matching ‘[XX] [mm] [ll]’ are not allowed.

Finally, it is found that one line is left blank at the beginning of the SQL mapping file, but it is required that one line cannot be left blank. Just remove the blank line

Error in configuring Hadoop 3.1.3: attempting to operate on yarn nodemanager as root error

This may occur when HDFS and yarn services are turned on, and when HDFS and yarn services are turned off using scripts, the

solution may also occur

Add the following parameters to the top of start-dfs.sh and stop-dfs.sh (in SBIN of Hadoop installation directory)

HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root

Add the following parameters to the top of start-yarn.sh and stop-yarn.sh (in SBIN of Hadoop installation directory)

YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root

Successfully solved the problem

java.sql.SQLRecoverableException: IO Error: Connection reset

I wrote an executable jar package to execute on Linux, connected to Oracle 11g database and obtained database data. It was always the card owner. When it timed out, it ran out with an error message. The server could be restarted several times, and it was stuck later.

Execute jar package statement

/root/jdk1.8.0_ 181/bin/java -jar GetJdbc-1.0-SNAPSHOT.jar

java.sql.SQLRecoverableException: IO Error: Connection reset
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:421)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at com.iwhalecloud.jdbc.utils.GetDataSource.getConnection(GetDataSource.java:27)
        at com.iwhalecloud.jdbc.execute.DistinguishDataSource.oracleQuery(DistinguishDataSource.java:78)
        at com.iwhalecloud.jdbc.execute.DistinguishDataSource.dataHandle(DistinguishDataSource.java:34)
        at com.iwhalecloud.jdbc.main.MainProgram.main(MainProgram.java:26)
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
        at oracle.net.ns.DataPacket.send(DataPacket.java:199)
        at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:211)
        at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:227)
        at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
        at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
        at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
        at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:122)
        at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:78)
        at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1179)
        at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
        at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
        at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:359)
        ... 10 more
close
Exception in thread "main" java.lang.NullPointerException
        at com.iwhalecloud.jdbc.execute.DistinguishDataSource.oracleQuery(DistinguishDataSource.java:80)
        at com.iwhalecloud.jdbc.execute.DistinguishDataSource.dataHandle(DistinguishDataSource.java:34)
        at com.iwhalecloud.jdbc.main.MainProgram.main(MainProgram.java:26)

Find an effective solution on the Internet and add a parameter – DJava. Security. EGD = file:/dev /../dev/urandom

The execution statement is as follows

/root/jdk1.8.0_ 181/bin/java -jar -Djava.security.egd=file:/dev/../dev/urandom GetJdbc-1.0-SNAPSHOT.jar

ERROR c.z.hikari.pool.HikariPool:594 restartedMain HikariPool-1 -Exception

  [problem description]: when starting the springboot project, the following stack error is reported

32.014 ERROR c.z.hikari.pool.HikariPool    :594  restartedMain                    HikariPool-1 - Exception during pool initialization.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:833)
        at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:453)
        at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
        at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
        at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
        at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
        at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:158)
        at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:116)
        at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:330)
        at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:184)
        at org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer.isEmbeddedDatabase(DataSourceScriptDatabaseInitializer.java:64)
        at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.isEnabled(AbstractScriptDatabaseInitializer.java:87)
        at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.initializeDatabase(AbstractScriptDatabaseInitializer.java:74)
        at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.afterPropertiesSet(AbstractScriptDatabaseInitializer.java:65)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:338)
        at com.abc.wiki.WikiApplication.main(WikiApplication.java:19)
        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.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
        at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89)
        at com.mysql.cj.NativeSession.connect(NativeSession.java:144)
        at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:953)
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:823)
        ... 42 common frames omitted
Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)
        ... 45 common frames omitted

[cause of problem]: when debugging the project locally today, the WiFi connected to the computer changed, resulting in the change of IP, which finally led to this problem.

[solution]: modify the configuration of the project connection database to a new IP address.

Error: Java: error: release version 5 not supported solution to run error

Error reporting reason

Java compiler setting error in project structure or setting

resolvent

1. Project structure
Click f I l e → P R O j e c t s t r u c t u r e file \ rightarrow project structurefile → projectstructure

Ensure that the SDK versions under project are the same

2、Preferences

    Click setting in preferences (or win version) to search java compiler and ensure that the target byte code
    version is the same as the selected version

Workbench Could not connect the SSH Tunnel Authentication error

1. Problem phenomenon

The workbench that is normally used on weekdays finds that it cannot connect to the corresponding database after restarting the computer, and the workbench log displays

SSH tunnel]: Authentication error opening SSH tunnel: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details

Check the complete log and find the following:

$ tail -f ~/.mysql/workbench/log/wb.log 
  File "/usr/share/mysql-workbench/sshtunnel.py", line 303, in _connect_ssh
    look_for_keys=has_key, allow_agent=has_key, timeout=SSH_CONNECTION_TIMEOUT)
  File "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 325, in connect
    t.start_client()
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 492, in start_client
    raise e
NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead

14:17:14 [INF][     SSH tunnel]: TunnelManager.wait_connection authentication error: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details
14:17:14 [ERR][     SSH tunnel]: Authentication error opening SSH tunnel: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details
14:18:24 [INF][      WBContext]: Connection to XinJangCityWolMart cancelled by user: Tunnel connection cancelled

The point is

NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead

Found after querying with PIP list

$ pip2 list | grep crypto
asn1crypto (1.4.0)
cryptography (2.7)
pycrypto (2.6.1)
pycryptodome (3.11.0)

There is a pycryptodome , which may be installed when installing other tools later

2. Solutions

Uninstall pycryptodome

sudo pip2 uninstall pycryptodome

Then reopen the workbench to connect to the database and return to normal.

raise HTTPError(req.full_url, code, msg, hdrs, fp)urllib.error.HTTPError: HTTP Error 404: Not Found

import requests
url=['www....','www.....',...]
for i in range(0,len(url)):
     linkhtml = requests.get(url[i])

The crawler reported the following error:


  File "C:\Users\lenovo7\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "C:\Users\lenovo7\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\lenovo7\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 531, in open
    response = meth(req, response)
  File "C:\Users\lenovo7\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 640, in http_response
    response = self.parent.error(
  File "C:\Users\lenovo7\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 569, in error
    return self._call_chain(*args)
  File "C:\Users\lenovo7\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
  File "C:\Users\lenovo7\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Refer to an article on stack overflow

Python: urllib.error.HTTPError: HTTP Error 404: Not Found – Stack Overflow

In the crawler scenario, the original link may not open. Naturally, it will prompt HTTP Error 404. What you need to do is skip this link and then crawl to the following page

Correction code

import requests
url=['www....','www.....',...]
for i in range(0,len(url)):
    try:
        linkhtml = requests.get(url[i])
    except:
        pass

[Solved] Sqoop Mysqltohive error: Error: java.lang.RuntimeException: java.lang.RuntimeException…

Problem Description
Execute statementbin/sqoop import --connect jdbc:mysql://localhost:3306/gdcmxy --username root --password root --table 2019bigdata --fields-terminated-by '\t' --delete-target-dir --num-mappers 1 --hive-import --hive-database gdcmxy --hive-table 2019bigdata

Error: java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

After seeing the error report, it was preliminarily judged that the main problem was the database connection problem. At first, I thought the firewall was not turned off, but considering that hadoo had certainly turned off the firewall before, it should have nothing to do with the firewall.

Cluster environment:

Solution:

Change the localhost of the execution statement to the IP address of the local machine bin/sqoop import -- connect JDBC: mysql://192.168.112.81:3306/gdcmxy --Username root -- password root -- table 2019bigdata -- fields terminated by '\ t' -- delete target dir -- num mappers 1 -- hive import -- hive database gdcmxy -- hive table 2019bigdata

successfully imported

Eureka server startup error: cannot execute request on any known server

Article catalog

Error reporting screenshot reference: self inspection modification

Error reporting screenshot reference:

Self inspection

As soon as a new Eureka project was established, an error was reported. After checking the startup class and YML configuration file, it was found that the format of YML configuration file was wrong. The error is as follows:

Modification

There is an obvious indentation error in the screenshot, which makes Eureka unable to start normally. After modifying the indentation, it is as follows:

Screenshot of successful startup of Eureka server:

If the configuration file in YML format is prone to errors, we recommend that you use the configuration file in properties format; As follows:

Ie11 reports an error unhandled promise rejection typeerror: the object does not support

The problem of ie11 is the biggest problem. At this time, you should check the most likely place of the problem step by step
I make this error because I use the following code when making type judgment:
toString. Call (svalue)==‘ [object date] ‘
such a writing method is not recognized in ie, and an unhandled promise rejection typeerror will be reported: the object does not support it, so it is necessary to change the writing method

Object.prototype.toString.call(sValue) !== ‘ [object date] ‘
this way of writing is recognized by ie

Solution of epol warehouse error reporting during openeuler-21.09 DNF update

Problem phenomenon

$ sudo dnf update
EPOL
Errors during downloading metadata for repository 'EPOL':
    -Status code: 404 for htpp://repo.openeuler.org/openEuler-21.09/EPOL/repomd.xml (IP: 159.138.**.***)
Error: Failed to download metadata for repo 'EPOL': Cannot download repodata/repomd.xml: All mirrors were tried

solve

Method 1.
the official has pushed the update. The updated file is located in
/etc/yum.repos.d/openeuler.repo.rpmnew ,
it needs to be manually compared and updated to the original
/etc/yum.repos.d/openeuler.repo
for the differences between the two files, see baseurl Path Method 2 in method 2 below.
directly manually modify the baseurl address of epol
baseurl= http://repo.openeuler.org/openEuler-21.09/EPOL/ $basearch/
is modified to
baseurl= http://repo.openeuler.org/openEuler-21.09/EPOL/main/ $basearch/