Author Archives: Robins

Error when opening jeesite project in eclipse

Cause analysis: there is an error in the jar package. You need to re import the jar package
first click the jeesite project, and then open properties → Java build path → libraries

Then remove all jar packages that report errors, click apply and close, select all jar packages in the Lib directory, and right-click build path to re import jar packages

errors are still reported for individual files after re introduction, as follows

The reason is that some packages are not included after Java se 9.0. If they are used, they need to be imported manually
a link is given below. You can go to this website to download the required packages by yourself
http://www.java2s.com/Code/Jar/CatalogJar.htm

GeTx reports an error in the get request using getconnect

The specific error reports are as follows:

flutter/lib/ui/ui_ dart_ state.cc(209)] Unhandled Exception: type ‘int’ is not a subtype of type ‘Iterable< dynamic>’

The reason is that I use the get request and the parameters are not spliced after the URL, that is, in this form, XXX?X = 1 & amp; y=2。

But use   Map< String, dynamic>? Query a map to place parameters.

Check the source code to find the reason. If the value in query is not of string type, it will be converted to an iterator, and I put it as an int, so the conversion reports an error. The solution is to convert all the values in the query map into strings.

query?.map((key, value) => MapEntry(key, value.toString()))

Spock + powermock simulation static method reports an error java.lang.classcastexception

Question:

When using Spock + powermock to simulate static methods, the following errors are encountered:

javax.xml.parsers.FactoryConfigurationError: Provider com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl could not be instantiated: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

	at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:204)
	at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:152)
	at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:277)
	at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:120)
	at org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:183)
	at org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:89)
	at org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:517)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:492)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:405)
	at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:687)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
	at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:138)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:45)
	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
	at org.slf4j.LoggerFactory$getLogger.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
	at com.athaydes.spockframework.report.SpockReportExtension.<clinit>(SpockReportExtension.groovy)
	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 java.lang.Class.newInstance(Class.java:442)
	at org.spockframework.runtime.GlobalExtensionRegistry.instantiateGlobalExtension(GlobalExtensionRegistry.java:88)
	at org.spockframework.runtime.GlobalExtensionRegistry.initializeGlobalExtensions(GlobalExtensionRegistry.java:58)
	at org.spockframework.runtime.RunContext.start(RunContext.java:56)
	at org.spockframework.runtime.RunContext.get(RunContext.java:166)
	at org.spockframework.runtime.Sputnik.runExtensionsIfNecessary(Sputnik.java:90)
	at org.spockframework.runtime.Sputnik.getDescription(Sputnik.java:54)
	at org.powermock.modules.junit4.internal.impl.DelegatingPowerMockRunner.getDescription(DelegatingPowerMockRunner.java:164)
	at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.getDescription(JUnit4TestSuiteChunkerImpl.java:194)
	at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.getDescription(AbstractCommonPowerMockRunner.java:51)
	at org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
	at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:57)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
	at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:66)
	at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
	at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:44)
	at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:63)
	at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:168)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
	
Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
	at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:190)
	... 72 more

resolvent

Add this comment to the error reporting unit test class:

@PowerMockIgnore(["org.w3c.dom.*", "javax.xml.*", "org.xml.*"])

Dubbo SPI custom equalization policy error

 

Problem Description: I use idea to create   Meta-inf/Dubbo folder. However, due to idea’s own reasons, two layers of folders cannot be created continuously.

META-INF.dubbo     It was actually created by a   Meta-inf.dubbo folder.

Cause error:

No such extension org.apache.dubbo.rpc.cluster.loadbalance by name XX, no related exception was found, please check whatever related SPI module is missing.

solution:

Create folders layer by layer. Ensure that there are meta-inf and Dubbo folders under the resource, then there is no problem

VCSA web access error 503 Service Unavailable

Problem Description:

VCSA running well suddenly cannot be accessed, and the web page reports an error:
503 service unavailable (failed to connect to endpoint: [[n7vmacore4http16localservicespec: 0x00005649e04415e0] _servernamespace =/_isredirect = false _pipename =/var/run/VMware/vpxd webserver pipe)


Cause analysis:

https://kb-uat.vmware.com/s/article/67818?lang=zh_cn

The reasons I often encounter are:

    vCenter server appliance (VCSA) high virtual disk space (76563) check the expiration date of the certificate on vCenter server (79248/82332) vSphere vxpd service of VCSA is abnormal and does not operate normally;


    Solution:

    1、 VCenter server appliance (VCSA) high virtual disk space (76563)

    https://kb-uat.vmware.com/s/article/76563?lang=zh_cn

      log in to the vCenter server appliance as root through SSH or through the vCenter virtual machine console to find out which partitions are full;

      df -h
      

      Run the following command to find partitions that are 85% full or higher:

      df -h |awk '0+$5 >= 85 {print}'
      

      Find large log files and delete them if they are useless. Note: *. Tgz files are archived log package files and can be removed.

      find /storage/log -type f -size +100M
      

    2、 Check the expiration date of the certificate on the vCenter server (79248/82332)

    https://kb.vmware.com/s/article/79248?lang=zh_ cn
    https://kb-uat.vmware.com/s/article/82332

    The expiration of this certificate is often encountered on vcsa6.0, because the STS certificate of vcsa6.0 generally expires in 2 years. It is very difficult to hang up as soon as it expires. Encountered two or three times. According to the official KB, I failed to handle it successfully once. I don’t understand why ~. Finally, the toss is to redeploy the VCSA, which is faster and easier (provided that there are fewer managed hosts on your VCSA, and it’s not troublesome to add it again)
    however, this problem has not been encountered in vcsa6.5 and above. If you encounter it, please refer to the official KB.

    3、 VSphere vxpd service of VCSA is abnormal and is not running normally

    In the past, I deployed VCSA myself as “vCenter server with an embedded platform services controller”, and then encountered 503 errors. VCSA also looked at the space utilization and vSphere client services, but vSphere vxpd services couldn’t work. After a closer look, I found that the VCSA architecture was “vCenter server with an external platform services controller”, There is also a separate platform services controller virtual machine. It is suspected that there is a problem with the PSC, but the root password is not known, so it can only be forcibly restarted. Due to abnormal shutdown, the startup enters the emergency rescue mode,
    prompt failed to start system check on/dev/disk/by partuuid/* * *
    backhand is one

    fsck /dev/disk/by-partuuid/***
    

    Restart it again, start it normally, return to VCSA and restart all services

    service-control --stop --all
    service-control --start --all
    

    So far, VCSA has finally been accessed normally.

How to Solve Nacos startup error

Error 1:

Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerExcepti

Solution:
Open the startup file, and different operating systems open different files. Open startup.cmd on windows, open startup.sh for others, find set MODE, and change it to standalone mode.

Error 2:

Error creating bean with name ‘memoryMonitor’ defined in URL [jar: File:/D:/Nacos/nacos203/target/Nacos server. Jar!/boot-inf/lib/nacos-config-2.0.3. Jar
Solution:

Database connection If there is a problem, the correction method is as follows:
open the application.properties file in the nacos/conf/ folder , find the database connection address, pay attention to whether there is &serverTimezone=UTC after it, and add it if not.
db.url.0=jdbc:mysql: …/lamp_nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true &serverTimezone=UTC

Error reporting processing of pyinstaller packaging geopandas environment

Article catalog

1. Iteration error of geopandas occurs when executing exe. 2. Fiona cannot be found when executing exe_ Shim3. Cannot find fiona.shema4. Summary by executing exe

First, use pyinstaller – F main.py to package the code into an EXE with a black window. The following are some problems and solutions

1. The iteration error of geopandas occurs when executing exe

The error information is as follows:

(gis_data_process) D:\code\gis_data_processing>main.exe
Traceback (most recent call last):
  File "main.py", line 10, in <module>
    from gis_data_process import *
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
  File "gis_data_process.py", line 7, in <module>
    import geopandas
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
  File "geopandas\__init__.py", line 17, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
  File "geopandas\datasets\__init__.py", line 6, in <module>
StopIteration
[24328] Failed to execute script 'main' due to unhandled exception!

The solution is as follows:

    comment geopandas\__ init__. Py line 17 code “import geopandas. Datasets # noqa” delete the build, dist and spec files generated by packaging and reuse pyinstaller – f main. Py packaging

    2. Execute exe and cannot find Fiona_ shim

    The error information is as follows:

    (gis_data_process) D:\code\gis_data_processing>main.exe
    Unhandled exception in thread started by <bound method GISDataProcess.generate_file_execute of <__main__.GISDataProcess object at 0x0000021A0C5D8DC8>>
    Traceback (most recent call last):
      File "main.py", line 156, in generate_file_execute
        generate_shapefile(file_path, shape_path)
      File "gis_data_process.py", line 172, in generate_shapefile
        kml_to_shapefile(kml_path, shape_path)
      File "gis_data_process.py", line 417, in kml_to_shapefile
        geojson_to_shapefile(geojson_path, shape_path)
      File "gis_data_process.py", line 220, in geojson_to_shapefile
        geometry = geopandas.read_file(geojson_path)
      File "geopandas\io\file.py", line 166, in _read_file
      File "geopandas\io\file.py", line 81, in _check_fiona
    ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
    Importing fiona resulted in: No module named 'fiona._shim'
    

    The solution is as follows:

      find the. Spec file generated by packaging, find hiddenimports, add “Fiona. _shim”, delete the build and dist directories generated by packaging, and use pyinstaller main.spec to package and generate exe

      3. Fiona.shema cannot be found by executing exe

      The error information is as follows:

      (gis_data_process) D:\code\gis_data_processing>main.exe
      Unhandled exception in thread started by <bound method GISDataProcess.generate_file_execute of <__main__.GISDataProcess object at 0x00000220B655B5E8>>
      Traceback (most recent call last):
        File "main.py", line 156, in generate_file_execute
          generate_shapefile(file_path, shape_path)
        File "gis_data_process.py", line 172, in generate_shapefile
          kml_to_shapefile(kml_path, shape_path)
        File "gis_data_process.py", line 417, in kml_to_shapefile
          geojson_to_shapefile(geojson_path, shape_path)
        File "gis_data_process.py", line 220, in geojson_to_shapefile
          geometry = geopandas.read_file(geojson_path)
        File "geopandas\io\file.py", line 166, in _read_file
        File "geopandas\io\file.py", line 81, in _check_fiona
      ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
      Importing fiona resulted in: No module named 'fiona.schema'
      

      The solution is as follows:

        find the. Spec file generated by packaging, find hiddenimports, add “Fiona. Schema”, delete the build and dist directories generated by packaging, and use pyinstaller main.spec to package and generate exe

        4. Summary

        After the above three steps are completed, you can successfully package into exe, but opening exe has a black window. You can change console = true to console = false in the spec file, and then use pyinstaller main.spec to package and generate exe, so that there is no black window

XLRDError: Excel xlsx file; Not supported error reporting solutions

The reason is that pip is installed with the latest version 2.0.1 and only supports. XLS files. So pandas.read_ Excel (‘xxx. Xlsx ‘) will report an error.

You can install the old version xlrd and execute the command in CMD:

pip uninstall xlrd
pip install xlrd==1.2.0

Solved the error report!

Homebrew reports an error after upgrading MacOS to Big Sur

Question

Homebrew reports an error after upgrading MacOS to Big Sur, as follows:

$ brew
Traceback (most recent call last):
	23: from /usr/local/Library/Homebrew/brew.rb:6:in `<main>'
	22: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	21: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	20: from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
	19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	17: from /usr/local/Library/Homebrew/extend/pathname.rb:4:in `<top (required)>'
	16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	14: from /usr/local/Library/Homebrew/utils.rb:2:in `<top (required)>'
	13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	11: from /usr/local/Library/Homebrew/emoji.rb:24:in `<top (required)>'
	10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 8: from /usr/local/Library/Homebrew/extend/os/emoji.rb:1:in `<top (required)>'
	 7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 5: from /usr/local/Library/Homebrew/os.rb:1:in `<top (required)>'
	 4: from /usr/local/Library/Homebrew/os.rb:18:in `<module:OS>'
	 3: from /usr/local/Library/Homebrew/os/mac.rb:21:in `version'
	 2: from /usr/local/Library/Homebrew/os/mac.rb:21:in `new'
	 1: from /usr/local/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Library/Homebrew/version.rb:198:in `initialize': Version value must be a string; got a NilClass () (TypeError)

terms of settlement

Modify the/usr/local/library/homebrew/version.rb file and change @ version in the initialize function to a specific value, such as:

  def initialize(val)
    if val.respond_to?(:to_str)
      @version = val.to_str
    else
      raise TypeError, "Version value must be a string; got a #{val.class} (#{val})"
    end
  end

Change to

  def initialize(val)
    if val.respond_to?(:to_str)
      @version = '10.15.7'
    else
      raise TypeError, "Version value must be a string; got a #{val.class} (#{val})"
    end
  end

How to Solve Git submodule update error

Question:

When using git submodule update, an error is reported:

        fatal: Needed a single revision

        Unable to find current revision in submodule path 'test'

reason:

Git is incorrectly configured, or the code was downloaded from the sub module directory, but the association failed.

Solution:

        rm -rf test/

Then go back to the root directory of the main module and use the command again:

        git submodule update --init

[Solved] sys.stderr.write(f“ERROR: {exc}“) ^ SyntaxError: invalid syntax

Reference link: (19 messages) two reasons and solutions for syntaxerror: invalid syntax in PIP instruction,

The relevant solutions in the original text are as follows:

However, the get-pip.py file was not found in the process of trying to solve it. Access the index of /.

https://bootstrap.pypa.io/ Observe that the relevant version of get-pip.py file is found in PIP

To sum up, the command to get-pip.py should be

wget https://bootstrap.pypa.io/pip/3.5/get-pip.py

After downloading, execute the following command
python3 get-pip.py