Category Archives: Error

[Solved] Android Studio Compile Error: More than one file was found with OS independent path ‘lib/armeabi-v7a/libRSSupport.so’

It mainly refers to the problems that will occur when the functions related to ground glass are added and the project is dependent on multiple molds. The solution is also relatively simple. Here is a record

packagingOptions {  

pickFirst 'lib/armeabi-v7a/libRSSupport.so'  

pickFirst 'lib/x86_64/libRSSupport.so'  

pickFirst 'lib/x86/libRSSupport.so'  

pickFirst 'lib/arm64-v8a/libRSSupport.so'

 

pickFirst 'lib/x86_64/librsjni_androidx.so'  

pickFirst 'lib/x86/librsjni_androidx.so'  

pickFirst 'lib/arm64-v8a/librsjni_androidx.so'  

pickFirst 'lib/armeabi-v7a/librsjni_androidx.so'

 

pickFirst 'lib/x86/librsjni.so'  

pickFirst 'lib/arm64-v8a/librsjni.so'  

pickFirst 'lib/x86_64/librsjni.so'  

pickFirst 'lib/armeabi-v7a/librsjni.so'  

}

It’s good to filter the related LIBS, mainly these three. If there are other architecture adaptations, it’s good to add paths to the corresponding ones.

[Solved] HttpClient HttpRequestHeaders.From Error: The specified value is not a valid ‘From’ header string.

Preface

Reason for error: From needs to be the format of the email address.

Protocol header illustrate Example state
From Email address of the user who initiated this request From: [email protected] fixed

 

Code

            HttpRequestMessage httpRequestMessage = new HttpRequestMessage();
            httpRequestMessage.Headers.Add("from", "mywork");
            httpRequestMessage.Headers.Add("timestamp", timestamp);
            httpRequestMessage.Headers.Add("signature", signature);
            httpRequestMessage.Headers.Add("client-name", client_name);
            httpRequestMessage.Method = HttpMethod.Get;
            httpRequestMessage.RequestUri = new Uri(Domain + requestUrl);

            HttpResponseMessage response = await _client.SendAsync(httpRequestMessage);

            string r = string.Empty;

            if (response.IsSuccessStatusCode)
                r = await response.Content.ReadAsStringAsync();

            return r;

Error Messages:

The format of value 'mywork' is invalid.

   at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index)
   at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(HeaderDescriptor descriptor, HeaderStoreItemInfo info, String value)
   at System.Net.Http.Headers.HttpHeaders.Add(String name, String value)

 

Solution:

No suitable processing method has been found at present, temporarily use HttpWebRequest request

        public static string HttpGet(string url, string Accept, string ContentType, Dictionary<string, string> headers)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = "GET";

            if (Accept.NotEmpty())
                request.Accept = Accept;

            if (ContentType.NotEmpty())
                request.ContentType = ContentType;

            if (headers != null)
                foreach (KeyValuePair<string, string> item in headers)
                {
                    request.Headers.Add(item.Key, item.Value);
                }

            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
            {
                return reader.ReadToEnd();
            }
        }

System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.

System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.

The path passed to the function is load file C: \ workspace \ GitHub \ chuck Lu \ chuck fork \ fatantelope \ fatantelope. Commandline \ bin \ debug \.. \.. \.. \ consoleapp1 \ sample \ source.xml failed

It should be handled with getfullpath

 

<?xml version=”1.0″ encoding=”utf-8″?& gt; The code at the beginning of the file does not match the code saved in the file itself, so an error is reported

 

 

 

 

[Solved] QT operate error: exited with code – 1073741515

The build environment qt5.9.5 + msvc2015 32bit is compiled successfully, and the following errors are generated during operation:

Starting ****.exe...
exited with code -1073741515

Cause of problem:

Due to the use of C + + third-party libraries such as boost and ODB, or third-party QML libraries such as toou2d, which are linked by dynamic link, an error is reported due to the lack of third-party libraries at runtime.

Solution:

1. First find the Qt library that the program depends on, including the QML Library: open the command line tool of the currently used build kit, such as: (MSCV 2015 (32bit))

Enter the running executable file * * *. Exe directory,

input   “windeployqt –qmldir C:\Qt\Qt5.9.5\5.9.5\msvc2015\qml .\ ”   , among  C:\QT\qt5.9.5\5.9.5\msvc2015\QM is the location of QT installation environment QML.

In this way, QT will automatically import all the dependent dynamic libraries to the location of the program.

In addition, if a third-party QML library is used, QT may not be automatically imported into the third-party library and needs to be imported manually. If I use toou2, I need to manually put the directory toou2d containing toou2d.dll into the current directory.

2. Add the third-party libraries one by one. If you don’t know what libraries are missing, you can run the program directly first. The program will fail to start and display the missing library files, such as:

After all dependent dynamic libraries are imported, they can be started normally.

It is best to run in a non build environment, because our build environment will add many environment variables. When the program cannot find the dependent Library in the current directory, it will find it in the directory of environment variables. All programs that are often debugged or can run normally on the compiling machine can not run on another computer.

[Solved] SparkSQL Error: org.apache.hadoop.security.HadoopKerberosName.setRuleMechanism

Background

When I use idea to connect to the spark service locally, although I copy hive-site.xml and provide corresponding dependencies, I still report an error: org.apache.hadoop.security.hadoop Kerberos name.setrulemechanism

The dependencies are as follows:

  <dependencies>
      <dependency>
          <groupId>org.apache.spark</groupId>
          <artifactId>spark-core_2.12</artifactId>
          <version>3.1.2</version>
      </dependency>
      <dependency>
          <groupId>org.apache.spark</groupId>
          <artifactId>spark-sql_2.12</artifactId>
          <version>3.1.2</version>
      </dependency>

      <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
          <version>8.0.25</version>
      </dependency>

      <dependency>
          <groupId>org.apache.hive</groupId>
          <artifactId>hive-exec</artifactId>
          <version>3.1.2</version>
      </dependency>

      <dependency>
          <groupId>org.apache.spark</groupId>
          <artifactId>spark-hive_2.12</artifactId>
          <version>3.1.2</version>
      </dependency>

      <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-auth</artifactId>
          <version>3.2.0</version>
      </dependency>
  </dependencies>

Analysis

When accessing Hadoop remotely, you need to provide authentication information

 

Solution:

Add the following dependencies in Maven:

        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-auth</artifactId>
          <version>3.2.0</version>
      </dependency>

[Solved] Could not match supplied host pattern, ignoring: 192.168.0.101

[ root@ansible ansible]# ansible 192.168.0.101 -m ping
[WARNING]: Could not match supplied host pattern, ignoring: 192.168.0.101
[WARNING]: No hosts matched, nothing to do

Ansible is a software that operates the host in strict accordance with the host list. The above error is reported because you do not add 192.168.0.101 to the/etc/ansible/hosts file.

Correct operation:

Rocketmq console install Error: not close json text, token : int

Office address: https://github.com/apache/rocketmq-dashboard

git clone https://github.com/apache/rocketmq-dashboard.git
mvn spring-boot:run

Modify the configuration file to specify the namesrv address

rocketmq.config.namesrvAddr=127.0.0.1:9876

Executive App

Result: not close json text, token : int

Trace to the specific file: /tmp/rocketmq-console/data/dashboard2021-12-08.json Delete