在查看Vaadin+JavaEE教程( https://youtu.be/xwIzwdLZ9eY )时遇到了问题。使用Java 11 JDK,因为该程序在使用16.0.2版时根本不工作
App有两个主要的src文件:
GreetService.java:
package com.example.test;
import com.vaadin.cdi.annotation.VaadinSessionScoped;
/**
* Data provider bean scoped for each user session.
*/
@VaadinSessionScoped
public class GreetService {
public String greet(String name) {
if (name == null || name.isEmpty()) {
return "Hello anonymous user";
} else {
return "Hello " + name;
}
}
}MainView.java:
package com.example.test;
import com.vaadin.flow.component.Key;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.button.ButtonVariant;
import com.vaadin.flow.component.dependency.CssImport;
import com.vaadin.flow.component.notification.Notification;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.textfield.TextField;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.server.PWA;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
/**
* The main view contains a simple label element and a template element.
*/
@Route("")
@PWA(name = "Project Base for Vaadin Flow with CDI", shortName = "Project Base", enableInstallPrompt = false)
@CssImport("./styles/shared-styles.css")
@CssImport(value = "./styles/vaadin-text-field-styles.css", themeFor = "vaadin-text-field")
public class MainView extends VerticalLayout {
@Inject
private GreetService greetService;
@PostConstruct
public void init() {
// Use TextField for standard text input
TextField textField = new TextField("Your name");
textField.addThemeName("bordered");
// Button click listeners can be defined as lambda expressions
Button button = new Button("Say hello",
e -> Notification.show(greetService.greet(textField.getValue())));
// Theme variants give you predefined extra styles for components.
// Example: Primary button is more prominent look.
button.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
// You can specify keyboard shortcuts for buttons.
// Example: Pressing enter in this view clicks the Button.
button.addClickShortcut(Key.ENTER);
// Use custom CSS classes to apply styling. This is defined in shared-styles.css.
addClassName("centered-content");
add(textField, button);
}
}这是我的初始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.example.test.basicapp</groupId>
<artifactId>my-starter-project</artifactId>
<name>My Starter Project</name>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Dependencies -->
<vaadin.version>14.6.8</vaadin.version>
<drivers.dir>${project.basedir}/drivers</drivers.dir>
<drivers.downloader.phase>pre-integration-test</drivers.downloader.phase>
</properties>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- Repository used by many Vaadin add-ons -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
<artifactId>vaadin</artifactId>
<exclusions>
<!-- Webjars are only needed when running in Vaadin 13 compatibility mode -->
<exclusion>
<groupId>com.vaadin.webjar</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.insites</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.polymer</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.polymerelements</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.vaadin</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.webcomponents</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-cdi</artifactId>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>8.0.0</version>
<scope>provided</scope>
</dependency>
<!-- Added to provide logging output as Flow uses -->
<!-- the unbound SLF4J no-operation (NOP) logger implementation -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>package tomee:run</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
</plugin>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>7.1.1</version>
<configuration>
<tomeeClassifier>webprofile</tomeeClassifier>
<context>ROOT</context>
<synchronization>
<extensions>
<extension>.class</extension>
</extensions>
</synchronization>
<reloadOnUpdate>true</reloadOnUpdate>
<systemVariables>
<openejb.system.apps>true</openejb.system.apps>
<tomee.serialization.class.blacklist>-</tomee.serialization.class.blacklist>
</systemVariables>
</configuration>
</plugin>
<!--
Take care of synchronizing java dependencies and imports in
package.json and main.js files.
It also creates webpack.config.js if not exists yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<properties>
<vaadin.productionMode>true</vaadin.productionMode>
</properties>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server-production-mode</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<checkStarted>true</checkStarted>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<simpleLog>true</simpleLog>
</configuration>
</plugin>
<!-- Runs the integration tests (*IT) after the server is started -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
<enableAssertions>true</enableAssertions>
<systemPropertyVariables>
<!-- Pass location of downloaded webdrivers to the tests -->
<webdriver.chrome.driver>${webdriver.chrome.driver}</webdriver.chrome.driver>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>com.lazerycode.selenium</groupId>
<artifactId>driver-binary-downloader-maven-plugin</artifactId>
<version>1.0.17</version>
<configuration>
<onlyGetDriversForHostOperatingSystem>true
</onlyGetDriversForHostOperatingSystem>
<rootStandaloneServerDirectory>
${project.basedir}/drivers/driver
</rootStandaloneServerDirectory>
<downloadedZipFileDirectory>
${project.basedir}/drivers/driver_zips
</downloadedZipFileDirectory>
<customRepositoryMap>
${project.basedir}/drivers.xml
</customRepositoryMap>
</configuration>
<executions>
<execution>
<!-- use phase "none" to skip download step -->
<phase>${drivers.downloader.phase}</phase>
<goals>
<goal>selenium</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>在maven更新之后,执行maven build可以很好地运行应用程序。然后,我将pom.xml中的Vaadin版本从14.6.8更改为20.0.7,执行maven项目更新并再次构建,得到一些严重错误并访问localhost:8080显示tomcat HTTP status 404页面。
第二次尝试"maven build“后的控制台输出:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/TpS/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.18.0.20210402-1458/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/TpS/eclipse/jee-2021-06/eclipse/configuration/org.eclipse.osgi/6/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/TpS/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.18.0.20210402-1458/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/TpS/eclipse/jee-2021-06/eclipse/configuration/org.eclipse.osgi/6/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[INFO] ------------< com.example.test.basicapp:my-starter-project >------------
[INFO] Building My Starter Project 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ my-starter-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\TpS\eclipse-workspace\my-starter-project\src\main\resources
[INFO] --- vaadin-maven-plugin:20.0.7:prepare-frontend (default) @ my-starter-project ---
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ my-starter-project ---
[INFO] Nothing to compile - all classes are up to date
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ my-starter-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\TpS\eclipse-workspace\my-starter-project\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ my-starter-project ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ my-starter-project ---
[INFO] Surefire report directory: C:\Users\TpS\eclipse-workspace\my-starter-project\target\surefire-reports
[INFO] Packaging webapp
[INFO] Assembling webapp [my-starter-project] in [C:\Users\TpS\eclipse-workspace\my-starter-project\target\my-starter-project-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\TpS\eclipse-workspace\my-starter-project\src\main\webapp]
[INFO] Webapp assembled in [807 msecs]
[INFO] Building war: C:\Users\TpS\eclipse-workspace\my-starter-project\target\my-starter-project-1.0-SNAPSHOT.war
[INFO] --- tomee-maven-plugin:7.1.1:run (default-cli) @ my-starter-project ---
[INFO] TomEE was unzipped in 'C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee'
[INFO] Removed not mandatory default webapps
[INFO] Installed 'C:\Users\TpS\eclipse-workspace\my-starter-project\target\my-starter-project-1.0-SNAPSHOT.war' in C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee\webapps\ROOT.war
[INFO] Starting synchronizer with an update interval of 5000
[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)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.tomee.catalina.ServerListener (file:/C:/Users/TpS/eclipse-workspace/my-starter-project/target/apache-tomee/lib/tomee-catalina-7.1.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.apache.tomee.catalina.ServerListener
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
05-Sep-2021 05:56:08.810 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server version: Apache Tomcat (TomEE)/8.5.41 (7.1.1)
05-Sep-2021 05:56:08.811 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server built: May 4 2019 09:17:16 UTC
05-Sep-2021 05:56:08.811 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Server number: 8.5.41.0
05-Sep-2021 05:56:08.811 INFO [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke OS Name: Windows 10
...
Starting Servlet Engine: Apache Tomcat (TomEE)/8.5.41 (7.1.1)
05-Sep-2021 05:56:09.769 INFO [localhost-startStop-1] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Deploying web application archive [C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee\webapps\ROOT.war]
05-Sep-2021 05:56:09.776 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /
05-Sep-2021 05:56:09.778 INFO [localhost-startStop-1] org.apache.openejb.util.JarExtractor.extract Extracting jar: C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee\webapps\ROOT.war
[INFO] Waiting for command: [quit, exit, reload]
05-Sep-2021 05:56:10.361 INFO [localhost-startStop-1] org.apache.openejb.util.JarExtractor.extract Extracted path: C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee\webapps\ROOT
05-Sep-2021 05:56:10.362 INFO [localhost-startStop-1] org.apache.openejb.util.OptionsLog.info Using 'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager'
...
org.apache.webbeans.plugins.PluginLoader.startUp Adding OpenWebBeansPlugin : [CdiPlugin]
05-Sep-2021 05:56:12.796 INFO [localhost-startStop-1] org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for file:/C:/Users/TpS/eclipse-workspace/my-starter-project/target/apache-tomee/webapps/ROOT/WEB-INF/lib/atmosphere-runtime-2.4.30.slf4jvaadin1.jar looking all classes to find CDI beans, maybe think to add a beans.xml if not there or add the jar to exclusions.list
05-Sep-2021 05:56:12.837 INFO [localhost-startStop-1] org.apache.deltaspike.core.util.ProjectStageProducer.initProjectStage Computed the following DeltaSpike ProjectStage: Production
05-Sep-2021 05:56:13.208 WARNING [localhost-startStop-1] org.apache.webbeans.config.BeansDeployer.configureInterceptors Interceptor class : org.apache.deltaspike.core.impl.throttling.ThrottledInterceptor is already defined
05-Sep-2021 05:56:13.208 WARNING [localhost-startStop-1] org.apache.webbeans.config.BeansDeployer.configureInterceptors Interceptor class : org.apache.deltaspike.core.impl.lock.LockedInterceptor is already defined
05-Sep-2021 05:56:13.208 WARNING [localhost-startStop-1] org.apache.webbeans.config.BeansDeployer.configureInterceptors Interceptor class :
...
05-Sep-2021 05:56:13.425 INFO [localhost-startStop-1] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All injection points were validated successfully.
05-Sep-2021 05:56:13.462 INFO [localhost-startStop-1] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container has started, it took 969 ms.
05-Sep-2021 05:56:13.467 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee\webapps\ROOT)
[localhost-startStop-1] INFO com.vaadin.flow.server.startup.DevModeInitializer - Starting dev-mode updaters in C:\Users\TpS\eclipse-workspace\my-starter-project folder.
[localhost-startStop-1] INFO dev-updater - Visited 79 classes. Took 20 ms.
[localhost-startStop-1] INFO dev-updater - Added 4 default dependencies to main package.json
[localhost-startStop-1] INFO dev-updater - Running `pnpm install` to resolve and optionally download frontend dependencies. This may take a moment, please stand by...
[localhost-startStop-1] INFO com.vaadin.flow.server.frontend.FrontendTools - using 'C:\Program Files\nodejs\npx.cmd --yes --quiet pnpm@5' for frontend package installation
[localhost-startStop-1] INFO dev-updater - Frontend dependencies resolved successfully.
[localhost-startStop-1] INFO dev-updater - Copying frontend resources from jar files ...
[localhost-startStop-1] INFO dev-updater - Visited 28 resources. Took 73 ms.
[localhost-startStop-1] INFO dev-updater - Visited 79 classes. Took 4 ms.
05-Sep-2021 05:57:24.902 SEVERE [localhost-startStop-1] jdk.internal.reflect.NativeMethodAccessorImpl.invoke ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
...
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at com.vaadin.flow.server.startup.ApplicationConfiguration.lambda$get$0(ApplicationConfiguration.java:63)
at com.vaadin.flow.server.VaadinServletContext.getAttribute(VaadinServletContext.java:73)
at com.vaadin.flow.server.startup.ApplicationConfiguration.get(ApplicationConfiguration.java:49)
at com.vaadin.flow.server.startup.VaadinAppShellInitializer.init(VaadinAppShellInitializer.java:110)
at com.vaadin.flow.server.startup.VaadinAppShellInitializer.initialize(VaadinAppShellInitializer.java:79)
at com.vaadin.flow.server.startup.VaadinServletContextStartupInitializer.process(VaadinServletContextStartupInitializer.java:42)
at com.vaadin.flow.server.startup.ClassLoaderAwareServletContainerInitializer.lambda$onStartup$2(ClassLoaderAwareServletContainerInitializer.java:81)
at com.vaadin.flow.server.startup.ClassLoaderAwareServletContainerInitializer.onStartup(ClassLoaderAwareServletContainerInitializer.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5225)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
05-Sep-2021 05:57:24.903 SEVERE [localhost-startStop-1] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Error deploying web application archive [C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee\webapps\ROOT.war]
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1851)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
05-Sep-2021 05:57:24.904 INFO [localhost-startStop-1] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Deployment of web application archive [C:\Users\TpS\eclipse-workspace\my-starter-project\target\apache-tomee\webapps\ROOT.war] has finished in [75,135] ms
[ForkJoinPool.commonPool-worker-19] INFO dev-updater - Skipping `pnpm install` because the frontend packages are already installed in the folder 'C:\Users\TpS\eclipse-workspace\my-starter-project\node_modules' and the hash in the file 'C:\Users\TpS\eclipse-workspace\my-starter-project\node_modules\.vaadin\vaadin.json' is the same as in 'package.json'
05-Sep-2021 05:57:24.916 INFO [Catalina-startStop-1] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Unable to set the web application class loader property [clearReferencesRmiTargets] to [true] as the property does not exist.
05-Sep-2021 05:57:24.916 INFO [Catalina-startStop-1] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Unable to set the web application class loader property [clearReferencesObjectStreamClassCaches] to [true] as the property does not exist.
05-Sep-2021 05:57:24.916 INFO [Catalina-startStop-1] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Unable to set the web application class loader property [clearReferencesThreadLocals] to [true] as the property does not exist.
[ForkJoinPool.commonPool-worker-19] INFO dev-updater - Copying frontend resources from jar files ...
[ForkJoinPool.commonPool-worker-19] INFO dev-updater - Visited 28 resources. Took 53 ms.
[ForkJoinPool.commonPool-worker-19] INFO dev-webpack - Starting webpack-dev-server
05-Sep-2021 05:57:25.060 WARNING [Catalina-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [135] milliseconds.
05-Sep-2021 05:57:25.063 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["http-nio-8080"]
05-Sep-2021 05:57:25.070 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["ajp-nio-8009"]
05-Sep-2021 05:57:25.072 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Server startup in 75372 ms
[38;5;35m
------------------ Starting Frontend compilation. ------------------
[0m[ForkJoinPool.commonPool-worker-19] INFO dev-webpack - Running webpack to compile frontend resources. This may take a moment, please stand by...
[ForkJoinPool.commonPool-worker-19] INFO dev-webpack - Started webpack-dev-server. Time: 4617ms那我该怎么办呢?我在pom.xml中将Vaadin版本改回了14.6.8,结果是....该应用程序无法使用控制台输出进行maven构建,可能与之前的尝试几乎完全相同
我的第一个假设是,来回更改pom.xml中的依赖项/插件版本应该是一个所谓的可逆操作。谁能解释一下这里可能发生的事情和可能的解决方案(1.应用程序在恢复应用程序之前工作的Vaadin版本后不起作用。2.使用JDK 16.0.2应用程序根本不能工作,即使在pom.xml中使用Java11)?
发布于 2021-09-06 15:28:39
删除node_modules文件夹、package.json和pnpm-lock.yaml有帮助。
https://stackoverflow.com/questions/69060423
复制相似问题