Author Archives: Robins

FileReader Object Error: FileReader Error: Object is already busy reading blob

    var blob = this .file.slice( this .readed, this .readed + this .step);
             this .reader.readAsArrayBuffer(blob);

 

Solution:

When the reader reads, first judge the readyState value, and then execute the reading if it is not loading.

    if  (this.reader.readyState == 1)
                 return ;
             var blob = this .file.slice( this .readed, this .readed + this .step);
             this .reader.readAsArrayBuffer(blob);

 

 

readyState FileReader

value condition describe
0 EMPTY Reader has been created. No read methods have been called yet.
1 LOADING The read method has been called.
2 DONE The operation is complete.
EMPTY
Created, but the readAs method has not yet been called .FileReader
LOADING
The readAs method is called. An or is being read , but an error has not yet occurred.FileBlob
DONE
The read operation is complete. This could mean: the whole or was read into memory, a file read error occurred, or the read was canceled when called.FileBlobabort()
var reader = new FileReader(); 
console.log( 'EMPTY', reader.readyState); // readyState will be 0 

reader.readAsText(blob); 
console.log( 'LOADING', reader.readyState); // readyState will be 1 

reader.onloadend = function () { 
  console.log( 'DONE', reader.readyState); // readyState will be 2 
};

Nginx Install Error: ./configure: error: the HTTP rewrite module requires the PCRE library.

Error Messages:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using –without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using –with-pcre= option.

Solution:

yum install -y pcre-devel

[Solved] Error: No module factory available for dependency type: ContextElementDependency

Error Message:

40% building 68/69 modules 1 active ...im\Web.UI.Claim\wwwroot\src\styles.scss× 「wdm」: Error: No module factory available for dependency type: ContextElementDependency
at addDependency (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:800:12)
at iterationOfArrayCallback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:208:3)
at addDependenciesBlock (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:816:5)
at iterationOfArrayCallback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:208:3)
at addDependenciesBlock (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:819:5)
at Compilation.processModuleDependencies (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:827:4)
at afterBuild (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:954:15)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:998:11
at callback (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:734:5)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:782:12
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\ContextModule.js:282:4
at ContextModule.result.resolveDependencies (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:51 at ContextModule.build (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\ContextModule.js:203:8)
at Compilation.buildModule (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:739:10)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\webpack\lib\Compilation.js:981:14
D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:16
throw new Error('Callback was already called.');
^
Error: Callback was already called.
at throwError (D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:16:11)
at D:\project\BPMS\BPMS_NEW\bpmsapi3\Claim\Web.UI.Claim\wwwroot\node_modules\neo-async\async.js:2818:7
at processTicksAndRejections (internal/process/task_queues.js:79:11)

 

      1. Solution:
        1. Package.json: remove webpack from DevDependencies
        2. rm -R node_modules (remove node_modules folder)
        3. npm i -g webpack
        4. npm i -g webpack-dev-server
        5. remove package-lock.json (if it’s there)
        6. npm i
        7. npm start

 

Error creating bean with name ‘scopedTarget.oauth2ClientContext’: Scope ‘session’ is not active for the current thread;

Solution:

@SpringBootApplication
@EnableEurekaClient
@RibbonClient(name = "say-hello"/*, configuration = RibbonConfig.class*/)
@EnableAutoConfiguration
@EnableOAuth2Sso
public class HelloWorldStarter {

    public static void main(String[] args) {
        SpringApplication.run(HelloWorldStarter.class, args);
    }

    @Bean
    public RequestContextListener requestContextListener() {
        return new RequestContextListener();
    }
     //.......      
}

The following is the error prompt:

10:04:00.710 [http-nio-7602-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/client2].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/client2] threw exception
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.oauth2ClientContext': Scope 'session' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread?If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:357) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193) ~[spring-aop-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at com.sun.proxy.$Proxy158.getAccessToken(Unknown Source) ~[?:?]
    at org.springframework.security.oauth2.client.OAuth2RestTemplate.getAccessToken(OAuth2RestTemplate.java:169) ~[spring-security-oauth2-2.2.2.RELEASE.jar:?]
    at org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter.attemptAuthentication(OAuth2ClientAuthenticationProcessingFilter.java:105) ~[spring-security-oauth2-2.2.2.RELEASE.jar:?]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.doFilter(OAuth2ClientContextFilter.java:60) ~[spring-security-oauth2-2.2.2.RELEASE.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread?If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
    at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.context.request.SessionScope.get(SessionScope.java:55) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:345) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    ... 50 more

Reference:

https://stackoverflow.com/questions/50405838/error-creating-bean-with-name-scopedtarget-oauth2clientcontext-scope-session

Mac vagrant up Error: VBoxManage: error: Failed to create the host-only adapter VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 95 of file VBoxManageHostonly.cpp

1.Error Messages:
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: [“hostonlyif”, “create”]
Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 95 of file VBoxManageHostonly.cpp

2. Solution:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

[Solved] Error:java: Compilation failed: internal java compiler error

Error:java: Compilation failed: internal java compiler error
problem
Error: Error:java: Compilation failed: internal java compiler error
After you change the module-language level, it will report the error above.
Solution:
preferences ->build,execution,deplyment -> java compiler -> Select 8(default is 1.5)

Webpack Error: Cannot use [chunkhash] for chunk

error – webpack – Cannot use [chunkhash] for chunk

ERROR in chunk runtime [entry]
[name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead)

Just comment out the hot replacement plug-ins in plugins. The online config does not need hot replacement:

plugins: [
    //new hotModuleReplacementPlugin(),
]

vue.config.js

local productionstart

 devServer: {
    // set proxy
    hot: process.env.NODE_ENV === 'development',
    ......

Kafka Error: Error while executing topic command : Replication factor: 3 larger than available brokers: 0.

This error occurs when creating topic. Create command:

[hw@node01 bin]$ ./kafka-topics.sh --create --topic first --zookeeper node01:2181 --partitions 3 --replication-factor 1

The error is as follows:;

Error while executing topic command : Replication factor: 3 larger than available brokers: 0.
[2022-02-26 15:55:45,948] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 0.
 (kafka.admin.TopicCommand$)

Error reason: the problem occurs because the path stored by Kafka # broker in zookeeper is not the root directory, but the/Kafka # path

You can start the client of zookeeper to view the broker path of Kafka:

$ bin/zkCli.sh

#Go to the client to view the path details
$ ls -R /

Therefore, modify the command that you create Topic:

[hw@node01 bin]$ ./kafka-topics.sh --create --topic first --zookeeper node01:2181/kafka --partitions 1 --replication-factor 3

ERROR: Unable to start the RMI connector for NodeAgent (ArcGIS Server Startup Error)

ArcGIS Server does not start the service properly. Checking the /framework/etc/service/logs log file in the installation directory keeps indicating the following error:

“ERROR: Unable to start the RMI connector for NodeAgent”

The initial judgment is related to the network.

The first step is to check the system network information.

Linux environment: use ip addr or nmcli , where you have to make sure IPv6 is turned off.

Step 2, if IPv6 is not turned off, you can turn it off by modifying sysctl.

Modify the /etc/sysctl.conf file and add the following two lines.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Execute sysctl -p to take effect.

Step 3 Start the ArcGIS Server service again.