问:
Running an application with TomEE Maven plugin gives me "Error waiting for multi-thread deployment of WAR files to complete"
The following error is given when I try to deploy a simple app (the default one that IntelliJ provides when you create a new Java EE Web App project):

```PS C:\Users\Anton\IdeaProjects\demo5> mvn clean; mvn package; mvn tomee:run
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< com.so:myApp >----------------------------
[INFO] Building myApp 1.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ myApp ---
[INFO] Deleting C:\Users\Anton\IdeaProjects\demo5\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.913 s
[INFO] Finished at: 2022-02-08T01:03:45+01:00
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< com.so:myApp >----------------------------
[INFO] Building myApp 1.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myApp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ myApp ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 3 source files to C:\Users\Anton\IdeaProjects\demo5\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ myApp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ myApp ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ myApp ---
[INFO]
[INFO] --- maven-war-plugin:3.3.0:war (default-war) @ myApp ---
[INFO] Packaging webapp
[INFO] Assembling webapp [myApp] in [C:\Users\Anton\IdeaProjects\demo5\target\myApp]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Anton\IdeaProjects\demo5\src\main\webapp]
[INFO] Building war: C:\Users\Anton\IdeaProjects\demo5\target\myApp.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.402 s
[INFO] Finished at: 2022-02-08T01:03:51+01:00
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< com.so:myApp >----------------------------
[INFO] Building myApp 1.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- tomee-maven-plugin:8.0.7:run (default-cli) @ myApp ---
[INFO] TomEE was unzipped in 'C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee'
[INFO] Removed not mandatory default webapps
[INFO] Installed 'C:\Users\Anton\IdeaProjects\demo5\target\myApp.war' in C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee\webapps\myApp.war
[INFO] TomEE will run in development mode
[INFO] Running 'org.apache.openejb.maven.plugin.run'. Configured TomEE in plugin is localhost:8080 (plugin shutdown port is 8005 and https port is null)
08-Feb-2022 01:03:57.331 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server version name:   Apache Tomcat/9.0.45
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server built:          Mar 30 2021 10:29:04 UTC
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server version number: 9.0.45.0
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke OS Name:               Windows 10
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke OS Version:            10.0
08-Feb-2022 01:03:57.333 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Architecture:          amd64
08-Feb-2022 01:03:57.333 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Java Home:             C:\Program Files\Java\jdk-16

//Omitted because of stackoverflow message length limits

08-Feb-2022 01:04:00.592 INFO [main] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee\webapps\myApp
08-Feb-2022 01:04:01.012 INFO [main] null.openjpa.Enhance You have enabled runtime enhancement, but have not specified the set of persistent classes.  OpenJPA must look for metadata for every loaded class, which might increase class load times significantly.
08-Feb-2022 01:04:01.066 INFO [main] null.openjpa.Runtime OpenJPA dynamically loaded a validation provider.
08-Feb-2022 01:04:01.083 INFO [main] org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate PersistenceUnit(name=default, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 438ms
08-Feb-2022 01:04:01.145 INFO [main] org.apache.openejb.cdi.CdiBuilder.initSingleton Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@6dee4f1b
08-Feb-2022 01:04:01.224 INFO [main] org.apache.openejb.cdi.ManagedSecurityService.<init> Some Principal APIs could not be loaded: org.eclipse.microprofile.jwt.JsonWebToken out of org.eclipse.microprofile.jwt.JsonWebToken not found
08-Feb-2022 01:04:01.265 INFO [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container is starting...
08-Feb-2022 01:04:01.272 INFO [main] org.apache.webbeans.plugins.PluginLoader.startUp Adding OpenWebBeansPlugin : [CdiPlugin]
08-Feb-2022 01:04:01.867 INFO [main] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All injection points were validated successfully.
08-Feb-2022 01:04:01.886 INFO [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container has started, it took 620 ms.
08-Feb-2022 01:04:01.897 INFO [main] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee\webapps\myApp)
08-Feb-2022 01:04:01.904 SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Error waiting for multi-thread deployment of WAR files to complete
        java.util.concurrent.ExecutionException: java.lang.InternalError: LocalBeanProxyFactory.createProxy: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,i
nt,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @cb644e
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.getClassLoaderDefineClassMethod(LocalBeanProxyFactory.java:845)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.defineClass(LocalBeanProxyFactory.java:828)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:142)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:152)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1598)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1344)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1160)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)

                at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
                at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
                at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:836)
                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
                at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
                at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:567)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
        Caused by: java.lang.InternalError: LocalBeanProxyFactory.createProxy: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDom
ain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @cb644e
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.getClassLoaderDefineClassMethod(LocalBeanProxyFactory.java:845)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.defineClass(LocalBeanProxyFactory.java:828)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:142)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:152)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1598)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1344)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1160)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)

                at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:145)
                at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:152)
                at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1598)
                at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1344)
                at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1160)
                at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
                at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
                at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
                at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
                ... 28 more
08-Feb-2022 01:04:02.027 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["http-nio-8080"]
08-Feb-2022 01:04:02.036 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Server startup in [2983] milliseconds
```
<p>If I try to manually deploy the same .war file in my personal TomEE installation using <code>startup.bat</code> this error does not occur.</p>
<p>I have tried both TomEE 8.0.7 and 8.0.8; this is the <code>pom.xml</code>:</p>
```<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.so</groupId>
    <artifactId>myApp</artifactId>
    <version>1.0</version>
    <name>myApp</name>
    <packaging>war</packaging>

    <properties>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>8.0.1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>myApp</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <warName>${project.artifactId}</warName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomee.maven</groupId>
                <artifactId>tomee-maven-plugin</artifactId>
                <version>8.0.7</version>
                <configuration>
                    <tomeeClassifier>webprofile</tomeeClassifier>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
```

What can possibly be the cause?

答:
You are using Java 16 (as shown in the log file) with Maven. In this case, you should use TomEE in version 8.0.9 as this release contains important fixes regarding illegal reflective access (due to the use of Unsafe for proxy creation) in higher versions of Java. You find some details in https://issues.apache.org/jira/browse/TOMEE-3795

It looks like you are using a lower Java version for running your standalone TomEE deployment, which works as it isn't as restrictive as newer Java versions.

Side Note: Java 16 is end-of-life and you should better switch to Java 17.

Body:
The following error is given when I try to deploy a simple app (the default one that IntelliJ provides when you create a new Java EE Web App project):

PS C:\Users\Anton\IdeaProjects\demo5> mvn clean; mvn package; mvn tomee:run
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< com.so:myApp >----------------------------
[INFO] Building myApp 1.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ myApp ---
[INFO] Deleting C:\Users\Anton\IdeaProjects\demo5\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.913 s
[INFO] Finished at: 2022-02-08T01:03:45+01:00
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< com.so:myApp >----------------------------
[INFO] Building myApp 1.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myApp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ myApp ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 3 source files to C:\Users\Anton\IdeaProjects\demo5\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ myApp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ myApp ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ myApp ---
[INFO]
[INFO] --- maven-war-plugin:3.3.0:war (default-war) @ myApp ---
[INFO] Packaging webapp
[INFO] Assembling webapp [myApp] in [C:\Users\Anton\IdeaProjects\demo5\target\myApp]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Anton\IdeaProjects\demo5\src\main\webapp]
[INFO] Building war: C:\Users\Anton\IdeaProjects\demo5\target\myApp.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.402 s
[INFO] Finished at: 2022-02-08T01:03:51+01:00
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< com.so:myApp >----------------------------
[INFO] Building myApp 1.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- tomee-maven-plugin:8.0.7:run (default-cli) @ myApp ---
[INFO] TomEE was unzipped in 'C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee'
[INFO] Removed not mandatory default webapps
[INFO] Installed 'C:\Users\Anton\IdeaProjects\demo5\target\myApp.war' in C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee\webapps\myApp.war
[INFO] TomEE will run in development mode
[INFO] Running 'org.apache.openejb.maven.plugin.run'. Configured TomEE in plugin is localhost:8080 (plugin shutdown port is 8005 and https port is null)
08-Feb-2022 01:03:57.331 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server version name:   Apache Tomcat/9.0.45
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server built:          Mar 30 2021 10:29:04 UTC
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server version number: 9.0.45.0
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke OS Name:               Windows 10
08-Feb-2022 01:03:57.332 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke OS Version:            10.0
08-Feb-2022 01:03:57.333 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Architecture:          amd64
08-Feb-2022 01:03:57.333 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Java Home:             C:\Program Files\Java\jdk-16

//Omitted because of stackoverflow message length limits

08-Feb-2022 01:04:00.592 INFO [main] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee\webapps\myApp
08-Feb-2022 01:04:01.012 INFO [main] null.openjpa.Enhance You have enabled runtime enhancement, but have not specified the set of persistent classes.  OpenJPA must look for metadata for every loaded class, which might increase class load times significantly.
08-Feb-2022 01:04:01.066 INFO [main] null.openjpa.Runtime OpenJPA dynamically loaded a validation provider.
08-Feb-2022 01:04:01.083 INFO [main] org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate PersistenceUnit(name=default, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 438ms
08-Feb-2022 01:04:01.145 INFO [main] org.apache.openejb.cdi.CdiBuilder.initSingleton Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@6dee4f1b
08-Feb-2022 01:04:01.224 INFO [main] org.apache.openejb.cdi.ManagedSecurityService.<init> Some Principal APIs could not be loaded: org.eclipse.microprofile.jwt.JsonWebToken out of org.eclipse.microprofile.jwt.JsonWebToken not found
08-Feb-2022 01:04:01.265 INFO [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container is starting...
08-Feb-2022 01:04:01.272 INFO [main] org.apache.webbeans.plugins.PluginLoader.startUp Adding OpenWebBeansPlugin : [CdiPlugin]
08-Feb-2022 01:04:01.867 INFO [main] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All injection points were validated successfully.
08-Feb-2022 01:04:01.886 INFO [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container has started, it took 620 ms.
08-Feb-2022 01:04:01.897 INFO [main] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\Users\Anton\IdeaProjects\demo5\target\apache-tomee\webapps\myApp)
08-Feb-2022 01:04:01.904 SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Error waiting for multi-thread deployment of WAR files to complete
        java.util.concurrent.ExecutionException: java.lang.InternalError: LocalBeanProxyFactory.createProxy: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,i
nt,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @cb644e
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.getClassLoaderDefineClassMethod(LocalBeanProxyFactory.java:845)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.defineClass(LocalBeanProxyFactory.java:828)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:142)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:152)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1598)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1344)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1160)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)

                at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
                at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
                at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:836)
                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
                at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
                at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:567)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
        Caused by: java.lang.InternalError: LocalBeanProxyFactory.createProxy: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDom
ain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @cb644e
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.getClassLoaderDefineClassMethod(LocalBeanProxyFactory.java:845)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe.defineClass(LocalBeanProxyFactory.java:828)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:142)
        at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:152)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1598)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1344)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1160)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)

                at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:145)
                at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:152)
                at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1598)
                at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1344)
                at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1160)
                at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
                at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
                at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
                at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
                ... 28 more
08-Feb-2022 01:04:02.027 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["http-nio-8080"]
08-Feb-2022 01:04:02.036 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Server startup in [2983] milliseconds

If I try to manually deploy the same .war file in my personal TomEE installation using startup.bat this error does not occur.

I have tried both TomEE 8.0.7 and 8.0.8; this is the pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.so</groupId>
    <artifactId>myApp</artifactId>
    <version>1.0</version>
    <name>myApp</name>
    <packaging>war</packaging>

    <properties>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>8.0.1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>myApp</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <warName>${project.artifactId}</warName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomee.maven</groupId>
                <artifactId>tomee-maven-plugin</artifactId>
                <version>8.0.7</version>
                <configuration>
                    <tomeeClassifier>webprofile</tomeeClassifier>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

What can possibly be the cause?


来源: stackexchange

问:
jute.maxbuffer affects only incoming traffic
Does this value only affect incoming traffic? If i set this value to say 4MB on zookeeper server as well as zookeeper client and I start my client, will I still get data > 4MB when I do a request for a path /abc/asyncMultiMap/subs.  If /subs has data greater than 4MB is the server going to break it up in chunks <= 4MB and send it in pieces to the client?

I am using zookeeper 3.4.6 on both client (via vertx-zookeeper) and server.  I see errors on clients where it complains that packet length is greater than 4MB.

```<code>java.io.IOException: Packet len4194374 is out of range!
    at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
</code>```

答:
"This is a server-side setting"
This statement is incorrect, jute.maxbuffer is evaluated on client as well by Record implementing classes that receive InputArchive. Each time a field is read and stored into an InputArchive the value is checked against jute.maxbuffer. Eg ClientCnxnSocket.readConnectResult

I investigated it in ZK 3.4

ContentLicense: CC BY-SA 3.0

Body:
Does this value only affect incoming traffic? If i set this value to say 4MB on zookeeper server as well as zookeeper client and I start my client, will I still get data > 4MB when I do a request for a path /abc/asyncMultiMap/subs.  If /subs has data greater than 4MB is the server going to break it up in chunks <= 4MB and send it in pieces to the client?

I am using zookeeper 3.4.6 on both client (via vertx-zookeeper) and server.  I see errors on clients where it complains that packet length is greater than 4MB.

java.io.IOException: Packet len4194374 is out of range!
    at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112) ~[zookeeper-3.4.6.jar:3.4.6-1569965]

ContentLicense: CC BY-SA 4.0


问:
How do I exclude a folder from the sidebar in Sublime Text permanently, specifying it relative to the open folder?
I've already read this related question (How do I exclude a folder from search in sublime text 3 permanently?) but my question is different since I want to specify only the folder at the open folder's root, not a generic pattern to match at any level in the folder tree.

In Sublime Text 4 I have an open project folder via File --> "Open Folder...".

Let's say my folder layout is this:

```<code>mainapp
├── microapp
│   └── node_modules  <== don't exclude this (keep it)
├── microapp2
│   └── node_modules  <== don't exclude this (keep it)
├── index
├── node_modules      <=== exclude this only
├── config
└── assets
</code>```

I'd like to exclude mainapp/node_modules only, NOT mainapp/microapp/node_modules nor mainapp/microapp2/node_modules. How do I do that?

I'm guessing I need to specify a "folder_exclude_patterns" in the settings.

Side note: why do I need to do this?

Because that folder has so much build content in it (which is constantly-changing as builds occur) that it's actually causing Sublime Text to freeze and lock up and become unusable.

答:
Tested on Linux Ubuntu 18.04.

Through sheer dumb luck and persistence with guessing, I figured it out. // refers to the "open folder root", apparently.

If you want to see this info about // added to the official Sublime Text documentation and default settings file, please upvote my open issue on it here.

Update

I found some official documentation on this: https://www.sublimetext.com/docs/file_patterns.html. The // feature was added as of Sublime Text 4:

If pattern begins with //, it will be compared as a relative path from the project root [added in version 4.0]

My testing, however, proves that the // actually means "path" root, as defined below, however. So, my examples below are still correct.

1. If you have a folder open via File --> "Open Folder...", do this:

Preferences --> Settings --> add this "folder_exclude_patterns" entry to your user settings JSON file:

{
    // other user settings here

    // exclude only the "mainapp/node_modules" dir
    "folder_exclude_patterns": ["//node_modules"],

    // other user settings here
}
```
<p>Again, <code>//</code> means the "open folder's root".</p>
<p>NOTE: Changing your user settings above will apply globally to <em>all of your Sublime Text instances</em>, which may not be what you want. So, it may be better to use a "Project" instead, as described below:</p>
<h2>2. If you have the folder open and saved as part of a project, do this:</h2>
<p>Project --> Edit Project --> add this <code>"folder_exclude_patterns"</code> entry to your Project settings JSON file:</p>
<pre class="lang-json prettyprint-override"><code>{
    "folders":
    [
        {
            // path to an open folder in a project
            "path": "/path/to/mainapp",

            // exclude only the "mainapp/node_modules" dir
            "folder_exclude_patterns": ["//node_modules"],
        }
    ],
}
</code>```

You can see in the official project settings file example here (https://www.sublimetext.com/docs/projects.html) that the "folder_exclude_patterns" entry must be at the same level in the JSON settings file as the "path" entry.

I also first learned this from @smhg's comment here. Thank you!

To open another folder in your project, go to Project --> "Add Folder to Project...". Once you have multiple folders open in your project, you'll have to add multiple entries of "folder_exclude_patterns", as desired, like this:

{
    "folders":
    [
        {
            // **absolute path** to open a folder in a project
            "path": "/path/to/mainapp",
            // exclude only the "mainapp/node_modules" dir
            "folder_exclude_patterns": ["//node_modules"],
        },
        {
            // or **relative path** to open another folder in the project;
            // the path is relative to the location of the
            // "project_name.sublime-project" project file itself
            "path": "some_dir",
            // exclude only the "some_dir/path/to/excluded_folder" dir
            "folder_exclude_patterns": ["//path/to/excluded_folder"],
        },
    ],
}
```

Bonus: How to create a project in Sublime Text:

To create a Project from an open folder, the steps are like this:

Open a folder: File --> "Open Folder..."

Save it as part of a project: Project --> "Save Project As..."

Now you can choose where to save your project_name.sublime-project file. This is the file you are editing when you go to Project --> "Edit Project" above. To open a project go to Project --> "Open Project...".

See also:

Issue I opened: https://github.com/sublimehq/sublime_text/issues/5234

Comment I wrote on the Sublime Text forum: https://forum.sublimetext.com/t/a-way-to-specify-root-in-project-settings/7756/4?u=ercaguy

Official Project settings documentation: https://www.sublimetext.com/docs/projects.html. This includes:

Each object must have a "path" key, which may be relative to the project directory, or a fully qualified path.

How do I exclude a folder from search in sublime text 3 permanently? - answer which explains how to exclude a file or folder from the side bar in Sublime Text, versus excluding a file or folder from search, such as Goto Anything or Find in Files.

Body:
I've already read this related question (How do I exclude a folder from search in sublime text 3 permanently?) but my question is different since I want to specify only the folder at the open folder's root, not a generic pattern to match at any level in the folder tree.

In Sublime Text 4 I have an open project folder via File --> "Open Folder...".

Let's say my folder layout is this:

mainapp
├── microapp
│   └── node_modules  <== don't exclude this (keep it)
├── microapp2
│   └── node_modules  <== don't exclude this (keep it)
├── index
├── node_modules      <=== exclude this only
├── config
└── assets

I'd like to exclude mainapp/node_modules only, NOT mainapp/microapp/node_modules nor mainapp/microapp2/node_modules. How do I do that?

I'm guessing I need to specify a "folder_exclude_patterns" in the settings.

Side note: why do I need to do this?

Because that folder has so much build content in it (which is constantly-changing as builds occur) that it's actually causing Sublime Text to freeze and lock up and become unusable.

Body:
Tested on Linux Ubuntu 18.04.

Through sheer dumb luck and persistence with guessing, I figured it out. // refers to the "open folder root", apparently.

If you want to see this info about // added to the official Sublime Text documentation and default settings file, please upvote my open issue on it here.

Update

I found some official documentation on this: https://www.sublimetext.com/docs/file_patterns.html. The // feature was added as of Sublime Text 4:

If pattern begins with //, it will be compared as a relative path from the project root [added in version 4.0]

My testing, however, proves that the // actually means "path" root, as defined below, however. So, my examples below are still correct.

1. If you have a folder open via File --> "Open Folder...", do this:

Preferences --> Settings --> add this "folder_exclude_patterns" entry to your user settings JSON file:

{
    // other user settings here

    // exclude only the "mainapp/node_modules" dir
    "folder_exclude_patterns": ["//node_modules"],

    // other user settings here
}

Again, // means the "open folder's root".

NOTE: Changing your user settings above will apply globally to all of your Sublime Text instances, which may not be what you want. So, it may be better to use a "Project" instead, as described below:

2. If you have the folder open and saved as part of a project, do this:

Project --> Edit Project --> add this "folder_exclude_patterns" entry to your Project settings JSON file:

{
    "folders":
    [
        {
            // path to an open folder in a project
            "path": "/path/to/mainapp",

            // exclude only the "mainapp/node_modules" dir
            "folder_exclude_patterns": ["//node_modules"],
        }
    ],
}

You can see in the official project settings file example here (https://www.sublimetext.com/docs/projects.html) that the "folder_exclude_patterns" entry must be at the same level in the JSON settings file as the "path" entry.

I also first learned this from @smhg's comment here. Thank you!

To open another folder in your project, go to Project --> "Add Folder to Project...". Once you have multiple folders open in your project, you'll have to add multiple entries of "folder_exclude_patterns", as desired, like this:

{
    "folders":
    [
        {
            // **absolute path** to open a folder in a project
            "path": "/path/to/mainapp",
            // exclude only the "mainapp/node_modules" dir
            "folder_exclude_patterns": ["//node_modules"],
        },
        {
            // or **relative path** to open another folder in the project;
            // the path is relative to the location of the
            // "project_name.sublime-project" project file itself
            "path": "some_dir",
            // exclude only the "some_dir/path/to/excluded_folder" dir
            "folder_exclude_patterns": ["//path/to/excluded_folder"],
        },
    ],
}

Bonus: How to create a project in Sublime Text:

To create a Project from an open folder, the steps are like this:

Open a folder: File --> "Open Folder..."

Save it as part of a project: Project --> "Save Project As..."

Now you can choose where to save your project_name.sublime-project file. This is the file you are editing when you go to Project --> "Edit Project" above. To open a project go to Project --> "Open Project...".

See also:

Issue I opened: https://github.com/sublimehq/sublime_text/issues/5234

Comment I wrote on the Sublime Text forum: https://forum.sublimetext.com/t/a-way-to-specify-root-in-project-settings/7756/4?u=ercaguy

Official Project settings documentation: https://www.sublimetext.com/docs/projects.html. This includes:

Each object must have a "path" key, which may be relative to the project directory, or a fully qualified path.

How do I exclude a folder from search in sublime text 3 permanently? - answer which explains how to exclude a file or folder from the side bar in Sublime Text, versus excluding a file or folder from search, such as Goto Anything or Find in Files.


问:
Bearer token using HttpURLConnection (Java 8)
Good afternoon,

I'm working on a project with 2 apps, the first one is a php app that provides me an API.
The second one is the app that I'm working on (Java 8 base, no Spring) My question is : Can I use the Bearer token authorization using the HttpURLConnection object ?

I'm still trying to make this work but it seems to make the value of "Authorization" null.

```<code>            //responseLogin is the token that the php app provides.
            String token = "Bearer " + responseLogin.toString();
            HttpURLConnection httpApi = (HttpURLConnection) apiUrl.openConnection();
            httpApi = (HttpURLConnection) apiUrl.openConnection();
            httpApi.setRequestMethod("GET");
            httpApi.setDoOutput(true);
            httpApi.setRequestProperty("Content-Type", "application/json");
            httpApi.setRequestProperty("Accept", "*/*");
            httpApi.setRequestProperty("Authorization", token);
            httpApi.setRequestProperty("Connection", "keep-alive");
            httpApi.setRequestProperty("Accept-Encoding", "gzip, deflate, br");
            LOG.info("Token : " + httpApi.getRequestProperty("Authorization"));
            LOG.info("Accept : " + httpApi.getRequestProperty("Accept"));
</code>```

httpApi.getRequestProperty("Authorization")); this part gets me a null response, I have no idea why.

I Hope anyone can help me with that, feel free to ask me if you need more information about my code.

Thanks :)

答:
There is a constant String array in HttpURLConnection that is called EXCLUDE_HEADERS and has the following comment:

```<code>// the following http request headers should NOT have their values
// returned for security reasons.
private static final String[] EXCLUDE_HEADERS = {
        "Proxy-Authorization",
        "Authorization"
};
</code>```

The purpose is probably to not accidentally dump those headers, e.g. while logging the request.

Note! This doesn't mean they do not get set, just that they aren't being returned when you query for them. To test the actual values, one idea could be to use something like WireMock (or any custom server) to inspect what is actually sent.

Body:
Good afternoon,

I'm working on a project with 2 apps, the first one is a php app that provides me an API.
The second one is the app that I'm working on (Java 8 base, no Spring) My question is : Can I use the Bearer token authorization using the HttpURLConnection object ?

I'm still trying to make this work but it seems to make the value of "Authorization" null.

            //responseLogin is the token that the php app provides.
            String token = "Bearer " + responseLogin.toString();
            HttpURLConnection httpApi = (HttpURLConnection) apiUrl.openConnection();
            httpApi = (HttpURLConnection) apiUrl.openConnection();
            httpApi.setRequestMethod("GET");
            httpApi.setDoOutput(true);
            httpApi.setRequestProperty("Content-Type", "application/json");
            httpApi.setRequestProperty("Accept", "*/*");
            httpApi.setRequestProperty("Authorization", token);
            httpApi.setRequestProperty("Connection", "keep-alive");
            httpApi.setRequestProperty("Accept-Encoding", "gzip, deflate, br");
            LOG.info("Token : " + httpApi.getRequestProperty("Authorization"));
            LOG.info("Accept : " + httpApi.getRequestProperty("Accept"));

httpApi.getRequestProperty("Authorization")); this part gets me a null response, I have no idea why.

I Hope anyone can help me with that, feel free to ask me if you need more information about my code.

Thanks :)

Body:
There is a constant String array in HttpURLConnection that is called EXCLUDE_HEADERS and has the following comment:

// the following http request headers should NOT have their values
// returned for security reasons.
private static final String[] EXCLUDE_HEADERS = {
        "Proxy-Authorization",
        "Authorization"
};

The purpose is probably to not accidentally dump those headers, e.g. while logging the request.

Note! This doesn't mean they do not get set, just that they aren't being returned when you query for them. To test the actual values, one idea could be to use something like WireMock (or any custom server) to inspect what is actually sent.


问:
how to write laravel code in css to change value of property
```<code>background-color: #55ce63;
color: #fff;
content:<? {{__('trans.On')}} ?>;
padding-right: 14px
</code>```

this code css in header of blade how to write laravel code in css  to change

答:
I don't recommend using Laravel variables in the CSS file.

Make your style which you want to style with variables inline style in your blade page.

You can try something like this:

```<code>style="color:{{{ $var_name }}}"
</code>```

Body:
background-color: #55ce63;
color: #fff;
content:<? {{__('trans.On')}} ?>;
padding-right: 14px

this code css in header of blade how to write laravel code in css  to change

Body:
I don't recommend using Laravel variables in the CSS file.

Make your style which you want to style with variables inline style in your blade page.

You can try something like this:

style="color:{{{ $var_name }}}"


问:
Should a internal C# app be compiled with business logic?
[background]

So, I've got a C# application that was written before I got here.  I'm not in the dev org, at this time, but I am the tech lead in my sub-group within the internet marketing org.  My responsibility is process automation, minimal desktop support, and custom apps that make our lives easier.

[/background]

[app details]

We've got an app that creates a custom database file from a list of URLs.  It was designed to have one input file, and two output files for the two applications that use these sort of db files.  The rule for the difference between the two output files is compiled into the code.

[/app details]

Should an internal C# app be compiled with business logic that can't be changed without it being re-built?

答:
Internal applications have one goal: support the process.

If the rules for creating the output are simple, change every day and are put down by a user, compiling it into the binary is totally wrong and an investment into a GUI and a new set of programmers could do much good. If the rules are complex, change once a year and are mandated by the management, having them compiled into the binary is a simple, cost-effective way to maintain them and keep users from fiddling with the internals.

As always, the answer has to be "it depends".

OwnerDisplayName: Sean Ochoa

ContentLicense: CC BY-SA 2.5

OwnerDisplayName: David Schmitt


问:
Querying a Stored Procedure from a stored procedure
Ok, this might be my another bad question, but still I am hopeful. If you look at my recent question, It was an desperate attempt to simplify the need of nesting a stored procedure inside another.

Basically, I needed to select few rows satisfying a particular condition from a view (view_game), and generate other views(view_pupil_game, view_pupil_doubles, view_game_winner) and combine the outputs to create a another view.

But, looking ahead for alternatives I would like to create a stored procedure, which takes a parameters and gives it to others procedure, and take the output as result set and use it to finalize the main procedure.

Please, help me, give a simple example of treating a stored procedure as a table( or record set) and query it inside a store procedure

Update

To give an idea of what i want, here is a dummy query

```<code>begin
Create procedure someProcedure
    @param1 int(3),
    @param2 int(3)
as
begin
    SELECT * FROM <anotherStoreProcedure @param1, @param2> as set1
    inner join <anotherStoreProcedure2 @param1, @param2> as set2 on set2.id=set1.id
end
go
</code>```

答:
You can create table valued UDF's that return some data and then you can use those UDF's in your SP.

Example:

```<code>create function SomeFunction1
(
  @param1 int,
  @param2 int
) returns table as
return
(
  -- Some query that returns something
  select 1 as id,
         @param1 as Col1,
         'SomeFunc1' as Col2
  union all
  select 2,
         @param2,
         'SomeFunc1' as Col2
)

go

create function SomeFunction2
(
  @param1 int,
  @param2 int
) returns table as
return
(
  -- Some query that returns something else
  select 1 as id,
         @param1 as Col1,
         'SomeFunc2' as Col2
  union all
  select 2,
         @param2,
         'SomeFunc2' as Col2
)

go

create procedure SomeProcedure
    @param1 int,
    @param2 int
as
begin
  -- SP that uses the UDF and joins on column id
  select *
  from dbo.SomeFunction1(@param1, @param2) as set1
    inner join SomeFunction2(@param1, @param2) as set2
      on set2.id=set1.id
end
</code>```

Use like this:

```<code>exec SomeProcedure 3, 4
</code>```

Result:

```<code>id          Col1        Col2      id          Col1        Col2
----------- ----------- --------- ----------- ----------- ---------
1           3           SomeFunc1 1           3           SomeFunc2
2           4           SomeFunc1 2           4           SomeFunc2
</code>```

Body:
Ok, this might be my another bad question, but still I am hopeful. If you look at my recent question, It was an desperate attempt to simplify the need of nesting a stored procedure inside another.

Basically, I needed to select few rows satisfying a particular condition from a view (view_game), and generate other views(view_pupil_game, view_pupil_doubles, view_game_winner) and combine the outputs to create a another view.

But, looking ahead for alternatives I would like to create a stored procedure, which takes a parameters and gives it to others procedure, and take the output as result set and use it to finalize the main procedure.

Please, help me, give a simple example of treating a stored procedure as a table( or record set) and query it inside a store procedure

Update

To give an idea of what i want, here is a dummy query

begin
Create procedure someProcedure
    @param1 int(3),
    @param2 int(3)
as
begin
    SELECT * FROM <anotherStoreProcedure @param1, @param2> as set1
    inner join <anotherStoreProcedure2 @param1, @param2> as set2 on set2.id=set1.id
end
go

Body:
You can create table valued UDF's that return some data and then you can use those UDF's in your SP.

Example:

create function SomeFunction1
(
  @param1 int,
  @param2 int
) returns table as
return
(
  -- Some query that returns something
  select 1 as id,
         @param1 as Col1,
         'SomeFunc1' as Col2
  union all
  select 2,
         @param2,
         'SomeFunc1' as Col2
)

go

create function SomeFunction2
(
  @param1 int,
  @param2 int
) returns table as
return
(
  -- Some query that returns something else
  select 1 as id,
         @param1 as Col1,
         'SomeFunc2' as Col2
  union all
  select 2,
         @param2,
         'SomeFunc2' as Col2
)

go

create procedure SomeProcedure
    @param1 int,
    @param2 int
as
begin
  -- SP that uses the UDF and joins on column id
  select *
  from dbo.SomeFunction1(@param1, @param2) as set1
    inner join SomeFunction2(@param1, @param2) as set2
      on set2.id=set1.id
end

Use like this:

exec SomeProcedure 3, 4

Result:

id          Col1        Col2      id          Col1        Col2
----------- ----------- --------- ----------- ----------- ---------
1           3           SomeFunc1 1           3           SomeFunc2
2           4           SomeFunc1 2           4           SomeFunc2


问:
Could not resolve dependency: google-maps-react
It is my first time to clone react project from github

i did:

```<code>$ git clone <link>
</code>```

after that:

```<code>npm install
</code>```

but i faced an error with google-maps-react

```<code>$ npm install --save google-maps-react
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @iso/here@4.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"~0.14.8 || ^15.0.0 || ^16.0.0" from google-maps-react@2.0.6
npm ERR! node_modules/google-maps-react
npm ERR!   google-maps-react@"^2.0.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.
</code>```

i tried:

```<code>$ npm cache clean --force
$ npm install -g npm
</code>```

,:

```<code>$npm config set legacy-peer-deps true
</code>```

,:

```<code>npm install  --force
</code>```

,:

```<code>npm install --save --legacy-peer-deps
</code>```

,:

```<code>rm -rf node_modules
</code>```

and more ..

node js version:

```<code>16.13.2
</code>```

react version:

```<code>17.0.2
</code>```

npm version:

```<code>8.4.1
</code>```

nothing seem to work

am i missing something?

答:
The project has a peer dependency on React 15 or 16 and you are using 17.0.2 - The npm error states the reason

Downgrade your react version if you want to use this library as is or change the package.json for the lib, test and confirm to the author that they are good on 17.0.2 raising a PR

```<code>"peerDependencies": {
    "react": "~0.14.8 || ^15.0.0 || ^16.0.0",
    "react-dom": "~0.14.8 || ^15.0.0 || ^16.0.0"
  },
</code>```

Here's npm telling you reason in the log

npm ERR! Fix the upstream dependency conflict, or retry

Body:
It is my first time to clone react project from github

i did:

$ git clone <link>

after that:

npm install

but i faced an error with google-maps-react

$ npm install --save google-maps-react
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @iso/here@4.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"~0.14.8 || ^15.0.0 || ^16.0.0" from google-maps-react@2.0.6
npm ERR! node_modules/google-maps-react
npm ERR!   google-maps-react@"^2.0.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.

i tried:

$ npm cache clean --force
$ npm install -g npm

,:

$npm config set legacy-peer-deps true

,:

npm install  --force

,:

npm install --save --legacy-peer-deps

,:

rm -rf node_modules

and more ..

node js version:

16.13.2

react version:

17.0.2

npm version:

8.4.1

nothing seem to work

am i missing something?

Body:
The project has a peer dependency on React 15 or 16 and you are using 17.0.2 - The npm error states the reason

Downgrade your react version if you want to use this library as is or change the package.json for the lib, test and confirm to the author that they are good on 17.0.2 raising a PR

"peerDependencies": {
    "react": "~0.14.8 || ^15.0.0 || ^16.0.0",
    "react-dom": "~0.14.8 || ^15.0.0 || ^16.0.0"
  },

Here's npm telling you reason in the log

npm ERR! Fix the upstream dependency conflict, or retry


问:
When is a backing field generated in Kotlin?
Quoting Kotlin documentation on 'Backing properties'.

A backing field will be generated for a property if it uses the default implementation of at least one of the accessors, or if a custom accessor references it through the field identifier.

For example, there would be no backing field in the following case:

val isEmpty: Boolean
   get() = this.size == 0
```

At least one of the accessors (setter) is using the default implementation, then why would there be no backing field in the above case?

答:
At least one of the accessors (setter) is using the default implementation

The example property is a val, so there is no setter. The only accessor is the getter, and that one doesn't use the default implementation, so no backing field.

I agree it would have been clearer if they started with a var example, but this example is definitely worth noting to clarify how it works for vals.

Body:
Quoting Kotlin documentation on 'Backing properties'.

A backing field will be generated for a property if it uses the default implementation of at least one of the accessors, or if a custom accessor references it through the field identifier.

For example, there would be no backing field in the following case:

val isEmpty: Boolean
   get() = this.size == 0

At least one of the accessors (setter) is using the default implementation, then why would there be no backing field in the above case?


问:
Airflow No module named 'wtforms.compat'
recently i have been trying to install airflow on my Macbook pro( 2 GHz Quad-Core Intel Core i5)

However, i have been facing persistent problems in trying to create a virtual environment(venv) where i can install airflow.

```<code>Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/airflow", line 26, in <module>
    from airflow.bin.cli import CLIFactory
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/bin/cli.py", line 82, in <module>
    from airflow.www.app import (cached_app, create_app)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/www/app.py", line 42, in <module>
    from airflow.www.blueprints import routes
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/www/blueprints.py", line 25, in <module>
    from airflow.www import utils as wwwutils
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/www/utils.py", line 36, in <module>
    from wtforms.compat import text_type
ModuleNotFoundError: No module named 'wtforms.compat'
</code>```

System Description:
1.Macbook pro( 2 GHz Quad-Core Intel Core i5)
2.Python Version (3.8.12)

Possible solutions:

I have installed airflow in accordance to the documentation

pip install "apache-airflow[celery]==2.2.3" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.3/constraints-3.8.txt"

I have tried most solutions here as well as airflow github issues. Most recommend reinstalling which i did as well. Some include changing wtforms == 2.3.3 but to no avail as well.

I have exhuasted most of my means i hope stackoverflow can guide me through this. Lastly, thank you in advance and i hope to learn from you

答:
You are using Python 3.9 not python 3.8

```<code>  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/airflow", line 26, in <module>
</code>```

Apparently for some reason you mixed those. You should make sure you both CREATE and ACTIVATE virtualenv and install airflow in the right virtualenv.

Body:
recently i have been trying to install airflow on my Macbook pro( 2 GHz Quad-Core Intel Core i5)

However, i have been facing persistent problems in trying to create a virtual environment(venv) where i can install airflow.

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/airflow", line 26, in <module>
    from airflow.bin.cli import CLIFactory
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/bin/cli.py", line 82, in <module>
    from airflow.www.app import (cached_app, create_app)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/www/app.py", line 42, in <module>
    from airflow.www.blueprints import routes
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/www/blueprints.py", line 25, in <module>
    from airflow.www import utils as wwwutils
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/airflow/www/utils.py", line 36, in <module>
    from wtforms.compat import text_type
ModuleNotFoundError: No module named 'wtforms.compat'

System Description:
1.Macbook pro( 2 GHz Quad-Core Intel Core i5)
2.Python Version (3.8.12)

Possible solutions:

I have installed airflow in accordance to the documentation

pip install "apache-airflow[celery]==2.2.3" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.3/constraints-3.8.txt"

I have tried most solutions here as well as airflow github issues. Most recommend reinstalling which i did as well. Some include changing wtforms == 2.3.3 but to no avail as well.

I have exhuasted most of my means i hope stackoverflow can guide me through this. Lastly, thank you in advance and i hope to learn from you

Body:
You are using Python 3.9 not python 3.8

  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/airflow", line 26, in <module>

Apparently for some reason you mixed those. You should make sure you both CREATE and ACTIVATE virtualenv and install airflow in the right virtualenv.


问:
Get current Timestamp and concatenate with string in yml file
Setting up a yml based azure build pipeline for which publishing artifacts require timestamp based name. Trying to do something like this

```<code>'ArtifactName' + currentTimeStamp
</code>```

How can this be done in an yml file?

答:
You can set the build name in the first line of yml script.

```<code>name: $(Date:yyyyMMdd)-$(Hours)$(Minutes)$(Seconds)
</code>```

See tokens here:
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml

And then set the artifactName concatenating the $(Build.BuildNumber) that represents the name set before

```<code>    artifactName: 'ArtifactName-$(Build.BuildNumber)'
</code>```

Body:
Setting up a yml based azure build pipeline for which publishing artifacts require timestamp based name. Trying to do something like this

'ArtifactName' + currentTimeStamp

How can this be done in an yml file?

Body:
You can set the build name in the first line of yml script.

name: $(Date:yyyyMMdd)-$(Hours)$(Minutes)$(Seconds)

See tokens here:
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml

And then set the artifactName concatenating the $(Build.BuildNumber) that represents the name set before

    artifactName: 'ArtifactName-$(Build.BuildNumber)'


问:
Typescript and useRef hook causing type error
I made a custom Checkbox component to handle events differently, code below:

```<code>const DoubleClickCheckbox = ({ filter, handleDoubleClick, handleSingleClick }: DCCheckboxProps) => {
  const delay = 400;
  const timer = useRef(null);

  const classes = useStyles();
  const flags = useFlags();

  useEffect(() => {
    return () => {
      timer.current && clearTimeout(timer.current);
    };
  }, []);

  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
  // @ts-ignore
  const onClick = (e) => {
    if (flags.csRequireFilters) {
      e.stopPropagation();
      handleSingleClick(filter);
      return;
    }

    switch (e.detail) {
      case 1:
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        timer.current = setTimeout(() => {
          handleSingleClick(filter);
        }, delay);
        break;
      case 2:
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        clearTimeout(timer.current);
        handleDoubleClick(filter);
        break;
      default:
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        clearTimeout(timer.current);
        return;
    }
  };

  return (
    <div className={classes.filter} onClick={onClick} onKeyDown={() => {}} role="button" tabIndex={0}>
      <Checkbox
        label={filter.label}
        className={classes.checkbox_custom}
        checked={filter.selected}
        checkedIcon={filter.mandatory ? <Icons.CheckboxDoubleClick /> : <Icons.CheckboxSingleClick />}
      />
    </div>
  );
};
</code>```

I would like to dump my eslint-disable-next-line @typescript-eslint/ban-ts-comment and ts-ignore.

If I rewrite my code it reads as below, I get a typescript error:

```<code>  case 1:
    timer.current = setTimeout(() => {
      handleSingleClick(filter);
    }, delay);
    break;
</code>```

The error is: Type 'Timeout' is not assignable to type 'null'. I have tried various other tricks, for example: const timer = useRef<React.MutableRefObject<ReturnType<typeof setTimeout>>>(null);.

It did not help either.

Please advise

答: I think the problem is the useRef(null) implicitly sets it's type as null. You should define it as const timer = useRef<null | () => void>(null)

Body:
I made a custom Checkbox component to handle events differently, code below:

const DoubleClickCheckbox = ({ filter, handleDoubleClick, handleSingleClick }: DCCheckboxProps) => {
  const delay = 400;
  const timer = useRef(null);

  const classes = useStyles();
  const flags = useFlags();

  useEffect(() => {
    return () => {
      timer.current && clearTimeout(timer.current);
    };
  }, []);

  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
  // @ts-ignore
  const onClick = (e) => {
    if (flags.csRequireFilters) {
      e.stopPropagation();
      handleSingleClick(filter);
      return;
    }

    switch (e.detail) {
      case 1:
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        timer.current = setTimeout(() => {
          handleSingleClick(filter);
        }, delay);
        break;
      case 2:
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        clearTimeout(timer.current);
        handleDoubleClick(filter);
        break;
      default:
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        clearTimeout(timer.current);
        return;
    }
  };

  return (

 {}} role="button" tabIndex={0}>
      <Checkbox
        label={filter.label}
        className={classes.checkbox_custom}
        checked={filter.selected}
        checkedIcon={filter.mandatory ? <Icons.CheckboxDoubleClick /> : <Icons.CheckboxSingleClick />}
      />

  );
};

I would like to dump my eslint-disable-next-line @typescript-eslint/ban-ts-comment and ts-ignore.

If I rewrite my code it reads as below, I get a typescript error:

  case 1:
    timer.current = setTimeout(() => {
      handleSingleClick(filter);
    }, delay);
    break;

The error is: Type 'Timeout' is not assignable to type 'null'. I have tried various other tricks, for example: const timer = useRef<React.MutableRefObject<ReturnType<typeof setTimeout>>>(null);.

It did not help either.

Please advise


问:
Print an exponential
I'm creating a program that compares numbers with their respective exponents, and indicates which of the three is the smallest. The problem is that I wouldn't want it to perform the operation, for example:

Let's say the smallest number was $4^{8}$, so it would calculate that value, but I want it to just print "4^8" on the screen, or related things, but without doing that operation (in this case, it prints 65536).

```<code>int main()
{
    int a, b, c, smaller, x, y, z, for_a, for_b, for_c;

    printf("first value: ");
    scanf("%d", &a);
    printf("Second value: ");
    scanf("%d", &b);
    printf("Third value: ");
    scanf("%d", &c);

    printf("Value of x: ");
    scanf("%d", &x);
    printf("Value of y: ");
    scanf("%d", &y);
    printf("Value of z: ");
    scanf("%d", &z);

    for_a= pow(a, x);
    for_b= pow(b, y);
    for_c= pow(c, z);

    if (for_a< for_b && for_a < for_c){
        smaller= for_a;
    }
    else if (for_b < for_c){
        smaller = for_b;
    }
    else {
        smaller = for_c;
    }

    printf("Smaller= %d\n", smaller);

    return 0;
}
</code>```

答:
You need to identify the set of data that corresponds to your result. Storing the result only is not enough.

You could do this as follows:

#include <stdio.h>

#typedef struct values_s{
  int base;
  int exponent;
  int result;
} values_t;

#define NUMBER_OF_VALUES 3

int main(void)
{
    values_t values[NUMBER_OF_VALUES];

    for (int i = 0; i < NUMBER_OF_VALUES; i++)
    {
        printf("Base value #%d: ", i+1);
        fflush(stdout);
        int result = scanf("%d", &values[i].base);
        // TODO: Error handling in case result != 1
    }

    for (int i = 0; i < NUMBER_OF_VALUES; i++)
    {
        printf("Exponent #%d: ", i+1);
        fflush(stdout);
        int result = scanf("%d", &values[i].exponent);
        // TODO: Error handling in case result != 1
    }

    for (int i = 0; i < NUMBER_OF_VALUES; i++)
    {
        values[i].result = pow(values[i].base, values[i].exponent);
    }

    int smallest = 0;
    for (int i = 1; i < NUMBER_OF_VALUES; i++)
    {
        if (values[i].result < values[smallest].result)
        {
            smallest = i;
        }
    }

    printf("Smallest: %d^%d = %d\n", values[smallest].base, values[smallest].exponent, values[smallest].result);

    return 0;
}
```

This is based on the assumptions that your variables of type int are large enough to hold the values you are dealing with. Otherwise you need to adjust accordingly.

Title: Print an exponential

Body:
I'm creating a program that compares numbers with their respective exponents, and indicates which of the three is the smallest. The problem is that I wouldn't want it to perform the operation, for example:

Let's say the smallest number was $4^{8}$, so it would calculate that value, but I want it to just print "4^8" on the screen, or related things, but without doing that operation (in this case, it prints 65536).

int main()
{
    int a, b, c, smaller, x, y, z, for_a, for_b, for_c;

    printf("first value: ");
    scanf("%d", &a);
    printf("Second value: ");
    scanf("%d", &b);
    printf("Third value: ");
    scanf("%d", &c);

    printf("Value of x: ");
    scanf("%d", &x);
    printf("Value of y: ");
    scanf("%d", &y);
    printf("Value of z: ");
    scanf("%d", &z);

    for_a= pow(a, x);
    for_b= pow(b, y);
    for_c= pow(c, z);

    if (for_a< for_b && for_a < for_c){
        smaller= for_a;
    }
    else if (for_b < for_c){
        smaller = for_b;
    }
    else {
        smaller = for_c;
    }

    printf("Smaller= %d\n", smaller);

    return 0;
}

Body:
You need to identify the set of data that corresponds to your result. Storing the result only is not enough.

You could do this as follows:

#include <stdio.h>

#typedef struct values_s{
  int base;
  int exponent;
  int result;
} values_t;

#define NUMBER_OF_VALUES 3

int main(void)
{
    values_t values[NUMBER_OF_VALUES];

    for (int i = 0; i < NUMBER_OF_VALUES; i++)
    {
        printf("Base value #%d: ", i+1);
        fflush(stdout);
        int result = scanf("%d", &values[i].base);
        // TODO: Error handling in case result != 1
    }

    for (int i = 0; i < NUMBER_OF_VALUES; i++)
    {
        printf("Exponent #%d: ", i+1);
        fflush(stdout);
        int result = scanf("%d", &values[i].exponent);
        // TODO: Error handling in case result != 1
    }

    for (int i = 0; i < NUMBER_OF_VALUES; i++)
    {
        values[i].result = pow(values[i].base, values[i].exponent);
    }

    int smallest = 0;
    for (int i = 1; i < NUMBER_OF_VALUES; i++)
    {
        if (values[i].result < values[smallest].result)
        {
            smallest = i;
        }
    }

    printf("Smallest: %d^%d = %d\n", values[smallest].base, values[smallest].exponent, values[smallest].result);

    return 0;
}

This is based on the assumptions that your variables of type int are large enough to hold the values you are dealing with. Otherwise you need to adjust accordingly.