How to use jaxb2-annotate-plugin with XJC in command line - xsd

I'm building java classes based on an xsd using "jaxb-ri" in command line (xjc.bat).
I want to set a namespace in an XmlType annotation using jaxb2-annotate_plugin but I don't know how to add this plugin to xjc classpath and acitvate it.
here is my external bindings.xjb file :
<jxb:bindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:annox="http://annox.dev.java.net"
jxb:extensionBindingPrefixes="xjc annox"
version="2.1">
<jxb:bindings schemaLocation="myschema.xsd" node="/xs:schema">
<jxb:bindings node="xs:complexType[#name='MyType]">
<annox:annotateClass>#javax.xml.bind.annotation.XmlType(namespace="urn:myschematwo")</annox:annotateClass>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
My command line is :
D:/jaxb-ri/bin/xjc.bat -p "com.jaxb.mypackage" -d
"D:/myproject/src/main/java" D:/myschema.xsd -b "D:/bindings.xjb"
-extension
When I execute this command, I have an error message saying that "http://annox.dev.java.net" is not supported.
Thanks in advance.

Disclaimer: I'm the author of jaxb2-annotate-plugin.
First, I don't provide sample for command line as (as far as I know) nobody uses command line or batch scripts for schema compilation. At least up to date there were no requests for that. There are samples for Ant and Maven, the one for Ant is the closes to the command line usage.
Next, I wonder what is in xjc.bat.
If it calls xjc.exe from Java distibution, this most probably won't work with third-party plugins at all, not just with the jaxb2-annotate-plugin. The reason is that the XJC version which is distributed with Java has a renamed package: com.sun.tools.** -> com.sun.tools.internal.**. This breaks, naturally compagtibility with plugins. So please make sure xjc.bat does not call the xjc.exe contained in the Java distro.
I hope xjc.bat calls com.sun.tools.xjc.XJCFacade from JAXB RI Jars.
To execute the plugin you'll need two things:
Include all the required dependencies to the classpath.
Turn the plugin on using -Xannotate command line parameter.
These dependencies are:
<!-- JAXB2 Basics library -->
<include name="jaxb2-basics-*.jar"/>
<include name="jaxb2-basics-annotate*.jar"/>
<!-- JAXB2 Basics library dependencies -->
<include name="annox-*.jar"/>
<include name="javaparser-*.jar"/>
<include name="commons-beanutils-*.jar"/>
<include name="commons-logging-*.jar"/>
<include name="commons-lang3-*.jar"/>
Here's the full dependency tree (with versions):
[INFO] org.jvnet.jaxb2_commons:jaxb2-basics-annotate:jar:1.0.3-SNAPSHOT
[INFO] +- org.jvnet.jaxb2_commons:jaxb2-basics-tools:jar:0.8.1:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.2.7:provided
[INFO] | +- com.sun.xml.bind:jaxb-core:jar:2.2.7:provided
[INFO] | | +- javax.xml.bind:jaxb-api:jar:2.2.11:provided
[INFO] | | \- com.sun.istack:istack-commons-runtime:jar:2.16:provided
[INFO] | \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.12:provided
[INFO] | \- javax.xml.bind:jsr173_api:jar:1.0:provided
[INFO] +- com.sun.xml.bind:jaxb-xjc:jar:2.2.7:provided
[INFO] +- org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-testing:jar:0.9.0:test
[INFO] | \- org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:0.9.0:test
[INFO] | +- org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-core:jar:0.9.0:test
[INFO] | | +- com.sun.org.apache.xml.internal:resolver:jar:20050927:test
[INFO] | | +- org.apache.maven:maven-plugin-api:jar:2.0.9:test
[INFO] | | +- org.sonatype.plexus:plexus-build-api:jar:0.0.7:test
[INFO] | | \- org.apache.maven:maven-project:jar:2.0.9:test
[INFO] | | +- org.apache.maven:maven-settings:jar:2.0.9:test
[INFO] | | +- org.apache.maven:maven-profile:jar:2.0.9:test
[INFO] | | +- org.apache.maven:maven-model:jar:2.0.9:test
[INFO] | | +- org.apache.maven:maven-artifact-manager:jar:2.0.9:test
[INFO] | | | +- org.apache.maven:maven-repository-metadata:jar:2.0.9:test
[INFO] | | | \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:test
[INFO] | | +- org.apache.maven:maven-plugin-registry:jar:2.0.9:test
[INFO] | | \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:test
[INFO] | | \- classworlds:classworlds:jar:1.1-alpha-2:test
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:1.5.15:test
[INFO] | +- org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.9.0:test
[INFO] | \- org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2:test
[INFO] | \- org.apache.maven:maven-artifact:jar:3.0:test
[INFO] +- org.jvnet.annox:annox:jar:1.0.1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] | +- commons-io:commons-io:jar:1.2:compile
[INFO] | \- com.google.code.javaparser:javaparser:jar:1.0.11:compile
[INFO] \- junit:junit:jar:4.11:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
Maven stuff is unrelated, otherwise you should be able to see the versions.
Hope this helps.
To be honest, I am a bit reluctant to invest time in batch/command-line sample. But if you'll get one working, I'd add it to samples.
Why do you actually need it in the command line?

Related

maven jaxb2 plugin is generating nothing

It's not clear to me if I'm able to use maven-jaxb2-plugin on a jdk11 maven project.
My pom.xml and mvn are using jdk11.
I know jaxb is not distributed with jdk 11.
I'm trying to generate code from wsdl:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generateDirectory>${project.basedir}/src/main/java/generated-sources/kenexa</generateDirectory>
<generatePackage>com.baeldung.springsoap.client.gen</generatePackage>
<schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
<noFileHeader>true</noFileHeader>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
</configuration>
</plugin>
I'm getting:
$ mvn generate-sources
[INFO] Scanning for projects...
[INFO]
[INFO] ------------< cat.catsalut.hes.visor:hes-visor-api-service >------------
[INFO] Building Visor HES 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-jaxb2-plugin:0.14.0:generate (default) # hes-visor-api-service ---
[INFO] Latest timestamp of the source resources is [2021-01-13 16:40:21.396], earliest timestamp of the target resources is [2021-01-13 16:40:28.828].
[INFO] Sources are up-to-date, XJC will be skipped.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.616 s
[INFO] Finished at: 2021-01-13T16:40:40+01:00
[INFO] ------------------------------------------------------------------------
```
Any ideas?

How to put data in Ignite Cache from Spark

I managed several spark jobs to compute RDD and in the end, I would like to put some of these data in an Ignite Cache. Unfortunately, I have got an error :
Java.lang.ClassCastException: org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl cannot be cast to org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy
[info] at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.equals(GatewayProtectedCacheProxy.java:1715)
[info] at scala.collection.mutable.FlatHashTable$class.findElemImpl(FlatHashTable.scala:131)
[info] at scala.collection.mutable.FlatHashTable$class.containsElem(FlatHashTable.scala:124)
[info] at scala.collection.mutable.HashSet.containsElem(HashSet.scala:40)
[info] at scala.collection.mutable.HashSet.contains(HashSet.scala:57)
[info] at org.apache.spark.serializer.SerializationDebugger$SerializationDebugger.visit(SerializationDebugger.scala:87)
[info] at org.apache.spark.serializer.SerializationDebugger$SerializationDebugger.visitExternalizable(SerializationDebugger.scala:142)
[info] at org.apache.spark.serializer.SerializationDebugger$SerializationDebugger.visit(SerializationDebugger.scala:104)
[info] at org.apache.spark.serializer.SerializationDebugger$SerializationDebugger.visitSerializable(SerializationDebugger.scala:206)
[info] at org.apache.spark.serializer.SerializationDebugger$SerializationDebugger.visit(SerializationDebugger.scala:108)
[info] at org.apache.spark.serializer.SerializationDebugger$.find(SerializationDebugger.scala:67)
[info] at org.apache.spark.serializer.SerializationDebugger$.improveException(SerializationDebugger.scala:41)
[info] at org.apache.spark.serializer.JavaSerializationStream.writeObject(JavaSerializer.scala:46)
[info] at org.apache.spark.serializer.JavaSerializerInstance.serialize(JavaSerializer.scala:100)
[info] at org.apache.spark.util.ClosureCleaner$.ensureSerializable(ClosureCleaner.scala:400)
[info] at org.apache.spark.util.ClosureCleaner$.org$apache$spark$util$ClosureCleaner$$clean(ClosureCleaner.scala:393)
[info] at org.apache.spark.util.ClosureCleaner$.clean(ClosureCleaner.scala:162)
[info] at org.apache.spark.SparkContext.clean(SparkContext.scala:2326)
[info] at org.apache.spark.rdd.RDD$$anonfun$map$1.apply(RDD.scala:371)
[info] at org.apache.spark.rdd.RDD$$anonfun$map$1.apply(RDD.scala:370)
[info] at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
[info] at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
[info] at org.apache.spark.rdd.RDD.withScope(RDD.scala:363)
[info] at org.apache.spark.rdd.RDD.map(RDD.scala:370).........
So my question is how to put data coming from spark rdd in specific Ignite Cache, in our case, an Ignite Cache with 3rd persistence cache store implemented on Postgres?

I am trying to build the spark to be able to run the programs, however it does not seem to work

I am trying to build the spark to be able to run the programs, however it does not seem to work.
This is what happens when I try to run sample program in spark:
hduser_#ankit-sve14137cnb:/usr/local/spark$ ./bin/run-example SparkPi 10
Failed to find Spark examples assembly in /usr/local/spark/lib or /usr/local/spark/examples/target
You need to build Spark before running this program
hduser_#ankit-sve14137cnb:/usr/local/spark$ sudo build/mvn -e -Pyarn -Phadoop-2.6 -Dhadoop.version=2.6.0 -DskipTests clean package
Using `mvn` from path: /usr/bin/mvn
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] Reactor Build Order:
[INFO]
[INFO] Spark Project Parent POM
[INFO] Spark Project Test Tags
[INFO] Spark Project Launcher
[INFO] Spark Project Networking
[INFO] Spark Project Shuffle Streaming Service
[INFO] Spark Project Unsafe
[INFO] Spark Project Core
[INFO] Spark Project Bagel
[INFO] Spark Project GraphX
[INFO] Spark Project Streaming
[INFO] Spark Project Catalyst
[INFO] Spark Project SQL
[INFO] Spark Project ML Library
[INFO] Spark Project Tools
[INFO] Spark Project Hive
[INFO] Spark Project Docker Integration Tests
[INFO] Spark Project REPL
[INFO] Spark Project YARN Shuffle Service
[INFO] Spark Project YARN
[INFO] Spark Project Assembly
[INFO] Spark Project External Twitter
[INFO] Spark Project External Flume Sink
[INFO] Spark Project External Flume
[INFO] Spark Project External Flume Assembly
[INFO] Spark Project External MQTT
[INFO] Spark Project External MQTT Assembly
[INFO] Spark Project External ZeroMQ
[INFO] Spark Project External Kafka
[INFO] Spark Project Examples
[INFO] Spark Project External Kafka Assembly
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark Project Parent POM 1.6.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # spark-parent_2.10 ---
[INFO] Deleting /usr/local/spark/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) # spark-parent_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:add-source (eclipse-add-source) # spark-parent_2.10 ---
[INFO] Add Source directory: /usr/local/spark/src/main/scala
[INFO] Add Test Source directory: /usr/local/spark/src/test/scala
[INFO]
[INFO] --- maven-dependency-plugin:2.10:build-classpath (default-cli) # spark-parent_2.10 ---
[INFO] Dependencies classpath:
/root/.m2/repository/org/spark-project/spark/unused/1.0.0/unused-1.0.0.jar
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # spark-parent_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-parent_2.10 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (create-tmp-dir) # spark-parent_2.10 ---
[INFO] Executing tasks
main:
[mkdir] Created dir: /usr/local/spark/target/tmp
[INFO] Executed tasks
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:testCompile (scala-test-compile-first) # spark-parent_2.10 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-dependency-plugin:2.10:build-classpath (default) # spark-parent_2.10 ---
[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) # spark-parent_2.10 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.6:test-jar (prepare-test-jar) # spark-parent_2.10 ---
[INFO] Building jar: /usr/local/spark/target/spark-parent_2.10-1.6.1-tests.jar
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) # spark-parent_2.10 ---
[INFO]
[INFO] --- maven-shade-plugin:2.4.1:shade (default) # spark-parent_2.10 ---
[INFO] Including org.spark-project.spark:unused:jar:1.0.0 in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO]
[INFO] --- maven-source-plugin:2.4:jar-no-fork (create-source-jar) # spark-parent_2.10 ---
[INFO]
[INFO] --- maven-source-plugin:2.4:test-jar-no-fork (create-source-jar) # spark-parent_2.10 ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark Project Test Tags 1.6.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # spark-test-tags_2.10 ---
[INFO] Deleting /usr/local/spark/tags/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) # spark-test-tags_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:add-source (eclipse-add-source) # spark-test-tags_2.10 ---
[INFO] Add Source directory: /usr/local/spark/tags/src/main/scala
[INFO] Add Test Source directory: /usr/local/spark/tags/src/test/scala
[INFO]
[INFO] --- maven-dependency-plugin:2.10:build-classpath (default-cli) # spark-test-tags_2.10 ---
[INFO] Dependencies classpath:
/root/.m2/repository/org/scala-lang/scala-reflect/2.10.5/scala-reflect-2.10.5.jar:/root/.m2/repository/org/spark-project/spark/unused/1.0.0/unused-1.0.0.jar:/root/.m2/repository/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.jar:/root/.m2/repository/org/scalatest/scalatest_2.10/2.2.1/scalatest_2.10-2.2.1.jar
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # spark-test-tags_2.10 ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spark-test-tags_2.10 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /usr/local/spark/tags/src/main/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-test-tags_2.10 ---
[INFO] Using zinc server for incremental compilation
[error] Required file not found: scala-compiler-2.10.5.jar
[error] See zinc -help for information about locating necessary files
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [ 3.566 s]
[INFO] Spark Project Test Tags ............................ FAILURE [ 0.466 s]
[INFO] Spark Project Launcher ............................. SKIPPED
[INFO] Spark Project Networking ........................... SKIPPED
[INFO] Spark Project Shuffle Streaming Service ............ SKIPPED
[INFO] Spark Project Unsafe ............................... SKIPPED
[INFO] Spark Project Core ................................. SKIPPED
[INFO] Spark Project Bagel ................................ SKIPPED
[INFO] Spark Project GraphX ............................... SKIPPED
[INFO] Spark Project Streaming ............................ SKIPPED
[INFO] Spark Project Catalyst ............................. SKIPPED
[INFO] Spark Project SQL .................................. SKIPPED
[INFO] Spark Project ML Library ........................... SKIPPED
[INFO] Spark Project Tools ................................ SKIPPED
[INFO] Spark Project Hive ................................. SKIPPED
[INFO] Spark Project Docker Integration Tests ............. SKIPPED
[INFO] Spark Project REPL ................................. SKIPPED
[INFO] Spark Project YARN Shuffle Service ................. SKIPPED
[INFO] Spark Project YARN ................................. SKIPPED
[INFO] Spark Project Assembly ............................. SKIPPED
[INFO] Spark Project External Twitter ..................... SKIPPED
[INFO] Spark Project External Flume Sink .................. SKIPPED
[INFO] Spark Project External Flume ....................... SKIPPED
[INFO] Spark Project External Flume Assembly .............. SKIPPED
[INFO] Spark Project External MQTT ........................ SKIPPED
[INFO] Spark Project External MQTT Assembly ............... SKIPPED
[INFO] Spark Project External ZeroMQ ...................... SKIPPED
[INFO] Spark Project External Kafka ....................... SKIPPED
[INFO] Spark Project Examples ............................. SKIPPED
[INFO] Spark Project External Kafka Assembly .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.128 s
[INFO] Finished at: 2016-04-02T22:46:45+05:30
[INFO] Final Memory: 38M/223M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-test-tags_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed. CompileFailed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-test-tags_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile 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: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:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
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.apache.maven.plugin.PluginExecutionException: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: Compile failed via zinc server
at sbt_inc.SbtIncrementalCompiler.zincCompile(SbtIncrementalCompiler.java:136)
at sbt_inc.SbtIncrementalCompiler.compile(SbtIncrementalCompiler.java:86)
at scala_maven.ScalaCompilerSupport.incrementalCompile(ScalaCompilerSupport.java:303)
at scala_maven.ScalaCompilerSupport.compile(ScalaCompilerSupport.java:119)
at scala_maven.ScalaCompilerSupport.doExecute(ScalaCompilerSupport.java:99)
at scala_maven.ScalaMojoSupport.execute(ScalaMojoSupport.java:482)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
[ERROR]
[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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :spark-test-tags_2.10
I do have the latest maven:
hduser_#ankit-sve14137cnb:/usr/local$ mvn -version
Apache Maven 3.3.3
Maven home: /usr/share/maven
Java version: 1.8.0_77, vendor: Oracle Corporation
Java home: /home/ankit/Downloads/jdk1.8.0_77/jre
Default locale: en_IN, platform encoding: UTF-8
Below are the paths mentioned in my bashrc file:
export JAVA_HOME=/home/ankit/Downloads/jdk1.8.0_77
export HADOOP_HOME=/home/ankit/Downloads/hadoop
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
#export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
export HADOOP_INSTALL=$HADOOP_HOME
export HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$HADOOP_HOME/lib/native"
export CASSANDRA_HOME =$CASSANDRA_HOME:/home/hduser_/cassandra
#export PATH = $PATH:$CASSANDRA_HOME/bin
export SCALA_HOME = $SCALA_HOME:/usr/local/scala
export PATH = $SCALA_HOME/bin:$PATH
I am new to SOF,could someone please advise?
In Maven 3 if you just had a failed download and have fixed it (e.g. by uploading the jar toa repository) it will cache the failure. To force a refresh add -U to the command line. Try refreshing and let me know how it'll go.
If you have already failed build once you need to force refresh with maven 3 : The command should be (note the -U option):
mvn -U -DskipTests clean package

org.xml.sax.SAXException: No tag "outputScript" defined in tag library associated with uri "http://java.sun.com/jsf/html"

After updating from JSF 1.2 to JSF 2.0 we faced a problem that there is no JSF 2.0 tags can be found in the tags library. in spite of removing all JSF 1.2 dependencies (replacing scope compile to scope provided in common projects but there are still depend on JSF 1.2 but with scope provided) it doesn't work anyway.
The StackTrace:
org.xml.sax.SAXException: No tag "outputScript" defined in tag library associated with uri "http://java.sun.com/jsf/html"
org.apache.jasper.compiler.JspDocumentParser.parseCustomAction(JspDocumentParser.java:1179)
org.apache.jasper.compiler.JspDocumentParser.startElement(JspDocumentParser.java:400)
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:174)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:568)
javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:363)
com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:153)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
org.apache.jsp.home_jsp._jspx_meth_security_005fauthorize_005f1(home_jsp.java:131)
org.apache.jsp.home_jsp._jspService(home_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
Here is my web.xml:
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.application.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext-admin-dao.xml
/WEB-INF/applicationContext-admin-security.xml
</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>emeraldTown</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.enableControlSkinning</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.sendPoweredByHeader</param-name>
<param-value>false</param-value>
</context-param>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/j_spring_security_check</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
<!--<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>-->
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.security.ui.session.HttpSessionEventPublisher
</listener-class>
</listener>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<!--<error-page>
<error-code>404</error-code>
<location>/404.html</location>
</error-page>-->
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/index.jsp</location>
</error-page>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
mvn dependency:tree give the following
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building admin 1.25
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # admin ---
[INFO] +- net.kencochrane.raven:raven:jar:5.0.1:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.4.2:compile
[INFO] +- net.kencochrane.raven:raven-log4j2:jar:5.0.1:compile
[INFO] +- org.testng:testng:jar:jdk15:4.7:test
[INFO] | +- qdox:qdox:jar:1.5:test
[INFO] | \- bsh:bsh:jar:2.0b1:test
[INFO] +- jdbcappender:jdbcappender:jar:2.1.01:compile
[INFO] +- commons-lang:commons-lang:jar:2.4:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- commons-io:commons-io:jar:1.4:compile
[INFO] +- commons-collections:commons-collections:jar:3.2:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.2.1:compile
[INFO] | +- commons-pool:commons-pool:jar:1.2:compile
[INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- commons-discovery:commons-discovery:jar:0.4:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided
[INFO] +- javax.servlet.jsp:jsp-api:jar:2.1:provided
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- com.sun.faces:jsf-api:jar:2.1.29-01:compile
[INFO] +- com.sun.faces:jsf-impl:jar:2.1.29-01:compile
[INFO] +- el-impl:el-impl:jar:1.0:compile
[INFO] +- aspectj:aspectjrt:jar:1.5.3:compile
[INFO] +- aspectj:aspectjweaver:jar:1.5.3:compile
[INFO] +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] +- jfree:jcommon:jar:1.0.12:compile
[INFO] +- org.springframework:spring-web:jar:2.5.5:compile
[INFO] | \- org.springframework:spring-context:jar:2.5.5:compile
[INFO] +- org.springframework:spring-jdbc:jar:2.5.5:compile
[INFO] | \- org.springframework:spring-tx:jar:2.5.5:compile
[INFO] +- org.springframework:spring-dao:jar:2.0.8:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework:spring-orm:jar:2.5.5:compile
[INFO] +- org.springframework:spring-support:jar:2.0.8:compile
[INFO] +- org.springframework.security:spring-security-core:jar:2.0.4:compile
[INFO] | +- org.springframework:spring-aop:jar:2.5.5:compile
[INFO] | \- commons-codec:commons-codec:jar:1.3:compile
[INFO] +- org.springframework.security:spring-security-taglibs:jar:2.0.3:compile
[INFO] | \- org.springframework.security:spring-security-acl:jar:2.0.3:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.3.1.GA:compile
[INFO] | +- antlr:antlr:jar:2.7.6:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- javax.transaction:jta:jar:1.1:compile
[INFO] +- org.hibernate:hibernate-annotations:jar:3.4.0.GA:compile
[INFO] | \- org.hibernate:ejb3-persistence:jar:1.0.2.GA:compile
[INFO] +- org.hibernate:hibernate-commons-annotations:jar:3.3.0.ga:compile
[INFO] | +- org.hibernate:hibernate:jar:3.2.1.ga:compile
[INFO] | | +- net.sf.ehcache:ehcache:jar:1.2.3:compile
[INFO] | | +- asm:asm-attrs:jar:1.5.3:compile
[INFO] | | +- cglib:cglib:jar:2.1_3:compile
[INFO] | | \- asm:asm:jar:1.5.3:compile
[INFO] | \- javax.persistence:persistence-api:jar:1.0:compile
[INFO] +- el-functors:el-functors:jar:1.0.3:runtime
[INFO] +- javassist:javassist:jar:3.10.0.GA:runtime
[INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] +- org.richfaces:richfaces:jar:4.5.2.Final:compile
[INFO] | +- org.richfaces:richfaces-core:jar:4.5.2.Final:compile
[INFO] | | +- net.sourceforge.cssparser:cssparser:jar:0.9.14:compile
[INFO] | | | \- org.w3c.css:sac:jar:1.3:compile
[INFO] | | \- com.google.guava:guava:jar:18.0:compile
[INFO] | \- org.richfaces:richfaces-a4j:jar:4.5.2.Final:compile
[INFO] +- postgresql:postgresql:jar:8.3-603.jdbc4:runtime
[INFO] +- javax.mail:mail:jar:1.4.1:compile
[INFO] +- quartz:quartz:jar:1.5.2:compile
[INFO] +- org.freemarker:freemarker:jar:2.3.9:compile
[INFO] +- junit:junit:jar:4.5:test
[INFO] +- avalon-framework:avalon-framework:jar:4.1.3:compile
[INFO] +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.1:compile
[INFO] | \- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] +- javax.annotation:jsr250-api:jar:1.0:compile

Attempting to build RQB from source getting assert error from testJsList

LOVE RQB!!, I want to get the source building. I have cloned the repo with git and I believe I have downloaded and have all of the bits installedbut when I run "mvn clean install" it goes through some machinations, then finally fails with the following
Failed tests:
[INFO] testJsList(com.redspr.redquerybuilder.js.client.GwtTestBasics)
Here is the output from the stack:
[INFO] Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.325 sec <<< FAILURE!
[INFO] testJsList(com.redspr.redquerybuilder.js.client.GwtTestBasics) Time elapsed: 0.047 sec <<< FAILURE!
[INFO] junit.framework.AssertionFailedError: Remote test failed at 127.0.0.1 / Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19
[INFO] expected: <22>, actual: <14>
[INFO] at junit.framework.Assert.fail(Assert.java:193)
[INFO] at junit.framework.Assert.failNotEquals(Assert.java:198)
[INFO] at junit.framework.Assert.assertEquals(Assert.java:94)
[INFO] at junit.framework.Assert.assertEquals(Assert.java:43)
[INFO] at com.redspr.redquerybuilder.js.client.GwtTestBasics.testJsList(GwtTestBasics.java:192)
[INFO] at com.redspr.redquerybuilder.js.client.__GwtTestBasics_unitTestImpl.doRunTest(__GwtTestBasics_unitTestImpl.java:7)
[INFO] at junit.framework.TestCase.runTest(TestCase.java:62)
[INFO] at com.google.gwt.junit.client.GWTTestCase.runBare(GWTTestCase.java:188)
[INFO] at com.google.gwt.junit.client.GWTTestCase.__doRunTest(GWTTestCase.java:129)
[INFO] at com.google.gwt.junit.client.impl.GWTRunner.runTest(GWTRunner.java:390)
[INFO] at com.google.gwt.junit.client.impl.GWTRunner.doRunTest(GWTRunner.java:318)
[INFO] at com.google.gwt.junit.client.impl.GWTRunner.access$9(GWTRunner.java:312)
[INFO] at com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.onSuccess(GWTRunner.java:107)
[INFO] at com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.onSuccess(GWTRunner.java:1)
[INFO] at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
[INFO] at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
[INFO] at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
[INFO] at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:606)
[INFO] at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
[INFO] at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
[INFO] at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
[INFO] at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
[INFO] at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
[INFO] at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
[INFO] at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
[INFO] at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
[INFO] at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
[INFO] at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
[INFO] at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:249)
[INFO] at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:606)
[INFO] at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
[INFO] at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
[INFO] at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
[INFO] at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
[INFO] at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
[INFO] at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
[INFO] at java.lang.Thread.run(Thread.java:744)
This is a bug in the unit test of RedQueryBuilder 0.6.0 due to the unit test setting the time in UTC then testing the days, hours, minutes are the same in local time... Only true in the UK and Lisbon :( Fix should be in 0.7.0. Thanks for finding and raising the bug.

Resources