- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
最近我导入了Paho MQTT Spy project进入 Eclipse。导入结束时出现错误:
building has encouted a problem. An internal error occured during: "Build"
An internal error occurred during: "Building".
com.sun.tools.xjc.Plugin: com.sun.tools.xjc.addon.accessors.PluginImpl Unable to get public no-arg constructor
为什么我收到此消息?它意味着什么?如何修复它?
我使用的是 Java 13.0.1
我尝试使用 Maven 构建 mqtt-spy
项目并遇到相同的错误。
我将以下依赖项添加到 pom.xml
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
现在 pom.xml 如下所示:
<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>org.eclipse.paho.mqttspy</groupId>
<artifactId>mqtt-spy</artifactId>
<version>1.0.1-beta</version>
<packaging>jar</packaging>
<name>mqtt-spy</name>
<url>https://github.com/eclipse/paho.mqtt-spy</url>
<scm>
<connection>scm:git:../.git</connection>
<url>../.git</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.number>${buildNumber}</project.build.number>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jaxb2.plugin.version>0.12.1</jaxb2.plugin.version>
<jaxb2.basics.version>0.11.1</jaxb2.basics.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx</artifactId>
<version>11</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.eclipse.paho.mqttspy</groupId>
<artifactId>spy-common</artifactId>
<version>1.0.1</version>
<exclusions>
<exclusion>
<artifactId>maven-jaxb2-plugin</artifactId>
<groupId>org.jvnet.jaxb2.maven2</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.paho.mqttspy</groupId>
<artifactId>spy-common-ui</artifactId>
<version>1.0.1</version>
<exclusions>
<exclusion>
<artifactId>maven-jaxb2-plugin</artifactId>
<groupId>org.jvnet.jaxb2.maven2</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.paho.mqttspy</groupId>
<artifactId>mqtt-spy-common</artifactId>
<version>1.0.1</version>
<exclusions>
<exclusion>
<artifactId>maven-jaxb2-plugin</artifactId>
<groupId>org.jvnet.jaxb2.maven2</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>3.0</version>
</dependency>
<!--=== TEST === -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.1_3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-legacy</artifactId>
<version>2.5.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}-b${buildNumber}</finalName>
<!-- Populate version number in the properties file -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/mqtt-spy.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/mqtt-spy.properties</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Exclude files -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>package-client</id>
<phase>package</phase>
<configuration>
<classifier>exclusions</classifier>
<excludes>
<exclude>**/log4j.properties</exclude>
</excludes>
</configuration>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Create a runnable jar with all dependencies -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>pl.baczkowicz.mqttspy.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Generate build number -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>true</doCheck>
<doUpdate>true</doUpdate>
<buildNumberPropertiesFileLocation>buildNumber.properties</buildNumberPropertiesFileLocation>
<format>{0,number,###}</format>
<items>
<item>buildNumber</item>
</items>
</configuration>
</plugin>
<!-- Generate JAXB clases -->
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>${jaxb2.basics.version}</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>${jaxb2.plugin.version}</version>
<executions>
<execution>
<id>configuration</id>
<phase>generate-resources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<locale>en</locale>
<schemaDirectory>src/main/resources/</schemaDirectory>
<schemaIncludes>
<include>mqtt-spy-configuration.xsd</include>
</schemaIncludes>
<!-- Default to the schemaDirectory -->
<bindingDirectory>src/main/resources</bindingDirectory>
<bindingIncludes>
<include>**/mqtt-spy-configuration-bindings.xjb</include>
</bindingIncludes>
<generateDirectory>src/main/java/</generateDirectory>
<generatePackage>pl.baczkowicz.mqttspy.configuration.generated</generatePackage>
<removeOldOutput>false</removeOldOutput>
<strict>false</strict>
<catalogs>
<catalog>
<dependencyResource>
<groupId>org.eclipse.paho.mqttspy</groupId>
<artifactId>mqtt-spy-common</artifactId>
<resource>mqtt-spy-common.catalog</resource>
</dependencyResource>
</catalog>
<catalog>
<dependencyResource>
<groupId>org.eclipse.paho.mqttspy</groupId>
<artifactId>spy-common</artifactId>
<resource>spy-common.catalog</resource>
</dependencyResource>
</catalog>
</catalogs>
<episode>true</episode>
<!-- <episodeFile>src/main/java/META-INF/mqtt-spy-configuration.episode</episodeFile> -->
<episodes>
<episode>
<groupId>org.eclipse.paho.mqttspy</groupId>
<artifactId>mqtt-spy-common</artifactId>
</episode>
<episode>
<groupId>org.eclipse.paho.mqttspy</groupId>
<artifactId>spy-common</artifactId>
</episode>
</episodes>
<args>
<arg>-XtoString</arg>
<arg>-Xequals</arg>
<arg>-XhashCode</arg>
<arg>-Xcopyable</arg>
<arg>-Xvalue-constructor</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>${jaxb2.basics.version}</version>
</plugin>
</plugins>
</configuration>
</execution>
<execution>
<id>stats</id>
<phase>generate-resources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<locale>en</locale>
<schemaDirectory>src/main/resources/</schemaDirectory>
<schemaIncludes>
<include>mqtt-spy-stats.xsd</include>
</schemaIncludes>
<!-- Default to the schemaDirectory -->
<bindingDirectory>src/main/resources</bindingDirectory>
<bindingIncludes>
<include>**/mqtt-spy-stats-bindings.xjb</include>
</bindingIncludes>
<generateDirectory>src/main/java/</generateDirectory>
<generatePackage>pl.baczkowicz.mqttspy.stats.generated</generatePackage>
<removeOldOutput>false</removeOldOutput>
<episode>false</episode>
<!-- <episodeFile>src/main/java/META-INF/mqtt-spy-stats.episode</episodeFile> -->
<args>
<arg>-XtoString</arg>
<arg>-Xequals</arg>
<arg>-XhashCode</arg>
<arg>-Xcopyable</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>${jaxb2.basics.version}</version>
</plugin>
</plugins>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-value-constructor</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<id>replace</id>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${basedir}/src/main/java</basedir>
<includes>
<include>pl/baczkowicz/mqttspy/configuration/generated/**/*.java</include>
<include>pl/baczkowicz/mqttspy/stats/generated/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>//${line.separator}// This file was generated by the
JavaTM</token>
<value>//
// Copyright (c) ${maven.build.timestamp} Kamil Baczkowicz
//
// CSOFF: a.*
// This file was generated by the JavaTM</value>
</replacement>
<replacement>
<token>^ \*/</token>
<value> */
@SuppressWarnings("all")</value>
</replacement>
<replacement>
<token>^// Generated on.*$</token>
<value>// Timestamp removed by maven-replacer-plugin to avoid
detecting changes - see the project POM for details</value>
</replacement>
</replacements>
<regex>true</regex>
<quiet>false</quiet>
<regexFlags>
<regexFlag>MULTILINE</regexFlag>
</regexFlags>
</configuration>
</plugin>
</plugins>
</build>
</project>
Maven 给出错误:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.eclipse.paho.mqttspy:mqtt-spy:jar:1.0.1-beta
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 162, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -----------------< org.eclipse.paho.mqttspy:mqtt-spy >------------------
[INFO] Building mqtt-spy 1.0.1-beta
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.paho.mqttspy:spy-common:jar:1.0.1 is missing, no dependency information available
[WARNING] The POM for org.eclipse.paho.mqttspy:spy-common-ui:jar:1.0.1 is missing, no dependency information available
[WARNING] The POM for org.eclipse.paho.mqttspy:mqtt-spy-common:jar:1.0.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.384 s
[INFO] Finished at: 2020-01-08T16:10:33+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mqtt-spy: Could not resolve dependencies for project org.eclipse.paho.mqttspy:mqtt-spy:jar:1.0.1-beta: The following artifacts could not be resolved: org.eclipse.paho.mqttspy:spy-common:jar:1.0.1, org.eclipse.paho.mqttspy:spy-common-ui:jar:1.0.1, org.eclipse.paho.mqttspy:mqtt-spy-common:jar:1.0.1: Failure to find org.eclipse.paho.mqttspy:spy-common:jar:1.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
更新
Java 8 解决了问题,但我仍在尝试让 java 13 能够使用它。
尝试使用下面定义的 pom.xml 构建非常根的项目。 pom.xml 现在包含所需的 javax 依赖项。
<?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>
<name>mqtt-spy project</name>
<groupId>pl.baczkowicz.mqttspy</groupId>
<artifactId>mqtt-spy-pom</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<properties>
<main.basedir>${project.basedir}</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<!-- Include all modules in correct order. -->
<modules>
<module>spy-common</module>
<module>spy-common-ui</module>
<module>mqtt-spy-common</module>
<module>mqtt-spy-daemon</module>
<module>mqtt-spy</module>
</modules>
</project>
遇到同样的错误:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.eclipse.paho.mqttspy:mqtt-spy-daemon:jar:1.0.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 113, column 15
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.eclipse.paho.mqttspy:mqtt-spy:jar:1.0.1-beta
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 162, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] spy-common [jar]
[INFO] spy-common-ui [jar]
[INFO] mqtt-spy-common [jar]
[INFO] mqtt-spy-daemon [jar]
[INFO] mqtt-spy [jar]
[INFO] mqtt-spy project [pom]
[INFO]
[INFO] ----------------< org.eclipse.paho.mqttspy:spy-common >-----------------
[INFO] Building spy-common 1.0.1 [1/6]
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-xjc:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-jaxb2-plugin:0.12.1:generate (spy-common) @ spy-common ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] spy-common 1.0.1 ................................... FAILURE [ 0.737 s]
[INFO] spy-common-ui 1.0.1 ................................ SKIPPED
[INFO] mqtt-spy-common 1.0.1 .............................. SKIPPED
[INFO] mqtt-spy-daemon 1.0.0 .............................. SKIPPED
[INFO] mqtt-spy 1.0.1-beta ................................ SKIPPED
[INFO] mqtt-spy project 0.0.1-SNAPSHOT .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.910 s
[INFO] Finished at: 2020-01-08T20:05:25+02:00
[INFO] ------------------------------------------------------------------------
......
---------------------------------------------------
Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: com.sun.tools.xjc.addon.accessors.PluginImpl Unable to get public no-arg constructor
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:583)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:674)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1233)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
at com.sun.tools.xjc.Options.findServices(Options.java:960)
at com.sun.tools.xjc.Options.getAllPlugins(Options.java:374)
at com.sun.tools.xjc.Options.parseArgument(Options.java:688)
at com.sun.tools.xjc.Options.parseArguments(Options.java:812)
at org.jvnet.mjiip.v_2.OptionsFactory.createOptions(OptionsFactory.java:87)
at org.jvnet.mjiip.v_2.OptionsFactory.createOptions(OptionsFactory.java:18)
at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:462)
at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute(RawXJC2Mojo.java:311)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlAccessType
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3138)
at java.base/java.lang.Class.getConstructor0(Class.java:3343)
at java.base/java.lang.Class.getConstructor(Class.java:2152)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:661)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:658)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:669)
... 34 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlAccessType
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 42 more
最佳答案
您可能没有使用 JAVA 8。请在项目属性中定义 Java 8,然后尝试再次构建它。如果您使用的是 Java9 或更高版本,因为它们放弃了类路径的使用,您需要添加 --add-modules java.xml.bind 作为 JVM 参数,以便连接 mdule
关于java - 无法获取公共(public)无参数构造函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59645714/
谁能解释一下原因: (define a (lambda() (cons a #f))) (car (a)) ==> procedure ((car (a))) ==> (procedure . #f)
这是 PyBrain 网站的摘录。我了解大部分正在发生的事情,但是一行让我完全难住了。我以前从未在 python 代码中看到过这样的东西。这是整个循环,对于上下文: for c in [0,
我是gradle / groovy的新手。我想创建将做一些事情的自定义任务。我的第一个问题是任务完成时该如何做?我可以覆盖doFirst / doLast闭包吗?也许我可以重写某些在开始和结束时都会执
我刚刚开始评估 MS 企业库。他们使用以下指令来获取实例: var customerDb = EnterpriseLibraryContainer.Current.GetInstance("C
这是我的 if else Ansible 逻辑.. - name: Check certs exist stat: path=/etc/letsencrypt/live/{{ rootDomain
我正在使用construct 2.8 对一些失传已久的 Pascal 程序创建的一些文件的 header 进行逆向工程。 header 由许多不同的记录组成,其中一些是可选的,我不确定顺序是否固定。
我在将 getchar() 的输入放入 char *arr[] 数组时遇到问题。我这样做的原因是因为输入数据(将是一个带有命令行参数的文件)将存储在一个 char 指针数组中以传递给 execvp 函
通常我们不能约束类型参数 T派生自密封类型(例如 struct 类型)。这将毫无意义,因为只有一种类型适合,因此不需要泛型。所以约束如下: where T : string 或: where T :
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve th
#include using namespace std; class A { private: int m_i; friend int main(int argc, char cons
这个问题在这里已经有了答案: Are there legitimate uses for JavaScript's "with" statement? (33 个答案) 关闭 9 年前。 我有这个代
在this answer我看到了下一个 Bash 结构。 yes "$(< file.txt)" 什么意思 "$(< file.txt)" ? 我明白了 命令替换 - $(command)用命令的结
if (a == 1) //do something else if (a == 2) //do something else if (a == 3) //do somethi
关于构造的快速简单的问题。 我有以下用于将项目添加到 ListView 的代码。 ListViewItem item = new ListViewItem(); item.Text = file; i
我想使用 std::vector 来控制给定的内存。首先,我很确定这不是好的做法,但好奇心占了上风,无论如何我都想知道如何做到这一点。 我遇到的问题是这样的方法: vector getRow(unsi
下面显示了一段简单的javascript: var mystring = ("random","ignored","text","h") + ("ello world") 这个字符串会生成 hello
在 Java 中,创建对象的标准方法是使用 MyClass name = new MyClass(); 我也经常看到构造 new MyClass() { /*stuff goes in here*/
我正在编写 C++ ndarray 类。我需要动态大小和编译时大小已知的数组(分别分配自由存储和分配堆栈)。我想支持从嵌套的 std::initializer_list 进行初始化。 动态大小的没问题
我正在将一个项目从 Visual Studio 2005 转换为 Visual Studio 2008,并提出了上述结构。 using Castle.Core.Resource; using Cast
我想知道我在这里的想法是否正确,我主要针对接口(interface)进行编程,所以我想知道下面的类是否应该通过 DI 注入(inject),或者我应该自己实例化一个类... 注意:这些服务保存在我的核
我是一名优秀的程序员,十分优秀!