I try to set up sonarqube for all my c++ projects. It works fine for all projects except one.
This project is the only one to have a submodule in the first place.
I have an src folder to analyze with this script:
#!/bin/bash
curl -sSLo build-wrapper-linux-x86.zip https://openshift.lumiplan.com/sonarqube/static/cpp/build-wrapper-linux-x86.zip
unzip -o build-wrapper-linux-x86.zip
chmod +x build-wrapper-linux-x86/build-wrapper-linux-x86-64
build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make
ls
cat bw-output/build-wrapper-dump.json
cd ../../src
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873-linux.zip
mkdir sonar-scanner
unzip sonar-scanner-cli-4.2.0.1873-linux.zip
ls
mv sonar-scanner-4.2.0.1873-linux/* sonar-scanner/
rm sonar-scanner/conf/sonar-scanner.properties
cp ../sonar-project.properties sonar-scanner/conf/sonar-scanner.properties
sonar-scanner/bin/sonar-scanner -Dsonar.scm.exclusions.disabled=true -Dsonar.cfamily.build-wrapper-output=../projects/linux-arm/bw-output -Dsonar.projectKey=products_panel_lumiplay-engine_AYKR3Op6FUISUZul32ck -Dsonar.sources=. -Dsonar.login=14214a83196d3ae8f3507cff910c5da818e280a2 -Dsonar.host.url=https://openshift.lumiplan.com/sonarqube -Dsonar.branch.name=$1
but in src folder I have the following content:
"api_asrcore" folder which is a git submodule
"api_boost" folder which is a git submodule
and all my code in different folders which is not git submodules
the logs:
NFO: Using 1 thread for analysis according to value of "sonar.cfamily.threads" property.
15:59:20 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/configuration_specific/source/configuration_specific.cpp at line 121 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
15:59:20 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/protocol/public/msg_plot_idbrndef.h at line 157 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
15:59:20 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/review/source/review_application_control.cpp at line 152 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
15:59:20 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/protocol/source/msg_plot_idbrndef.cpp at line 579 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
15:59:20 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/decodage/source/decodage_plot.cpp at line 294 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
15:59:20 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/decodage/public/decodage_plot.h at line 164 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 0 (forceInclude=0,throughHeader=0)
15:59:20 INFO: SE: 0 out of 0
15:59:20 INFO: Z3 refutation rate: 0 out of 0
15:59:20 INFO: Subprocess(es) done in 46ms
15:59:20 INFO: 0 compilation units analyzed
15:59:20 INFO: ------------------------------------------------------------------------
15:59:20 INFO: EXECUTION FAILURE
15:59:20 INFO: ------------------------------------------------------------------------
15:59:20 INFO: Total time: 48.891s
15:59:20 INFO: Final Memory: 63M/220M
15:59:20 INFO: ------------------------------------------------------------------------
15:59:20 ERROR: Error during SonarQube Scanner execution
15:59:20 java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed.
in other projects there is at least one folder which is not a git submodule before "api_asrcore" in the following example there is an "action_manager" and an "annoncesonore_html" folders before submodules
logs:
INFO: Using 1 thread for analysis according to value of "sonar.cfamily.threads" property.
14:49:17 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/decodage/source/decodage_plot.cpp at line 310 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
14:49:17 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/protocol/source/msg_plot_idbrndef.cpp at line 632 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
14:49:17 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/protocol/public/msg_plot_idbrndef.h at line 165 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
14:49:17 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/decodage/public/decodage_plot.h at line 166 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
14:49:17 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/synchronisation/source/synchronisation.cpp at line 68 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
14:49:17 WARN: Invalid character encountered in file /usr/src/lumiplan/src/specific/configuration_specific/source/configuration_specific.cpp at line 216 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
14:49:17 WARN:
14:49:17 CFamily plugin supports incremental analysis with the use of a cache:
14:49:17
14:49:17 * if you do not want to enable cache
14:49:17 please explicitly disable it
14:49:17 by setting the following property to your analysis:
14:49:17 sonar.cfamily.cache.enabled=false
14:49:17
14:49:17 * to enable cache please specify the following 2 options:
14:49:17 sonar.cfamily.cache.enabled=true
14:49:17 sonar.cfamily.cache.path=relative_or_absolute_path_to_cache_location
14:49:17
14:49:17 * visit the documentation page for more information
14:49:17 https://openshift.lumiplan.com/sonarqube/documentation/analysis/languages/cfamily/
14:49:17
14:49:17 INFO: [pool-3-thread-1] /usr/src/lumiplan/projects/linux-arm/../../src/specific/action_manager/source/action_handler.cpp
14:49:17 INFO: [pool-3-thread-1] /usr/src/lumiplan/projects/linux-arm/../../src/specific/annoncesonore_html/sources/annoncesonore.cpp
14:49:17 INFO: PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 2 (forceInclude=0,throughHeader=0)
14:49:17 INFO: SE: 2 out of 2
14:49:17 INFO: Z3 refutation rate: 0 out of 3
in this case the sonar analysis are complete do you know why? (there are no specific sonar-project.properties in both cases)
Related
I'm installing Mediapipe on Windows 10 for c++ and I'm %90 sure I've set up everything correctly. I'm following the guide here: https://google.github.io/mediapipe/getting_started/install.html#installing-on-windows
Here's the output I'm getting:
DEBUG: Rule 'rules_foreign_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c2cdcf55ffaf49366725639e45dedd449b8c3fe22b54e31625eb80ce3a240f1e"
DEBUG: Repository rules_foreign_cc instantiated at:
D:/mediapipe/WORKSPACE:43:13: in <toplevel>
Repository rule http_archive defined at:
C:/users/dillo/_bazel_dillo/hr7sucjp/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_benchmark' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'pybind11_bazel' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'xctestrunner' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "691a29db9c336349e48e04c5c2f4873f2890af5cbfa6e51f4de87fefe6169294"
DEBUG: Repository rules_cc instantiated at:
D:/mediapipe/WORKSPACE:36:13: in <toplevel>
Repository rule http_archive defined at:
C:/users/dillo/_bazel_dillo/hr7sucjp/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
WARNING: D:/mediapipe/mediapipe/framework/BUILD:54:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '#com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: D:/mediapipe/mediapipe/framework/tool/BUILD:184:24: in cc_library rule //mediapipe/framework/tool:field_data_cc_proto: target '//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '#com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
INFO: Analyzed target //mediapipe/examples/desktop/hello_world:hello_world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: C:/users/dillo/_bazel_dillo/hr7sucjp/external/com_github_gflags_gflags/BUILD:16:30: Executing genrule #com_github_gflags_gflags//:gflags_completions_h failed: (Exit -1): bash.exe failed: error executing command (from target #com_github_gflags_gflags//:gflags_completions_h) c:\tools\msys64\usr\bin\bash.exe -c ... (remaining 1 argument skipped)
Action failed to execute: java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("c:\tools\msys64\usr\bin\bash.exe" -c "source external/bazel_tools/tools/genrule/genrule-setup.sh; awk '{ gsub(/#GFLAGS_NAMESPACE#/, \"gflags\"); print; }' external/com_github_gflags_gflags/src/gflags_completions.h.in > bazel-out/x64_windows-opt/bin/external/com_github_gflags_gflags/gflags_completions.h"): The system cannot find the file specified.
(error: 2)
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 77.898s, Critical Path: 77.44s
INFO: 209 processes: 128 internal, 81 local.
FAILED: Build did NOT complete successfully
I've completely reinstalled Python and I've made sure to set up my path variables, can anyone tell me what the issue is?
Thanks to #kiner_shah for pointing out what the error was:
If you are getting this error it's because mediapipe is trying to access the msys folder at the wrong location, so all you have to do is make it the right location. I moved my mysys2 folder from D:/mysys2, to the path that was showing the error: "c:\tools\msys64\usr\bin\bash.exe" by making a tools folder in c:, renaming mysys2 to msys64, then moving that folder to the previously created tools folder.
I am building a quarkus native executable image but it is failing because of unknown argument .
I have used quarkus.native.additional-build-args variable in property file but it is not working.
I am using java 11. Can
SLF4J: Found binding in [jar:file:/home/quarkus/.m2/repository/org/jboss/slf4j/slf4j-jboss-logging/1.2.0.Final/slf4j-jboss-logging-1.2.0.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/quarkus/.m2/repository/ch/qos/logback/logback-classic/1.1.1/logback-classic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.jboss.slf4j.JBossLoggerFactory]
[INFO] [org.jboss.threads] JBoss Threads version 3.1.1.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /usr/src/app/target/quarkus-test-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-test-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /usr/src/app/target/quarkus-test-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-test-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.1.0 (Java Version 11.0.7)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] /opt/graalvm/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -J-Duser.language=en -J-Dfile.encoding=UTF-8 --initialize-at-run-time=com.wealdtech.hawk.HawkClient com.wealdtech.hawk.HawkCredential --allow-incomplete-classpath --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -jar quarkus-test-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services -H:NativeLinkerOption=-no-pie --no-server -H:-UseServiceLoaderFeature -H:+StackTrace quarkus-test-1.0.0-SNAPSHOT-runner
Error: Unknown argument: quarkus-test-1.0.0-SNAPSHOT-runner
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.640 s
[INFO]
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.9.0.Final:build (default) on project quarkus-test: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:307)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Do any one has any Idea??
Thank you!!!
I had the same issue, when using quarkus.native.additional-build-args in the applications.properties file. The issues I had was, that I defined multiple packages in the --initialize-at-build-time parameter, separated with a comma as: --initialize-at-build-time=javax.net.ssl,java.security
This needed to be masked as following:
--initialize-at-build-time=javax.net.ssl\\,java.security
Just in case anybody else is losing hair on this and ends up here. My build was failing in a similar way:
building quarkus jar
Error: Unknown argument: <yada, yada...>
looking at my application.properties I had some build args:
quarkus.native.additional-build-args=\
-H:+PrintClassInitialization,\
--report-unsupported-elements-at-runtime,\
--allow-incomplete-classpath,\
--initialize-at-run-time=a.b.c.d\\,\
a.b.c.e\\,\
a.b.c.f
Nothing obvious there then. Looking closer though:
--allow-incomplete-classpath,\
Had 2 white space characters at the end of the line after the ,\ removing the white spaces fixed it. OUCH!
I am trying to build Tensorboard (1.13.1) from source. I am using Bazel version 0.26.0 (built from source) and JDK version 11.0.3. I am getting following error during build:
# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false tensorboard
Starting local Bazel server and connecting to it...
ERROR: /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl:343:17: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl", line 335
rule(implementation = _closure_js_lib..., <2 more arguments>)
File "/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl", line 343, in rule
attr.label_list(cfg = "data", allow_files = True)
cfg must be either 'host' or 'target'.
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/defs.bzl: Extension file 'closure/compiler/closure_js_library.bzl' has errors
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/defs.bzl: Extension file 'closure/compiler/closure_js_library.bzl' has errors
INFO: Elapsed time: 14.290s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
If I search and replace the word 'data' with 'host' from .bzl files, I start getting another error:
# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false tensorboard
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl: Label '#org_tensorflow//third_party:nccl/nccl_configure.bzl' crosses boundary of subpackage '#org_tensorflow//third_party/nccl' (perhaps you meant to put the colon here: '#org_tensorflow//third_party/nccl:nccl_configure.bzl'?)
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl: Label '#org_tensorflow//third_party:nccl/nccl_configure.bzl' crosses boundary of subpackage '#org_tensorflow//third_party/nccl' (perhaps you meant to put the colon here: '#org_tensorflow//third_party/nccl:nccl_configure.bzl'?)
INFO: Elapsed time: 15.377s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Correcting the error by replacing,
load("//third_party:nccl/nccl_configure.bzl", "nccl_configure")
by
load("//third_party/nccl:nccl_configure.bzl", "nccl_configure")
in the cache file,
/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl
Solves the error but now getting this error:
# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false tensorboard
ERROR: /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl:18:1: file '#io_bazel_rules_closure//closure:defs.bzl' does not contain symbol 'filegroup_external'
ERROR: error loading package '': Extension file 'tensorflow/workspace.bzl' has errors
ERROR: error loading package '': Extension file 'tensorflow/workspace.bzl' has errors
INFO: Elapsed time: 1.113s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Now I am stuck. Any pointers highly appreciated!
I want to use this google provided template which stream data from pubsub to datastore.
https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/master/src/main/java/com/google/cloud/teleport/templates/PubsubToDatastore.java
I follow the step wrote this document.
https://github.com/GoogleCloudPlatform/DataflowTemplates
I pass this step.
mvn clean && mvn compile
But next step, the error occured.
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) # google-cloud-teleport-java ---
2018-08-17 13:36:19 INFO DataflowRunner:266 - PipelineOptions.filesToStage was not specified. Defaulting to files from the classpath: will stage 117 files. Enable logging at DEBUG level to see which files wi
ll be staged.
[WARNING]
java.lang.IllegalStateException: Missing required properties: errorTag
at com.google.cloud.teleport.templates.common.AutoValue_DatastoreConverters_WriteJsonEntities$Builder.build(AutoValue_DatastoreConverters_WriteJsonEntities.java:89)
at com.google.cloud.teleport.templates.PubsubToDatastore.main(PubsubToDatastore.java:65)
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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.lang.Thread.run(Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.348 s
[INFO] Finished at: 2018-08-17T13:36:20+09:00
[INFO] Final Memory: 59M/146M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project google-cloud-teleport-java: An exception occured while executing the Java class. Missing required propert
ies: errorTag -> [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
Then, I tried DatastoreToPubsub template and GSCTextToDatastore template, and these were successful.
https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/master/src/main/java/com/google/cloud/teleport/templates/DatastoreToPubsub.java
https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/master/src/main/java/com/google/cloud/teleport/templates/TextToDatastore.java
So, I can't understand what is problem.
Where is wrong?
Please give me some advices...
Regards.
Looks like you found a bug in that particular DataflowTemplate whereby the pipeline is not configuring an error path even though a path is required when writing JSON entities. The fix is relatively simple and should be pushed to master shortly. In the meantime, you can get the pipeline working with two changes to the PubsubToDatastore pipeline code.
First modify the code so the PubsubToDatastoreOptions extends the ErrorWriteOptions interface. Your new options declaration should look something similar to the following:
interface PubsubToDatastoreOptions
extends
PipelineOptions,
PubsubReadOptions,
JavascriptTextTransformerOptions,
DatastoreWriteOptions,
ErrorWriteOptions {}
Then modify the code within the main method so that the pipeline configures an error TupleTag and routes any error messages to the LogErrors transform. This will ensure any data which fails to be output to Datastore is captured and stored on GCS. Your new main method should look something similar to the following:
TupleTag<String> errorTag = new TupleTag<String>(){};
Pipeline pipeline = Pipeline.create(options);
pipeline
.apply(PubsubIO.readStrings()
.fromTopic(options.getPubsubReadTopic()))
.apply(TransformTextViaJavascript.newBuilder()
.setFileSystemPath(options.getJavascriptTextTransformGcsPath())
.setFunctionName(options.getJavascriptTextTransformFunctionName())
.build())
.apply(WriteJsonEntities.newBuilder()
.setProjectId(options.getDatastoreWriteProjectId())
.setErrorTag(errorTag)
.build())
.apply(LogErrors.newBuilder()
.setErrorWritePath(options.getErrorWritePath())
.setErrorTag(errorTag)
.build());
Im having this error appear on chef-solo recipes, Im new to it so I dont really get this error or how to fix it... still sounds like either file or dir not found, created...
out: [Fri, 18 Mar 2011 15:59:28 +0000] ERROR: script[Install_Requirements] (/etc/chef/cookbooks/main/recipes/rincon.rb:35:in `from_file') had an error:
out: "bash" "/tmp/chef-script20110318-7369-1hi8q5e-0" returned 1, expected 0
This is the recipe that shows the error.
script "Install_Requirements" do
interpreter "bash"
user "rincon"
group "rincon"
cwd "/tmp"
code <<-EOH
/home/rincon/sites/rinconcolombia/bin/pip install -r /home/rincon/sites/rinconcolombia/checkouts/rinconcolombia/requirements.txt
EOH
end
Ive been using chef-solo -l debug flag and its been giving me all the info I need to debug this problem... Thank you all hope this works for you should you find yourself in the same caveat