This question already has answers here:
What is a NullPointerException, and how do I fix it?
(12 answers)
Closed 2 years ago.
I am trying to create a simple WorkbenchFX based project (Java 11) using Maven in the Eclipse IDE but I cannot get it to work because of the following error
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.4:run (default-cli) on project test_workbenchfx: Error: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
The entire console output is;
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< com.workfx:test_workbenchfx >---------------------
[INFO] Building test_workbenchfx 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # test_workbenchfx ---
[INFO] Deleting C:\Users\JD\eclipse-workspace\test_workbenchfx\target
[INFO]
[INFO] >>> javafx-maven-plugin:0.0.4:run (default-cli) > process-classes # test_workbenchfx >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # test_workbenchfx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) # test_workbenchfx ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to C:\Users\JD\eclipse-workspace\test_workbenchfx\target\classes
[INFO]
[INFO] <<< javafx-maven-plugin:0.0.4:run (default-cli) < process-classes # test_workbenchfx <<<
[INFO]
[INFO]
[INFO] --- javafx-maven-plugin:0.0.4:run (default-cli) # test_workbenchfx ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in Application start method
java.lang.reflect.InvocationTargetException
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:566)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
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:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at java.base/java.util.Arrays$ArrayList.<init>(Arrays.java:4323)
at java.base/java.util.Arrays.asList(Arrays.java:4310)
at javafx.base/javafx.collections.ObservableListBase.addAll(ObservableListBase.java:246)
at javafx.base/javafx.beans.binding.ListExpression.addAll(ListExpression.java:360)
at com.dlsc.workbenchfx.Workbench.initModules(Workbench.java:386)
at com.dlsc.workbenchfx.Workbench.<init>(Workbench.java:339)
at com.dlsc.workbenchfx.Workbench$WorkbenchBuilder.build(Workbench.java:311)
at com.workfx.test_workbenchfx.App.initWorkbench(App.java:76)
at com.workfx.test_workbenchfx.App.start(App.java:59)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
... 1 more
Exception running application com.workfx.test_workbenchfx.App
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:504)
at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:394)
at org.openjfx.JavaFXRunMojo.execute(JavaFXRunMojo.java:100)
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:566)
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)
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:504)
at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:394)
at org.openjfx.JavaFXRunMojo.execute(JavaFXRunMojo.java:100)
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:566)
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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.357 s
[INFO] Finished at: 2020-04-10T19:44:03+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.4:run (default-cli) on project test_workbenchfx: Error: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [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/MojoExecutionException
I built the Maven project using the goal: clean javafx:run
This is my pom.xml file
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.workfx</groupId>
<artifactId>test_workbenchfx</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11</version>
</dependency>
<dependency>
<groupId>com.dlsc.workbenchfx</groupId>
<artifactId>workbenchfx-core</artifactId>
<version>11.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.4</version>
<configuration>
<mainClass>com.workfx.test_workbenchfx.App</mainClass>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
</plugin>
-->
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.workfx.test_workbenchfx.App</mainClass>
</configuration>
</plugin>
-->
</plugins>
</build>
</project>
The project's main class is
package com.workfx.test_workbenchfx;
import java.io.IOException;
import java.util.Locale;
import com.dlsc.workbenchfx.Workbench;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
/**
* JavaFX Workbench App
*/
public class App extends Application {
private Workbench wbench;
/**
* Application entry point
*
* #param args
*/
public static void main(String[] args) {
// See https://stackoverflow.com/questions/64038/setting-java-locale-settings
// https://stackoverflow.com/questions/24988491/difference-between-e-getmessage-and-e-getlocalizedmessage
Locale.setDefault(Locale.FRANCE);
launch(args);
}
#Override
public void start(Stage primaryStage) {
// preferences = new Preferences();
// Initialize the workbench
Scene myScene = new Scene(initWorkbench());
primaryStage.setScene(myScene);
primaryStage.setWidth(1300);
primaryStage.setHeight(730);
primaryStage.show();
primaryStage.centerOnScreen();
// initNightMode();
}
/**
*
* #return
*/
private Workbench initWorkbench() {
wbench = Workbench.builder(null).build();
return wbench;
}
}
I would really appreciate some help to get around this problem because nothing I've tried thus far (clean, update, rebuild) works.
Thanks a lot for your kind assistance.
JD
James_D Thanks a lot. It was so obvious after I read your comment. I passed null as a parameter into Workbench.builder() in the initWorkbench() method. Once I removed it and added a proper class, it worked.
Related
With the incoming restriction of app engine to deploy applications with java 7, I need to switch to java 8 my application and deploying it creates errors related to the gwt.
I've tried to change the versions of the gwt plugin, from 2.6.1 to 2.8.2 and 2.8.0.
I've also tried to add dependencies according to other posts on the subject of gwt errors but it didn't change anything.
Finally I tried to deploy the application without compiling the gwt project with this command :
clean install -Dgwt.compiler.skip=true package appengine:update
The app was successfully deployed but doesn't work so I still need to find a solution.
Here are parts of my pom.xml file
<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">
...
<properties>
<appId>sandaya-dev</appId>
<appVersion>9</appVersion>
<module>default</module>
...
<gwt-plugin.version>2.6.1</gwt-plugin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt-plugin.version}</version>
<configuration>
<compileTargets>
<value>com.insightos.apps.sandaya.InsightOS</value>
</compileTargets>
<compileSourcesArtifacts>
<compileSourcesArtifact>com.insightos.ui:UI</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.leisure:LeisureViews</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.data:GenericDao</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos:Utils</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.leisure.data:LeisureDao</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.data:GA</compileSourcesArtifact>
</compileSourcesArtifacts>
<module>com.insightos.apps.sandaya.InsightOS</module>
</configuration>
</plugin>
...
</plugins>
...
</build>
Here is the command I give to deploy to appengine
-X clean install appengine:update
And here are the errors I'm getting from the deployment (I truncated some lines because too long for Stackoverflow) :
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.134 s
[INFO] Finished at: 2018-12-25T12:29:25+01:00
[INFO] Final Memory: 71M/817M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project Sandaya: Command [[
...
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project Sandaya: Command [[
/bin/sh -c /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/bin/java -Xmx1024m -XX:MaxPermSize=256m -classpath /Users/martijn2/Documents/oxygen-workspaces/acsi/sandaya/target/classes:/Users/martijn2/Documents/oxygen-workspaces/acsi/sandaya/src/main/java:/Users...
]] failed with status 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.mojo.gwt.shell.ForkedProcessExecutionException: Command [[
/bin/sh -c /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/bin/java -Xmx1024m -XX:MaxPermSize=256m -classpath /Users/...
]] failed with status 1
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo$JavaCommand.execute(AbstractGwtShellMojo.java:485)
at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:446)
at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:351)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:172)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR]
[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/MojoExecutionException
I expect the build to be a success and not to have these errors, and to obtain a working application deployed to app engine in Java 8.
Thanks by advance for any help
I'm attempting to use maven-jaxb2-plugin to compile the XSDs at http://www.aptatcip.com/APTA-TCIP-S-01%204.0_files/Schema%20Set.zip
Using this pom.xml, and the command line below (run from the parent folder), the compilation fails with a fairly cryptic error message (also given below):
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>onebusaway-nyc</artifactId>
<groupId>org.onebusaway</groupId>
<version>2.14.0-SNAPSHOT</version>
</parent>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-nyc-tcip-api</artifactId>
<packaging>jar</packaging>
<name>onebusaway-nyc-tcip-api</name>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.11.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>src/main/resources</schemaDirectory>
<schemaIncludes>
<include>TCIP_4_0_0_Final.xsd</include>
</schemaIncludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
command line (in the parent project folder)
MAVEN_OPTS="-server -Djava.awt.headless=true -Xmx2G -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC" mvn -X -U clean install -pl onebusaway-nyc-tcip-api
error message
[ERROR] Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate (default) on project onebusaway-nyc-tcip-api: Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate failed. UndeclaredThrowableException: javax.xml.bind.annotation.XmlElementRef.required() -> [Help 1]
Last part of maven output (long because of -X)
[INFO] Started execution.
[INFO] JAXB API is loaded from the [jar:file:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar!].
[INFO] Detected JAXB API version [2.1].
[INFO] pluginArtifacts:[org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:maven-plugin:0.11.0:, org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-core:jar:0.11.0:compile, com.sun.org.apache.xml.internal:resolver:jar:20050927:compile, org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile, junit:junit:jar:4.8.1:compile, org.codehaus.plexus:plexus-utils:jar:1.5.15:compile, org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.11.0:compile, com.sun.xml.bind:jaxb-core:jar:2.2.11:compile, com.sun.xml.bind:jaxb-impl:jar:2.2.11:compile, com.sun.xml.bind:jaxb-xjc:jar:2.2.11:compile, org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2:compile]
[INFO] specVersion:2.2
[INFO] encoding:UTF-8
[INFO] locale:null
[INFO] schemaLanguage:null
[INFO] schemaDirectory:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources
[INFO] schemaIncludes:[TCIP_4_0_0_Final.xsd]
[INFO] schemaExcludes:null
[INFO] schemas:[]
[INFO] bindingDirectory:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources
[INFO] bindingIncludes:[*.xjb]
[INFO] bindingExcludes:null
[INFO] bindings:[]
[INFO] disableDefaultExcludes:false
[INFO] catalog:null
[INFO] catalogResolver:null
[INFO] generatePackage:null
[INFO] generateDirectory:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/target/generated-sources/xjc
[INFO] readOnly:false
[INFO] extension:true
[INFO] strict:true
[INFO] writeCode:true
[INFO] verbose:true
[INFO] debug:false
[INFO] args:[]
[INFO] forceRegenerate:false
[INFO] removeOldOutput:false
[INFO] produces:[**/*.*, **/*.java, **/bgm.ser, **/jaxb.properties]
[INFO] otherDepends:null
[INFO] episodeFile:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/target/generated-sources/xjc/META-INF/sun-jaxb.episode
[INFO] episode:true
[INFO] classpathElements:[/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/target/classes]
[INFO] plugins:null
[INFO] episodes:null
[INFO] useDependenciesAsEpisodes:false
[INFO] scanDependenciesForBindings:false
[INFO] xjcPlugins:null
[INFO] episodes:null
[INFO] schemaFiles (calculated):[/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd]
[INFO] bindingFiles (calculated):[]
[INFO] xjcPluginArtifacts (resolved):[]
[INFO] xjcPluginFiles (resolved):[]
[INFO] xjcPluginURLs (resolved):[]
[INFO] episodeArtifacts (resolved):[]
[INFO] episodeFiles (resolved):[]
Parse catalog: ./xcatalog
Loading catalog: ./xcatalog
Default BASE: file:/Users/dhaskin/clients/cs/onebusaway-nyc/xcatalog
Catalog does not exist: file:/Users/dhaskin/clients/cs/onebusaway-nyc/xcatalog
[INFO] optionsConfiguration:OptionsConfiguration [specVersion=2.2
generateDirectory=/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/target/generated-sources/xjc
generatePackage=null
schemaLanguage=null
schemas=[file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd]
bindings=[]
plugins=[]
catalogs=[]
catalogResolver=org.jvnet.jaxb2.maven2.resolver.tools.MavenCatalogResolver#1d87b360
readOnly=false
packageLevelAnnotations=true
noFileHeader=false
enableIntrospection=false
disableXmlSecurity=true
accessExternalSchema=all
accessExternalDTD=all
contentForWildcard=false
extension=true
strict=true
verbose=true
debugMode=false
arguments=true]
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd)
Using java.util.ServiceLoader
[INFO] File [/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd] might have been changed since the last build.
[INFO] File [/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/pom.xml] might have been changed since the last build.
[INFO] Checking up-to-date depends [[/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd, /Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/pom.xml]].
[INFO] Checking up-to-date produces [[]].
[INFO] Depends timestamp [1,415,987,486,000], produces timestamp [null].
[INFO] File [/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd] might have been changed since the last build.
[INFO] File [/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/pom.xml] might have been changed since the last build.
[INFO] Checking up-to-date depends [[/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd, /Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/pom.xml]].
[INFO] Checking up-to-date produces [[]].
[INFO] Depends timestamp [1,415,987,486,000], produces timestamp [null].
[INFO] Sources are not up-to-date, XJC will be executed.
[INFO] Parsing input schema(s)...
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd)
resolveSystem(atis_Partial_03_00_74.xsd)
resolvePublic(http://www.atis-partial-03-00-74,atis_Partial_03_00_74.xsd)
Failed to create InputSource: atis_Partial_03_00_74.xsd
resolveSystem(ITIS_Final_3_0_0_for_atis.xsd)
resolvePublic(http://www.itis-final-3-0-0-for-atis,ITIS_Final_3_0_0_for_atis.xsd)
Failed to create InputSource: ITIS_Final_3_0_0_for_atis.xsd
resolveSystem(ITIS_Local_for_atis.xsd)
resolvePublic(http://www.itis-3-0-0-local-for-atis,ITIS_Local_for_atis.xsd)
Failed to create InputSource: ITIS_Local_for_atis.xsd
resolveSystem(LRMS_Final_09_07_for_atis.xsd)
resolvePublic(http://www.lrms-final-09-07-for-atis,LRMS_Final_09_07_for_atis.xsd)
Failed to create InputSource: LRMS_Final_09_07_for_atis.xsd
resolveSystem(LRMS_Local_for_atis.xsd)
resolvePublic(http://www.lrms-local-atis,LRMS_Local_for_atis.xsd)
Failed to create InputSource: LRMS_Local_for_atis.xsd
resolveSystem(ATIS_03_00_74_Local.xsd)
resolvePublic(http://www.atis-03-00-74-local,ATIS_03_00_74_Local.xsd)
Failed to create InputSource: ATIS_03_00_74_Local.xsd
resolveSystem(tmdd_Partial_0_0_0.xsd)
resolvePublic(http://www.tmdd-partial-00-00-00,tmdd_Partial_0_0_0.xsd)
Failed to create InputSource: tmdd_Partial_0_0_0.xsd
resolveSystem(im_Partial_03_00_38.xsd)
resolvePublic(http://www.im-partial-03-00-38,im_Partial_03_00_38.xsd)
Failed to create InputSource: im_Partial_03_00_38.xsd
resolveSystem(ITIS_Local_for_im.xsd)
resolvePublic(http://www.itis-local-for-im,ITIS_Local_for_im.xsd)
Failed to create InputSource: ITIS_Local_for_im.xsd
resolveSystem(LRMS_Final_09_07_for_im.xsd)
resolvePublic(http://www.lrms-final-09-07-for-im,LRMS_Final_09_07_for_im.xsd)
Failed to create InputSource: LRMS_Final_09_07_for_im.xsd
resolveSystem(LRMS_Local_for_im.xsd)
resolvePublic(http://www.lrms-local-for-im,LRMS_Local_for_im.xsd)
Failed to create InputSource: LRMS_Local_for_im.xsd
resolveSystem(IM_03_00_38_Local.xsd)
resolvePublic(http://www.im-03-00-38-local,IM_03_00_38_Local.xsd)
Failed to create InputSource: IM_03_00_38_Local.xsd
resolveSystem(itis_Final_3_0_0.xsd)
resolvePublic(http://www.itis-final-3-0-0,itis_Final_3_0_0.xsd)
Failed to create InputSource: itis_Final_3_0_0.xsd
resolveSystem(ITIS_3_0_0_Local.xsd)
resolvePublic(http://www.itis-3-0-0-local,ITIS_3_0_0_Local.xsd)
Failed to create InputSource: ITIS_3_0_0_Local.xsd
resolveSystem(lrms_Final_09_07.xsd)
resolvePublic(http://www.lrms-final-09-07,lrms_Final_09_07.xsd)
Failed to create InputSource: lrms_Final_09_07.xsd
resolveSystem(LRMS_09_07_Local.xsd)
resolvePublic(http://www.dummy-local-address,LRMS_09_07_Local.xsd)
Failed to create InputSource: LRMS_09_07_Local.xsd
resolveSystem(tcip_4_0_0_local.xsd)
resolvePublic(http://www.tcip-4-0-0-local,tcip_4_0_0_local.xsd)
Failed to create InputSource: tcip_4_0_0_local.xsd
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/TCIP_4_0_0_Final.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/atis_Partial_03_00_74.xsd)
resolvePublic(http://www.atis-partial-03-00-74,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/atis_Partial_03_00_74.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/atis_Partial_03_00_74.xsd)
resolvePublic(http://www.atis-partial-03-00-74,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/atis_Partial_03_00_74.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Final_3_0_0_for_atis.xsd)
resolvePublic(http://www.itis-final-3-0-0-for-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Final_3_0_0_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Final_3_0_0_for_atis.xsd)
resolvePublic(http://www.itis-final-3-0-0-for-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Final_3_0_0_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_atis.xsd)
resolvePublic(http://www.itis-3-0-0-local-for-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_atis.xsd)
resolvePublic(http://www.itis-3-0-0-local-for-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_atis.xsd)
resolvePublic(http://www.lrms-final-09-07-for-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_atis.xsd)
resolvePublic(http://www.lrms-final-09-07-for-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_atis.xsd)
resolvePublic(http://www.lrms-local-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_atis.xsd)
resolvePublic(http://www.lrms-local-atis,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_atis.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ATIS_03_00_74_Local.xsd)
resolvePublic(http://www.atis-03-00-74-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ATIS_03_00_74_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ATIS_03_00_74_Local.xsd)
resolvePublic(http://www.atis-03-00-74-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ATIS_03_00_74_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tmdd_Partial_0_0_0.xsd)
resolvePublic(http://www.tmdd-partial-00-00-00,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tmdd_Partial_0_0_0.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tmdd_Partial_0_0_0.xsd)
resolvePublic(http://www.tmdd-partial-00-00-00,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tmdd_Partial_0_0_0.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/im_Partial_03_00_38.xsd)
resolvePublic(http://www.im-partial-03-00-38,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/im_Partial_03_00_38.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/im_Partial_03_00_38.xsd)
resolvePublic(http://www.im-partial-03-00-38,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/im_Partial_03_00_38.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_im.xsd)
resolvePublic(http://www.itis-local-for-im,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_im.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_im.xsd)
resolvePublic(http://www.itis-local-for-im,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_Local_for_im.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_im.xsd)
resolvePublic(http://www.lrms-final-09-07-for-im,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_im.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_im.xsd)
resolvePublic(http://www.lrms-final-09-07-for-im,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Final_09_07_for_im.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_im.xsd)
resolvePublic(http://www.lrms-local-for-im,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_im.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_im.xsd)
resolvePublic(http://www.lrms-local-for-im,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_Local_for_im.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/IM_03_00_38_Local.xsd)
resolvePublic(http://www.im-03-00-38-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/IM_03_00_38_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/IM_03_00_38_Local.xsd)
resolvePublic(http://www.im-03-00-38-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/IM_03_00_38_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/itis_Final_3_0_0.xsd)
resolvePublic(http://www.itis-final-3-0-0,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/itis_Final_3_0_0.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/itis_Final_3_0_0.xsd)
resolvePublic(http://www.itis-final-3-0-0,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/itis_Final_3_0_0.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_3_0_0_Local.xsd)
resolvePublic(http://www.itis-3-0-0-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_3_0_0_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_3_0_0_Local.xsd)
resolvePublic(http://www.itis-3-0-0-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/ITIS_3_0_0_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/lrms_Final_09_07.xsd)
resolvePublic(http://www.lrms-final-09-07,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/lrms_Final_09_07.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/lrms_Final_09_07.xsd)
resolvePublic(http://www.lrms-final-09-07,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/lrms_Final_09_07.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_09_07_Local.xsd)
resolvePublic(http://www.dummy-local-address,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_09_07_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_09_07_Local.xsd)
resolvePublic(http://www.dummy-local-address,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/LRMS_09_07_Local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tcip_4_0_0_local.xsd)
resolvePublic(http://www.tcip-4-0-0-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tcip_4_0_0_local.xsd)
resolveSystem(file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tcip_4_0_0_local.xsd)
resolvePublic(http://www.tcip-4-0-0-local,file:/Users/dhaskin/clients/cs/onebusaway-nyc/onebusaway-nyc-tcip-api/src/main/resources/tcip_4_0_0_local.xsd)
[INFO] Compiling input schema(s)...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:28.839s
[INFO] Finished at: Fri Nov 14 09:57:04 PST 2014
[INFO] Final Memory: 12M/403M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate (default) on project onebusaway-nyc-tcip-api: Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate failed. UndeclaredThrowableException: javax.xml.bind.annotation.XmlElementRef.required() -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate (default) on project onebusaway-nyc-tcip-api: Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.11.0:generate failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy43.required(Unknown Source)
at com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReference(AbstractField.java:202)
at com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:161)
at com.sun.tools.xjc.generator.bean.field.AbstractListField.generate(AbstractListField.java:129)
at com.sun.tools.xjc.generator.bean.field.UntypedListField.<init>(UntypedListField.java:112)
at com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer.generate(UntypedListFieldRenderer.java:77)
at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:82)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:777)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:558)
at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:261)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:169)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:288)
at org.jvnet.mjiip.v_2_2.XJC22Mojo.generateCode(XJC22Mojo.java:66)
at org.jvnet.mjiip.v_2_2.XJC22Mojo.doExecute(XJC22Mojo.java:41)
at org.jvnet.mjiip.v_2_2.XJC22Mojo.doExecute(XJC22Mojo.java:28)
at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:326)
at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute(RawXJC2Mojo.java:168)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 20 more
Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
at java.lang.Class.getDeclaredMethod(Class.java:1973)
at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:112)
... 38 more
[ERROR]
[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/PluginExecutionException
start of mvn -x
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 08:22:22-0700)
Maven home: /usr/local/Cellar/maven31/3.1.1/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.10", arch: "x86_64", family: "mac"
Could you post your java -version or the beginning of the mvn -X log?
The problem is most probably here:
[INFO] Detected JAXB API version [2.1].
...
[INFO] specVersion:2.2
You'll probably need to update your JDK or
put jaxb-api-2.2.jar into your $JRE_HOME/lib/endorsed directory.
Alternatively you can put the JAXB API jar into a different folder and include it into the java.endorsed.dirs system property.
I see you're using maven-jaxb2-plugin now. If you want to stay on JAXB 2.1 with your JDK (which is probably somewhat outdated), you can:
configure <specVersion>2.1</specVersion>
or use the plugin artifact id maven-jaxb21-plugin, it is a variant of the plugin which is linked with JAXB 2.1.
Upgrading my JDK to the correct version (1.7, in this case) addressed this.
I'm newborn in writing anotations in Java. I was trying to write my own following this tutorial: Playing with Java annotation processing
I wrote everything like it is there, but during compilation I'm getting an error:
Bad service configuration file javax.annotation.processing.Processor Provider <my class> not found.
I'm using netbeans and maven with plugin maven-compiler-plugin v. 2.5.1. and java sources v.1.8.
In my pom.xml file I have (like suggested in page) following code:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!-- Disable annotation processing for ourselves. -->
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
My OS is Linux (leatest ubuntu) and maven is that one integrated in Netbeans.
I was trying to google it, but nothing helped me. All tutorials were for older release of plugin and Java. I tried older release of maven-compiler-plugin but with no effect. I cannot switch to older version of java because of new features introduced in Java 8.
Thanks a lot for any pointing me how to fix it.
Edit:
Here is full list of my sources:
Config.java
#Retention(RetentionPolicy.SOURCE)
#Target(value = {ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.PARAMETER})
public #interface Config {
String name();
String type();
String defaultValue();
}
ConfigAnnotationProcessor.java
#SupportedAnnotationTypes(
{"sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotations"}
)
public class ConfigAnnotationProcessor extends AbstractProcessor {
#Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment env) {
Messager messager = processingEnv.getMessager();
annotations.stream().forEach((te) -> {
env.getElementsAnnotatedWith(te).stream().forEach((e) -> {
messager.printMessage(Diagnostic.Kind.NOTE,
"Printing: " + e.toString());
});
});
return true;
}
#Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}
}
META-INF/services/javax.annotation.processing.Processor
sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotationProcessor
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>sk.lieskove301.jianghongtiao</groupId>
<artifactId>MotionAnalyser</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
.... some dependencies ...
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<profiles>
<profile>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!-- Disable annotation processing for ourselves.-->
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
And this is log of my compiler:
cd /home/xjuraj/Dropbox/Work/MotionAnalyser; JAVA_HOME=/usr/lib/jvm/java-8-oracle /usr/local/netbeans-8.0/java/maven/bin/mvn clean install
Scanning for projects...
------------------------------------------------------------------------
Building MotionAnalyser 1.0-SNAPSHOT
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) # MotionAnalyser ---
Deleting /home/xjuraj/Dropbox/Work/MotionAnalyser/target
--- maven-resources-plugin:2.5:resources (default-resources) # MotionAnalyser ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 6 resources
--- maven-compiler-plugin:2.3.2:compile (default-compile) # MotionAnalyser ---
Compiling 27 source files to /home/xjuraj/Dropbox/Work/MotionAnalyser/target/classes
-------------------------------------------------------------
COMPILATION ERROR :
-------------------------------------------------------------
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotationProcessor not found
1 error
-------------------------------------------------------------
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.661s
Finished at: Mon Aug 11 19:56:16 CEST 2014
Final Memory: 12M/180M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project MotionAnalyser: Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotationProcessor not found
-> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Edit 2 and so on...:
Screenshot of my environment is here
Screenshot of my folder structure
Output of non-integrated maven
xjuraj#xjuraj-pc:~/Dropbox/Work/MotionAnalyser$ mvn -e package
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - sk.lieskove301.jianghongtiao:MotionAnalyser:jar:1.0-SNAPSHOT
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 27 source files to /home/xjuraj/Dropbox/Work/MotionAnalyser/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotationProcessor not found
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotationProcessor not found
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotationProcessor not found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider sk.lieskove301.jianghongtiao.motionanalyser.config.ConfigAnnotationProcessor not found
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:729)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Aug 14 15:10:26 CEST 2014
[INFO] Final Memory: 19M/187M
[INFO] ------------------------------------------------------------------------
Cheers,
juraj
Thanks a lot bigdestroyer for your time and help. I already found where the bug was. It was in pom.xml file. My structure was:
<project>
[...]
<dependencies>.... some dependencies ...</dependencies>
<properties>.... some properties ...</properties>
<profiles>
<profile>
<build>
<plugins>
<plugin>
... plugins & settings ...
But there were problem with tags <profiles> and <profile>. I removed them and it works like a charm now.
So my working pom.xml now looks like:
<?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>sk.lieskove301.jianghongtiao</groupId>
<artifactId>MotionAnalyser</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
...dependencies...
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!-- Disable annotation processing for ourselves.-->
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
</project>
The problem seems to be in this instruction:
<compilerArgument>-proc:none</compilerArgument>
OP's answer has that line in Maven configuration, but he doesn't mention its importance.
I, too, tried to write an annotation processor and compile it with Maven. Addinng the line did the trick.
I'm running Jbehave maven plugin with run-stories-with-annotated-embedder. But when any scenario fails, then stop all the other scenarios. But I would like to run all the scenarios and then do a report with the scenarios that fails. Is it possible to do this ??
I setup the jbehave strategy configuration to SilentlyAbsorbingFailure, and also I tryed ignoreFailureInStories option... but it dosen't work for me. I think I am missing something.
This is my maven execution code when fails:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Consumer Regression Test Suite .................... SUCCESS [0.591s]
[INFO] Customer Regression Test Suite Commons module ..... SUCCESS [2.678s]
[INFO] Customer Regression Test Suite Core module ........ FAILURE [25:24.539s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25:28.081s
[INFO] Finished at: Mon Dec 16 15:42:02 CET 2013
[INFO] Final Memory: 71M/664M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:3.7.4:run-stories-with- annotated-embedder (embeddable-stories) on project consumer-regression-test-suite-core: Failed to run stories with annotated embedder runner: Annotated embedder run failed with runner org.jbehave.core.junit.spring.SpringAnnotatedEmbedderRunner#72f4abb9: Failures in running stories: ReportsCount[stories=2,storiesNotAllowed=0,storiesPending=0,scenarios=16,scenariosFailed=2, scenariosNotAllowed=0,scenariosPending=0,stepsFailed=2] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jbehave:jbehave-maven-plugin:3.7.4:run-stories-with-annotated-embedder (embeddable- stories) on project consumer-regression-test-suite-core: Failed to run stories with annotated embedder runner
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run stories with annotated embedder runner
at org.jbehave.mojo.RunStoriesWithAnnotatedEmbedderRunner.execute(RunStoriesWithAnnotatedEmbedderRunner.java:23)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.jbehave.core.embedder.Embedder$AnnotatedEmbedderRunFailed: Annotated embedder run failed with runner org.jbehave.core.junit.spring.SpringAnnotatedEmbedderRunner#72f4abb9
at org.jbehave.core.embedder.Embedder.runStoriesWithAnnotatedEmbedderRunner(Embedder.java:178)
at org.jbehave.mojo.RunStoriesWithAnnotatedEmbedderRunner.execute(RunStoriesWithAnnotatedEmbedderRunner.java:21)
... 21 more
Caused by: org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in running stories: ReportsCount[stories=2,storiesNotAllowed=0,storiesPending=0,scenarios=16,scenariosFailed=2,scenariosNotAllowed=0,scenariosPending=0,stepsFailed=2]
at org.jbehave.core.embedder.Embedder$ThrowingRunningStoriesFailed.handleFailures(Embedder.java:499)
at org.jbehave.core.embedder.Embedder.handleFailures(Embedder.java:265)
at org.jbehave.core.embedder.Embedder.generateReportsView(Embedder.java:252)
at org.jbehave.core.embedder.Embedder.generateReportsView(Embedder.java:233)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:212)
at nl.tele2.crts.core.business.configuration.CommonsStoryConfiguration.run(CommonsStoryConfiguration.java:89)
at org.jbehave.core.embedder.Embedder.runStoriesWithAnnotatedEmbedderRunner(Embedder.java:173)
... 22 more
[ERROR]
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :consumer-regression-test-suite-core
My Maven configuration:
...
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-maven-plugin</artifactId>
<version>${jbehave.version}</version>
<executions>
<execution>
<id>unpack-view-resources</id>
<phase>process-resources</phase>
<goals>
<goal>unpack-view-resources</goal>
</goals>
</execution>
<execution>
<id>embeddable-stories</id>
<phase>test</phase>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<scope>test</scope>
<includes>
<include>**/Order1Story.java</include>
<include>**/Order2Story.java</include>
<include>**/Order3Story.java</include>
<include>**/Order4Story.java</include>
</includes>
<generateViewAfterStories>true</generateViewAfterStories>
</configuration>
<goals>
<goal>run-stories-with-annotated-embedder</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
</dependencies>
</plugin>
</plugins>
My Story class:
#RunWith(SpringAnnotatedEmbedderRunner.class)
#Configure()
#UsingEmbedder(embedder = Embedder.class, generateViewAfterStories = true, ignoreFailureInStories = false, ignoreFailureInView = false, storyTimeoutInSecs = 1200)
#UsingSpring(resources = { "classpath:crts-application-context.xml",
"classpath:steps/dsl/crts-jbehave-commons-dsl-configuration- steps.xml",
"classpath:steps/dsl/crts-jbehave-order-dsl-steps- context.xml" })
public class Order1Story extends CommonsStoryConfiguration {
protected List<String> storyPaths() {
return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(),
asList("**/" + System.getProperty("storyFilter", "*") + "order/dsl/order- 1P-dsl*.story"), null);
}
}
Configuration class:
public abstract class CommonsStoryConfiguration extends InjectableEmbedder {
#Test
public void run() throws Throwable {
final CrossReference crossReference =
new CrossReference().withJsonOnly().withOutputAfterEachStory(true).excludingStoriesWithNoExecutedScenarios(true);
final SeleniumContext seleniumContext = new SeleniumContext();
// Step Monitor
// final ContextView contextView = new LocalFrameContextView().sized(640, 120);
// final SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView,
// seleniumContext, crossReference.getStepMonitor());
// Formatting
final Format[] formats = new Format[] { new SeleniumContextOutput(seleniumContext), CONSOLE, HTML };
// StoryRporterBuilder
final StoryReporterBuilder reporterBuilder = new StoryReporterBuilder();
reporterBuilder.withCodeLocation(codeLocationFromClass(CommonsStoryConfiguration.class));
reporterBuilder.withFailureTrace(true);
reporterBuilder.withFailureTraceCompression(true);
reporterBuilder.withDefaultFormats();
reporterBuilder.withFormats(formats);
reporterBuilder.withCrossReference(crossReference);
// PatternParser
final RegexPrefixCapturingPatternParser stepPatternParser = new RegexPrefixCapturingPatternParser("$");
// Parameter converter
final DateConverter dateConverter = new DateConverter(new SimpleDateFormat("yyyy-MM-dd"));
final ParameterConverters parameterConverters = new ParameterConverters();
parameterConverters.addConverters(dateConverter);
// Failure Strategy
final FailureStrategy strategy = new SilentlyAbsorbingFailure();
// Story Control
final StoryControls storyControls = new StoryControls();
storyControls.doDryRun(false);
storyControls.doSkipScenariosAfterFailure(false);
// Configuration
final Configuration configuration = injectedEmbedder().configuration();
configuration.useStoryLoader(new LoadFromClasspath(CommonsStoryConfiguration.class));
configuration.useStoryReporterBuilder(reporterBuilder);
configuration.useStepPatternParser(stepPatternParser);
configuration.useParameterConverters(parameterConverters);
configuration.useFailureStrategy(strategy);
configuration.useStoryControls(storyControls);
// configuration.useStepMonitor(stepMonitor);
injectedEmbedder().runStoriesAsPaths(storyPaths());
}
protected abstract List<String> storyPaths();
}
Thanks in advance,
For continue running scenarios, set
ignoreFailureInStories=true
See How do I make JBehave ignore failed scenarios?
I have an akka maven project and I want to run unit test it.
I have defined the test class but when I run it I have an error displayed.
the actor class code snippet is given below :
public class WorkerActor extends UntypedActor {
#Override
public void onReceive(Object msg) throws Exception {
if(msg instanceof GesturePoints)
{ GesturePoints message = (GesturePoints) msg;
Result rslt = initial_Theta(message);
getSender().tell(rslt);
}
else {unhandled(msg);}
}
public Result initial_Theta(GesturePoints p)
{
Result result = new Result();
if(p.getPoints().get("x").size() < 3) //The number of x coordinates as size
{ return null;}
dx = (double) ((Integer)p.getPoints().get("x").get(2) - (Integer)p.getPoints().get("x").get(0)) ;
dy = ((Double)p.getPoints().get("y").get(2)) - ((Double)p.getPoints().get("y").get(0));
{
result.setResult("feature1", initial_cos);
result.setResult("feature2", initial_sin);
}
return result;
}
}
the test class is given in the code below
public class ActorTest {
TestKit testKit;
TestActorRef<WorkerActor> testedActor ;
TestProbe tProbe;
#Before
public void setUp()
{
testKit = new TestKit(ActorSystem.apply());
tProbe = TestProbe.apply(testKit.system());
testedActor = TestActorRef.apply(new Props(new UntypedActorFactory()
{
public WorkerActor create()
{
return new WorkerActor();
}
}),testKit.system());
}
#Test
public void testWorkerActor()
{
ArrayList<Object> x = new ArrayList<Object>();
ArrayList<Object> y = new ArrayList<Object>();
x.add(0, 1); x.add(1, 2); x.add(2, 3); x.add(3, 4); x.add(4, 5);
y.add(0, 1.00); y.add(1, 2.00); y.add(2, 3.00); y.add(3, 4.00); y.add(4, 5.00);
Map<String, ArrayList<Object>> map = new HashMap<String, ArrayList<Object>>();
map.put("x", x);
map.put("y", y);
GesturePoints gp = new GesturePoints();
gp.setPoints(map);
tProbe = TestProbe.apply(testKit.system());
testedActor.tell(gp , tProbe.ref());
TestActor.Message message = tProbe.lastMessage();
Result result = (Result)message;
assertEquals(0.25 , result.getResult().get("x"));
assertEquals(0.25 , result.getResult().get("y"));
}
}
the maven also contain a default test class. Both the efault testclass and the Actortest class are located in the src/test/java folder.
this is the pom file
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.theta.gesture</groupId>
<artifactId>com-theta-gesture</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>com-theta-gesture</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>Com.RubineEngine.GesturePoints</groupId>
<artifactId>Com-RubineEngine-GesturePoints</artifactId>
<version>1.0-SANPSHOT</version>
</dependency>
<dependency>
<groupId>com.result.gesture</groupId>
<artifactId>com-result-gesture</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-kernel</artifactId>
<version>2.0.2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>typesafe</id>
<name>Typesafe Repository</name>
<url>http://repo.typesafe.com/typesafe/releases/</url>
</repository>
<repository>
<id>repo</id>
<name>repo</name>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>file://${project.basedir}/repo</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.12.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
the error message is given below
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building com-theta-gesture 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # com-theta-gesture ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # com-theta-gesture ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) # com-theta-gesture ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\FAISAL\Desktop\disaster\com-theta-gesture\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # com-theta-gesture ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # com-theta-gesture ---
[WARNING] The POM for org.apache.maven:maven-plugin-api:jar:2.0.9 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.maven:maven-artifact:jar:2.0.9 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.maven:maven-project:jar:2.0.9 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.maven:maven-core:jar:2.0.9 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.maven:maven-toolchain:jar:2.0.9 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Surefire report directory: C:\Users\FAISAL\Desktop\disaster\com-theta-gesture\target\surefire-reports
[INFO] Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Running com.theta.gesture.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running com.theta.gesture.ActorTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.562 sec <<< FAILURE!
testWorkerActor(com.theta.gesture.ActorTest) Time elapsed: 0.002 sec <<< ERROR!
java.lang.ClassCastException: akka.testkit.TestActor$NullMessage$ cannot be cast to com.result.gesture.Result
at com.theta.gesture.ActorTest.testWorkerActor(ActorTest.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:62)
at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:139)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Results :
Tests in error:
testWorkerActor(com.theta.gesture.ActorTest): akka.testkit.TestActor$NullMessage$ cannot be cast to com.result.gesture.Result
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.098s
[INFO] Finished at: Tue Oct 23 05:24:12 BST 2012
[INFO] Final Memory: 16M/106M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project com-theta-gesture: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\FAISAL\Desktop\disaster\com-theta-gesture\target\surefire-reports for the individual test results.
[ERROR] -> [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/MojoFailureException
Do I have to add any configuration to the application.conf file
hope somebody will help me out.
In your ActorTest, try replacing
TestActor.Message message = tProbe.lastMessage();
Result result = (Result)message;
With this:
tProbe.expectMsgClass(Result.class);
//TestActor.Message message = tProbe.lastMessage();
//Result result = (Result) message.msg(); <- Important
Then change WorkerActor to this:
if(msg instanceof GesturePoints) {
GesturePoints message = (GesturePoints) msg;
//Result rslt = initial_Theta(message);
//getSender().tell(rslt);
getSender().tell(new Result());
}
That should pass. This verifies that WorkerActor is sending back the right type of message (e.g. a Result).
The next step is to uncomment your call to initial_Theta() and figure out why that is not populating the Result correctly.