Cygnus 0.10 Docker container - fiware-cygnus

Following the guidelines provided in GITHub,
I have tried to get the jar files, but I'm getting the following errors.
sudo docker-compose -f ./docker/0.compose.jar-compiler.yml -p cygnus run --rm compiler
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cygnus 0.10.0
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact xml-apis:xml-apis:jar:1.2.01 has been relocated to xerces:xmlParserAPIs:jar:2.6.2
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # cygnus ---
[INFO] Deleting /cygnus-compiler/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # cygnus ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # cygnus ---
[INFO] Compiling 44 source files to /cygnus-compiler/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /cygnus-compiler/src/main/java/com/telefonica/iot/cygnus/backends/hdfs/HDFSBackendImpl.java:[40,7] error: HDFSBackendImpl is not abstract and does not override abstract method provisionHiveTable(FileFormat,String,String) in HDFSBackend
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.703 s
[INFO] Finished at: 2015-11-23T10:45:31+00:00
[INFO] Final Memory: 30M/352M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project cygnus: Compilation failure
[ERROR] /cygnus-compiler/src/main/java/com/telefonica/iot/cygnus/backends/hdfs/HDFSBackendImpl.java:[40,7] error: HDFSBackendImpl is not abstract and does not override abstract method provisionHiveTable(FileFormat,String,String) in HDFSBackend
[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
I run this command from the root of the repository:
docker-compose -f ./docker/0.compose.jar-compiler.yml -p cygnus run --rm compiler
Can anybody help me out on this?

Related

Maven error when trying to build?

I'm getting this error and I've tried Googling it, but nothing I've been trying seems to work. What could this be? (new to Maven)
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building FlarumRegister 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # flarumregistration ---
[INFO] Deleting C:\Users\***\workspace\flarumregistration\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # flarumregistration ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # flarumregistration ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to C:\Users\***\workspace\flarumregistration\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.320 s
[INFO] Finished at: 2017-06-09T17:19:28+02:00
[INFO] Final Memory: 8M/98M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project flarumregistration: Compilation failure -> [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

Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2

While compiling the Maven project the following error occured:
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-streaming-flume-sink_2.10 ---
[WARNING] Zinc server is not available at port 3030 - reverting to normal incremental compile
[INFO] Using incremental compilation
[INFO] Compiling 6 Scala sources and 3 Java sources to /home/gorlec/Desktop/test/external/flume-sink/target/scala-2.10/classes...
[ERROR] /home/gorlec/Desktop/test/external/flume-sink/src/main/scala/org/apache/spark/streaming/flume/sink/SparkAvroCallbackHandler.scala:47: identifier expected but 'with' found.
[ERROR] with Logging {
[ERROR] ^
[ERROR] one error found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.992s
[INFO] Finished at: Fri Apr 15 17:44:33 CEST 2016
[INFO] Final Memory: 25M/350M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-streaming-flume-sink_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed. CompileFailed ->
[Help 1]
[ERROR]
I removed the property <useZincServer>true</useZincServer> from pom.xml, and still the Logging error persists.
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-streaming-flume-sink_2.10 ---
[INFO] Using incremental compilation
[INFO] Compiling 6 Scala sources and 3 Java sources to /home/gorlec/Desktop/test/external/flume-sink/target/scala-2.10/classes...
[ERROR] /home/gorlec/Desktop/test/external/flume-sink/src/main/scala/org/apache/spark/streaming/flume/sink/SparkAvroCallbackHandler.scala:47: identifier expected but 'with' found.
[ERROR] with Logging {
[ERROR] ^
[ERROR] one error found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.814s
[INFO] Finished at: Fri Apr 15 17:41:00 CEST 2016
[INFO] Final Memory: 25M/335M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-streaming-flume-sink_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed. CompileFailed ->
[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.
I checked that PATH and JAVA_HOME are defined in ~/.bashrc as follows:
export PATH=$PATH:/usr/lib/jvm/java-7-openjdk-amd64/bin
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
The only issue that I noticed is that echo $JAVA_HOME gives an empty output, though I did source ~/.bashrc.
Any help is highly appreciated.
The problem could be this [INFO] Using incremental compilation
In your pom.xml try to remove the line <recompileMode>incremental</recompileMode>
and then try again.
It is strange echo $JAVA_HOME gives an empty output.While compling the Spakr Source,I import the mvn clean package success porject into eclipse,I meet the same problem.And I found the solution here:
How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds
I think you were compiling Spark with Scala 2.10. If so, you should do as follows.
cd /path/to/Spark
./dev/change-scala-version.sh 2.10
./build/mvn -Pyarn -Phadoop-2.4 -Dscala-2.10 -DskipTests clean package
Hope this helps.

(gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment

I try these tutorial https://cloud.google.com/tools/cloud-repositories/docs/push-to-deploy, and I do mvn gcloud:deploy,but got the error messages bellow:
[dev-jenkins-test-1] $ /bin/sh -xe /tmp/hudson4310631253025446569.sh
+ mvn gcloud:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jenkins-test-java 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) > package # jenkins-test-java >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # jenkins-test-java ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # jenkins-test-java ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) < package # jenkins-test-java <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) # jenkins-test-java ---
[INFO] Running gcloud app deploy...
[INFO] Running python -S /google/google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --quiet --project=straw-hat-pirates-dev preview app deploy /var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml
[INFO] WARNING: Soon, deployments will set the deployed version to receive all traffic by
[INFO] default.
[INFO]
[INFO] To keep the current behavior (where new deployments do not receive any traffic),
[INFO] use the `--no-promote` flag or run the following command:
[INFO]
[INFO] $ gcloud config set app/promote_by_default false
[INFO]
[INFO] To adopt the new behavior early, use the `--promote` flag or run the following
[INFO] command:
[INFO]
[INFO] $ gcloud config set app/promote_by_default true
[INFO]
[INFO] Either passing one of the new flags or setting one of these properties will
[INFO] silence this message.
[INFO]
[INFO] You are about to deploy the following modules:
[INFO] - straw-hat-pirates-dev/default (from [/var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml])
[INFO] Deployed URL: [https://20151223t054356-dot-straw-hat-pirates-dev.appspot.com]
[INFO] (add --promote if you also want to make this module available from
[INFO] [https://straw-hat-pirates-dev.appspot.com])
[INFO]
[INFO] Beginning deployment...
[INFO] Verifying that Managed VMs are enabled and ready.
[INFO]
[INFO] Provisioning remote build service.
[INFO] Copying certificates for secure access. You may be prompted to create an SSH keypair.
[INFO] Building and pushing image for module [default]
[INFO] ----------------------------- DOCKER BUILD OUTPUT ------------------------------
[INFO] Step 0 : FROM gcr.io/google_appengine/openjdk8
[INFO] ---> 3c058a018ce1
[INFO] Step 1 : ADD jenkins-test-java-1.0-SNAPSHOT.jar /app/
[INFO] ---> 938437aaa1a1
[INFO] Removing intermediate container 4106bc3645ca
[INFO] Step 2 : ENTRYPOINT java -jar /app/jenkins-test-java-1.0-SNAPSHOT.jar
[INFO] ---> Running in f187a76322dd
[INFO] ---> 4600e0f4d83a
[INFO] Removing intermediate container f187a76322dd
[INFO] Successfully built 4600e0f4d83a
[INFO] --------------------------------------------------------------------------------
[INFO]
[INFO] Updating module [default]...
[INFO] Updating module [default].../
[INFO] Updating module [default]...failed.
[INFO] ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
[INFO] Deleted [https://www.googleapis.com/compute/v1/projects/straw-hat-pirates-dev/zones/us-central1-f/instances/gae-builder-vm-20151223t054356].
[ERROR] Error: gcloud app command with exit code : 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:03 min
[INFO] Finished at: 2015-12-23T05:45:57+00:00
[INFO] Final Memory: 11M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) on project jenkins-test-java: Error: gcloud app command exit code is: 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
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I guess :
It seems like something wrong with my environment configuration.
I still cannot fix this problem.
Thank for your help. :)
I figured it out.
I'll bet your maven module is not setup with <packaging>war</packaging>
If your module is set to jar (default), then it tried to deploy as a standard java application where you are going to launch your own server. Since you want a managed vm with appengine running, you need to package as war, and then the plugin will take care of the rest.
Cheers.

How to set up a local DBpedia mirror

I am trying to set up a local DBpedia Information Extraction Framework, but there seems to have some problems which I cannot deal with. I followed the instructions on the official site using Intelli J, it went well until I get to the final step that tells "select DBpedia dump extraction ->Plugins -> scala ->scala:run", the error message shows below:
D:\program\jdk\bin\java -Dmaven.home=D:\program\apache-maven-3.0.5 -Dclassworlds.conf=D:\program\apache-maven-3.0.5\bin\m2.conf -Didea.launcher.port=7534 "-Didea.launcher.bin.path=D:\program\IntelliJ IDEA Community Edition 12.1.3\bin" -Dfile.encoding=UTF-8 -classpath "D:\program\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar;D:\program\IntelliJ IDEA Community Edition 12.1.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --fail-fast --strict-checksums org.scala-tools:maven-scala-plugin:2.15.2:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DBpedia Dump Extraction 3.8
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-scala-plugin:2.15.2:run (default-cli) # dump >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # dump ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory E:\code\Scala\extraction_framework\dump\src\main\resources
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (process-resources) # dump ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # dump ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (compile) # dump ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # dump ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory E:\code\Scala\extraction_framework\dump\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # dump ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:testCompile (test-compile) # dump ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[INFO]
[INFO] org.dbpedia.extraction.dump.sql.Import
parsing \home\release\wikipedia\wikipedias.csv
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:161)
at org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
Caused by: java.io.FileNotFoundException: \home\release\wikipedia\wikipedias.csv (ϵͳ�Ҳ���ָ����·����)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at scala.io.Source$.fromFile(Source.scala:91)
at scala.io.Source$.fromFile(Source.scala:76)
at org.dbpedia.extraction.util.WikiInfo$.fromFile(WikiInfo.scala:26)
at org.dbpedia.extraction.util.ConfigUtils$.parseLanguages(ConfigUtils.scala:43)
at org.dbpedia.extraction.dump.sql.Import$.main(Import.scala:26)
at org.dbpedia.extraction.dump.sql.Import.main(Import.scala)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.104s
[INFO] Finished at: Fri May 24 18:34:48 CST 2013
[INFO] Final Memory: 10M/175M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.2:run (default-cli) on project dump: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: -10000(Exit value: -10000) -> [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
Process finished with exit code 1
what should I do to fix it?
PS: I did it all on windows 7 OS, with intelli j 12 community version, maven 3 and jdk 7 installed. If any other info is needed, please let me know, thanks.

Maven: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar

I'm trying to use the cargo plugin to run a web application in a local Jetty container from inside Eclipse. This seems to be working for other people with the exact same pom.xml, but I get this error:
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.3:start (default-cli) on project wsc: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar -> [Help 1]
How do I resolve this? The project is set to use jdk1.7.0 as the "JRE System Library". I am starting Eclipse with "-vm " and even JAVA_HOME is set to the JDK path.
Any ideas? I've been researching on this for a while and getting crazy about that. The documentation on including tools.jar as dependency didn't help me.
Important: This seems to work outside Eclipse, e.g. with mvn -P local cargo:start.
Program output when started from Eclipse:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Web Services Computing 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cargo-maven2-plugin:1.0.3:start (default-cli) # wsc ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.324s
[INFO] Finished at: Sat Oct 22 19:10:18 CEST 2011
[INFO] Final Memory: 15M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.3:start (default-cli) on project wsc: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar -> [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
Dependency tree output (also started from Eclipse):
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # wsc ---
[INFO] de.tum.ibis.wsc:wsc:war:0.0.1-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] \- javax.servlet:servlet-api:jar:2.5:compile
[INFO] ------------------------------------------------------------------------
You have to start eclipse with a jdk instead of a jre.
If you edit your eclipse.ini and put a jdk to the vm arguments it should work.
-vm
C:/java_1_6/jdk/bin/javaw.exe