How to integrate Cordentity template to another Cordapp? - hyperledger

When I try to integrate cordentity project template to my cordapp, I take this error
[ERROR] 09:54:31+0300 [main] internal.NodeStartupLogging. - Exception during node startup: Incompatible schema change detected. Please run schema migration scripts (node with sub-command run-migration-scripts). Reason: Schema-validation: missing table [CredentialDefinitionSchemaV1$PersistentCredentialDefinition]
Does anybody have an idea?

Related

Error Launching CloudDataFlow Java App using Cloud Composer

Am a GCP Newbie and facing an error when trying to run a cloud data flow app for the BeamTutorial using GCP Cloud Composers DataflowJavaOperator. Airflow picks up the pipeline but fails with the below error.
gcp_dataflow_hook.py:115} INFO - Running command: java -cp /tmp/dataflow13ec2a50-BeamTutorial-0.0.1-SNAPSHOT.jar org.apache.beam.examples.tutorial.game.solution.Exercise2 --runner=DataflowRunner --project=..... --region=us-central1 --labels={"airflow-version":"v1-9-0-composer"} --jobName=run-beam-data-flow-java-1449a1da --outputPrefix=gs://..../ex2-spark/out
gcp_dataflow_hook.py:127} WARNING - Error: A JNI error has occurred, please check your installation and try again
[2018-10-18 09:35:00,316] {base_task_runner.py:98} INFO - Subtask: Exception in thread "main" java.lang.NoClassDefFoundError:org/apache/beam/sdk/options/PipelineOptions
This BeamTutorial-0.0.1-SNAPSHOT.jar is not a fat jar and runs the job successfully in Dataflow when submitted manually from gcp cloud shell manually as below
mvn compile exec:java -Dexec.mainClass="org.apache.beam.examples.tutorial.game.solution.Exercise2" -Dexec.args="--runner=dataflow --project=<project-name> --outputPrefix=gs://..../beam-tutorial/ex2-spark/out" -Pdataflow-runner
Appreciate any help in fixing this error. thank you.
When using the DataFlowJavaOperator you need to follow instructions here on how to create your ".jar" file:
Add the dependency and plugin from link
Run mvn package to create your ".jar" file
Once you do that I'd advise to make sure that the ".jar" file is actually running correctly before trying to run it inside Composer. So in this case following the tutorial, running:
java -jar target/BeamTutorial-0.0.1-SNAPSHOT.jar --runner=DataflowRunner --p
roject=<my-project> --tempLocation=<my-bucket>
I also get:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/beam/sdk/options/PipelineOptions
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.beam.sdk.options.PipelineOptions
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
So the issue looks more Java-related and how the pom is configured that is not creating a valid .jar file, or it is expecting some additional parameters. In any case you should troubleshoot the ".jar"/pom before going further.
For some other pipelines I have I ran them successfully using the DataflowJavaOperator and a valid ".jar" file.

java.lang.IllegalStateException: Unable to return a default Coder

When I run my pipeline in eclipse it runs fine. But when I export pipeline as jar file and run that I get below error:
Exception in thread "main" java.lang.IllegalStateException: Unable to
return a default Coder for ToTableRow/ParMultiDo(ToTableRow).out0
[PCollection]. Correct one of the following root causes: No Coder
has been manually specified; you may do so using .setCoder().
Inferring a Coder from the CoderRegistry failed: Unable to provide a
Coder for com.google.api.services.bigquery.model.TableRow. Building
a Coder using a registered CoderProvider failed. See suppressed
exceptions for detailed failures. Using the default output Coder
from the producing PTransform failed: Unable to provide a Coder for
com.google.api.services.bigquery.model.TableRow. Building a Coder
using a registered CoderProvider failed. See suppressed exceptions
for detailed failures.
at org.apache.beam.sdk.repackaged.com.google.common.base.Preconditions.checkState(Preconditions.java:444)
at org.apache.beam.sdk.values.PCollection.getCoder(PCollection.java:257)
at org.apache.beam.sdk.values.PCollection.finishSpecifying(PCollection.java:106)
at org.apache.beam.sdk.runners.TransformHierarchy.finishSpecifyingInput(TransformHierarchy.java:147)
at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:513)
at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:473)
at org.apache.beam.sdk.values.PCollection.apply(PCollection.java:297)
at com.X.pubsub.to.bq.Y.main(Y.java:107)
At line 107 in my code I am doing a BigQueryIO.writeTableRows:
PCollection<TableRow> tableRow = streamData.apply("ToTableRow",ParDo.of(new PrepData.ToTableRow())); //String to TableRow
tableRow.apply("WriteToBQ",
BigQueryIO.writeTableRows()
.to(String.format("%1$s.%2$s",bqDataSet, bqTable))
.withSchema(schema)
.withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND));

Grails - Fatal error during compilation org.springframework.beans.factory.BeanDefinitionStoreException

I'm developing a Grails 2.4.4 plugin. I added the following dependencies to the plugin BuildConfig file:
String springSocialVersion = "1.1.0.RELEASE"
String springSecurityVersion = '3.2.7.RELEASE'
compile("org.springframework.social:spring-social-core:${springSocialVersion}") {
excludes "spring-aop", "spring-beans", "spring-context", "spring-core",
"spring-expression", "spring-web", "spring-webmvc"
}
compile "org.springframework.security:spring-security-crypto:$springSecurityVersion"
compile("com.fasterxml.jackson.core:jackson-databind:2.2.2")
compile "org.apache.httpcomponents:httpclient:4.3.1"
The problem is when I add the plugin as a compile-time dependency in my app, I get the following exception:
Fatal error during compilation org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/Users/jeff/.grails/ivy-cache/org.grails/grails-core/jars/grails-core-2.2.3.jar!/org/codehaus/groovy/grails/compiler/DirectoryWatcher$FileChangeListener.class]; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
If I remove the dependencies from the plugin and add them directly to the BuildConfig in the app everything works fine
Any ideas?

Jenkins Ruby metrics plugin fail to copy .gitkeep

Jenkins Ruby metrics plugin cause error when copy .gitkeep file to log directory, because it fails to create log directory.
Error message is below.
Publishing rcov report...
ERROR: Publisher hudson.plugins.rubyMetrics.rcov.RcovPublisher aborted due to exception
Failed to copy /Users/Shared/Jenkins/Home/jobs/RailsApp/workspace/log/.gitkeep to /Users/Shared/Jenkins/Home/jobs/RailsApp/builds/2014-02-05_21-07-52/log/.gitkeep due to failed to create the parent directory for /Users/Shared/Jenkins/Home/jobs/RailsApp/builds/2014-02-05_21-07-52/log/.gitkeep
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:914)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:567)
at hudson.Util.copyFile(Util.java:922)
at hudson.FilePath$38$1.visit(FilePath.java:1937)
at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
at hudson.util.DirScanner$Glob.scan(DirScanner.java:131)
at hudson.FilePath$38.invoke(FilePath.java:1932)
at hudson.FilePath$38.invoke(FilePath.java:1925)
at hudson.FilePath.act(FilePath.java:914)
at hudson.FilePath.act(FilePath.java:887)
at hudson.FilePath.copyRecursiveTo(FilePath.java:1925)
at hudson.FilePath.copyRecursiveTo(FilePath.java:1911)
at hudson.FilePath.copyRecursiveTo(FilePath.java:1894)
at hudson.plugins.rubyMetrics.Utils.moveReportsToBuildRootDir(Utils.java:28)
at hudson.plugins.rubyMetrics.Utils.moveReportsToBuildRootDir(Utils.java:12)
at hudson.plugins.rubyMetrics.HtmlPublisher.prepareMetricsReportBeforeParse(HtmlPublisher.java:30)
at hudson.plugins.rubyMetrics.rcov.RcovPublisher.perform(RcovPublisher.java:50)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:756)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:705)
at hudson.model.Run.execute(Run.java:1695)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
Caused by: java.io.IOException: failed to create the parent directory for /Users/Shared/Jenkins/Home/jobs/RailsApp/builds/2014-02-05_21-07-52/log/.gitkeep
at org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:512)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:559)
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:899)
... 25 more
Jenkins didn't create log 'directory' but log 'file'. Jenkins have permission to read/write of the directory of course. Any ideas? Thanks in advance.
I spend a lot of time to fix this issue.
In fact, when you activate the Ruby metrics plugin, you have to provide a directory. If you don't, the default folder is log, and it is the cause of your error.
So, go to your project configuration and in the Publish Rcov Report section, you just fill the directory.
Enjoy :)

Error preverifying class, coming while running my app

I am trying to run a sample project, but I am getting this error on the console and the app does not run.
I don't understand what this error means.
Packaging project ScheduleAir
C:\Eclipse\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.28\components\bin\rapc.exe -quiet codename=deliverables\Standard\4.5.0\scheduleair deliverables\Standard\4.5.0\scheduleair.rapc -sourceroot=C:\Documents and Settings\20041\workspace\ScheduleAir\src\com\intellisoft\schedule_air;C:\Documents and Settings\20041\workspace\ScheduleAir\src;C:\Documents and Settings\20041\workspace\ScheduleAir\res -import=C:\Eclipse\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.28\components\lib\net_rim_api.jar C:\Documents and Settings\20041\workspace\ScheduleAir\bin
Error preverifying class com.intellisoft.schedule_air.AppSettingScreen
VERIFIER ERROR com/intellisoft/schedule_air/AppSettingScreen.()V:
Illegal type in constant pool
Error!: Error: preverifier failed: C:\Eclipse\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.28\components\bin\preverify.exe -d C:\DOCUME ...
Packaging project ScheduleAir failed (took 0.437 seconds)
Could it be related to compiler target level in your Eclipse? For BB it should be set to 1.3, while by default Eclipse sets it to 1.5/1.6. Check "More detail on preverification errors ?" for details.
You must set JAVA_HOME in your system environment variables

Resources