Author Archives: Robins

[Solved] PBI Open Error: WebView2 Process failed: explorationBrowser, Source:https://ms-pbi.pbi.microsoft.com/pbi/Web/Views/reportView.hrm

Problem description: An error was reported when opening power bi desktop.
WebView2 Process failed: explorationBrowser, Source:https://ms-pbi.pbi.microsoft.com/pbi/Web/Views/reportView.hrm
This is related to the browser Edge. Open Edge and find an error: An incompatible piece of software attempted to load along with Microsoft Edge. This can be caused by malware, though it’s usually caused by a program that is out-of-date. We recommend making sure you have the latest version of that program installed, and that your antimalware software is running and up-to-date.
Solving the issue of Edge is OK.

Ref: WebView2 uses Microsoft Edge as a rendering engine to display web-based features in a desktop application.

Tomcat Deployed Applications Start Error: java.lang.ClassCastException: [XXX].filter.CharacterEncoding cannot be cast to jakarta.servlet.Filter

When xiaomengxin was learning to deploy applications on the Java Web, he found that the console could not normally connect to the MySQL database, but it was always normal when using the idea test. Looking at the Tomcat startup log, he found that there was an error message. Through comparison, he found that tomcat9 was configured in the idea and tomcat10 was installed on the server, Baidu knows that the servlet package of tomcat10 and later has changed and needs to be imported into Jakarta servlet.* Replace javax.XML with a new package servlet.* Or directly replace it with tomcat9 version to avoid this error.

Error screenshot:

[Solved] Solr Error: org.apache.solr.common.SolrException: undefined field text

Modify solrconfig XML file

vim /solr/configsets/Your_collection_name/conf/solrconfig.xml

Find this paragraph:

<listener event="firstSearcher" class="solr.QuerySenderListener">
  <arr name="queries">
    <lst>
      <str name="q">static firstSearcher warming in solrconfig.xml</str>
    </lst>
  </arr>
</listener>

Modify <str name=”q”></str> The value of is *: *, which is modified as follows:

<listener event="firstSearcher" class="solr.QuerySenderListener">
  <arr name="queries">
    <lst>
      <str name="q">*:*</str>
    </lst>
  </arr>
</listener>

If zookeeper is used, you need to upload the configuration to zookeeper again:

/solr/server/scripts/cloud-scripts/zkcli.sh -cmd upconfig -zkhost Address 1:2181, Address 2:2181, Address 3:2181 -confdir /solr/configsets/your collection name/conf -confname your configuration name

Re create a new collection

[Solved] javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

background

Java version 1.8 0. Today, I tried to access an HTTPS interface with Java, but threw the following exception:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

reason

Starting from java8 update31, SSL V3 protocol is disabled by default due to security vulnerabilities in SSL protocol.

Solution:

Find the JDK 1.8 installation directory. For example, my java folder is called jdk1.8.0_301, find the Java Security file

Delete the three algorithms in the figure in the file

Delete as shown in the figure

Finally, restart the project.

[Solved] python Install pip Error: zipimport.ZipImportError: can’t decompress data; zlib not available

Phenomenon:

Solution:

1. Install dependent packages

yum -y install zlib*

2. Recompile Python

#The catalog is based on the production environment itself
[root@wangzy software]# cd Python/
[root@wangzy Python]# ./configure --prefix=/usr/local/python3

#Compile and install
[root@wangzy Python]# make && make install

# re-install
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

[Solved] Tensorflow Error: ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray)

Problem description

When an array is sent to tensorflow training, the following errors are reported:

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray)

The array element is an array, and the shape of each array element is inconsistent. An example is as follows:

cropImg[0].shape = (13, 13, 3)
cropImg[1].shape = (14, 13, 3)
cropImg[2].shape = (12, 13, 3)

environment

python 3.7. 9

tensorflow 2.6. 0

keras 2.6. 0

Solution:

There are many similar error reports on stackoverflow, which roughly means that the data type is wrong. The converted data type is not the data type in brackets, such as:

Unsupported object type numpy.Ndarray means that the cropimg array element is not numpy Ndarray type

Bloggers were puzzled and tried many methods. They all showed that the data type of the cropimg array element was numpy Ndarray, but the error always exists

Later, I suddenly realized that when generating the cropimg array, there was a warning:

VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  cropImg_ar = np.array(img_list)

The cropimg array element is an array with inconsistent shapes, which indicates that the cropimg array element type is actually object. Is it caused by tensorflow not accepting object type data

After converting the cropimg array elements to shape consistency, the problem is solved

 

[Solved] SpringBoot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-res

Problem description

Springboot application packaging error: failed to execute goal org apache. maven. plugins:maven-resources-plugin:3.2. 0:resources (default-res

Cause analysis

Maven resources plugin dependency is missing in plugins tag.

<plugins>
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <excludes>
            <exclude>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
            </exclude>
        </excludes>
    </configuration>
</plugin>
</plugins>

Add configuration item

        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>

Now the problem is solved.

[Solved] Uncaught TypeError: Cannot create property ‘LAY_TABLE_INDEX’ on number ‘1’

table.js:2 Uncaught TypeError: Cannot create property ‘LAY_TABLE_INDEX’ on number ‘1’

Using the data table of the layui framework, render errors

Reason: when layui renders table data, the data value returned by the interface request should be in the form of * data: [{}, {}, {}], while my data form is in the form of data: {data: [{}, {}], statuscode: 1,…} *, so an error will be reported

Solution: parse the data in the parsedata function

table.render({
  elem: '  '
  ,url: '  ',
   parseData: function(res){
                console.log('Return Values',res)
                return {
                    "statusCode": res.statusCode, //Analyze interface status
                    "data": res.data.data //Parse the data list
                };
            },`

[Solved] undefined reference to `cv::imread(std::string const&, int)’

problem

Error message: undefined reference to ` CV:: imread (STD:: String const & amp;, int) ‘

When the above error occurs, I thought there was a problem with the opencv link, so I have been trying to solve the problem of importing opencv and trying to link the library in various ways, but the error will always appear in the end

Finally, it was found that the problem was C + + abi

Solution

In the code #define_GLIBCXX_USE_CXX11_ABI 0 causes this error. If it is removed, it can run normally

reason

#define _GLIBCXX_USE_CXX11_ABI 0 is an old version of ABI used when compiling links

In libstdc + + (c + + standard library under GCC) released in GCC version 5.1, a new implementation of STD:: basic_string is added. The new implementation coexists with the old implementation, but has different names. The new implementation is called STD:: _cxx11:: basic_string, and the old one is called STD:: basic_string.

The newer version of GCC will compile STD:: string as STD:: string in C + + 11:__cxx11::basic_string< char> At this time, if the third-party library you call does not enable the C + + 11 feature during compilation, the STD:: string in it is actually STD:: basic_string< char>, The two cannot be converted to each other# define _GLIBCXX_USE_CXX11_ABI 0 is to make STD:: string in your code compile according to the old implementation

But my opencv should have been compiled with STD:: basic_ String, so it doesn’t need to be set. If it is set, the error shown in the title will appear instead

However, if the third-party library uses an old implementation and its compiler is a new version, you need to add #define_GLIBCXX_USE_CXX11_ ABI 0, otherwise undefined reference to ` CV:: imread (STD:: _cxx11:: basic_string <char, STD:: char_traits, STD:: allocator > const & int) ‘will appear