I'm trying to run sample cordapp-example code by cloning from Github repository using:
git clone https://github.com/corda/samples
I followed all the steps as mentioned in the documentation for running the application from IntelliJ.
"C:\Program Files\Java\jdk1.8.0_231\bin\java.exe" -ea -javaagent:lib/quasar.jar "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.4\lib\idea_rt.jar=58722:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.4\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\Utkarsh\AppData\Local\Temp\classpath1292589534.jar com.example.test.NodeDriverKt
[INFO] 13:01:05,307 [driver-pool-thread-0] network.NodeInfoFilesCopier. - Now watching: C:\Users\Utkarsh\Desktop\corda-sandbox\samples\cordapp-example\build\node-driver\20200103-073059.357\NotaryService
[WARN] 13:01:05,640 [driver-pool-thread-0] internal.DriverDSLImpl. - Unable to locate JAR for class given by `org.jboss.byteman.agent.Transformer` on classpath: org.jboss.byteman.agent.Transformer [errorCode=6tcm1g, moreInformationAt=https://errors.corda.net/OS/4.3/6tcm1g]
java.lang.ClassNotFoundException: org.jboss.byteman.agent.Transformer
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_231]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_231]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) ~[?:1.8.0_231]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_231]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_231]
at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_231]
at net.corda.testing.node.internal.DriverDSLImpl.resolveJar(DriverDSLImpl.kt:149) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl.access$resolveJar(DriverDSLImpl.kt:80) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl$bytemanJarPath$2.invoke(DriverDSLImpl.kt:131) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl$bytemanJarPath$2.invoke(DriverDSLImpl.kt:80) ~[corda-node-driver-4.3.jar:?]
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) ~[kotlin-stdlib-1.2.71.jar:1.2.71-release-64 (1.2.71)]
at net.corda.testing.node.internal.DriverDSLImpl.getBytemanJarPath(DriverDSLImpl.kt) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl.startNodeInternal(DriverDSLImpl.kt:637) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl.startRegisteredNode(DriverDSLImpl.kt:257) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl.startRegisteredNode$default(DriverDSLImpl.kt:218) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl.startSingleNotary(DriverDSLImpl.kt:505) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl.startNotaries(DriverDSLImpl.kt:493) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl.access$startNotaries(DriverDSLImpl.kt:80) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl$start$3.invoke(DriverDSLImpl.kt:373) ~[corda-node-driver-4.3.jar:?]
at net.corda.testing.node.internal.DriverDSLImpl$start$3.invoke(DriverDSLImpl.kt:80) ~[corda-node-driver-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$map$$inlined$also$lambda$1$1.invoke(CordaFutureImpl.kt:36) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.ValueOrException$DefaultImpls.capture(CordaFutureImpl.kt:130) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.OpenFuture$DefaultImpls.capture(CordaFutureImpl.kt) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImpl.capture(CordaFutureImpl.kt:142) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$map$$inlined$also$lambda$1.invoke(CordaFutureImpl.kt:36) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$map$$inlined$also$lambda$1.invoke(CordaFutureImpl.kt) ~[corda-core-4.3.jar:?]
at net.corda.core.concurrent.ConcurrencyUtils.match(ConcurrencyUtils.kt:19) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$thenMatch$1.invoke(CordaFutureImpl.kt:25) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$thenMatch$1.invoke(CordaFutureImpl.kt) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImpl$thenImpl$1.accept(CordaFutureImpl.kt:155) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImpl$thenImpl$1.accept(CordaFutureImpl.kt:142) ~[corda-core-4.3.jar:?]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760) ~[?:1.8.0_231]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736) ~[?:1.8.0_231]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_231]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) ~[?:1.8.0_231]
at net.corda.core.internal.concurrent.CordaFutureImpl.set(CordaFutureImpl.kt:148) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.ValueOrException$DefaultImpls.capture(CordaFutureImpl.kt:129) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.OpenFuture$DefaultImpls.capture(CordaFutureImpl.kt) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImpl.capture(CordaFutureImpl.kt:142) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$map$$inlined$also$lambda$1.invoke(CordaFutureImpl.kt:36) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$map$$inlined$also$lambda$1.invoke(CordaFutureImpl.kt) ~[corda-core-4.3.jar:?]
at net.corda.core.concurrent.ConcurrencyUtils.match(ConcurrencyUtils.kt:19) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$thenMatch$1.invoke(CordaFutureImpl.kt:25) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$thenMatch$1.invoke(CordaFutureImpl.kt) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImpl$thenImpl$1.accept(CordaFutureImpl.kt:155) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImpl$thenImpl$1.accept(CordaFutureImpl.kt:142) ~[corda-core-4.3.jar:?]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760) ~[?:1.8.0_231]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736) ~[?:1.8.0_231]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_231]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) ~[?:1.8.0_231]
at net.corda.core.internal.concurrent.CordaFutureImpl.set(CordaFutureImpl.kt:148) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.ValueOrException$DefaultImpls.capture(CordaFutureImpl.kt:129) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.OpenFuture$DefaultImpls.capture(CordaFutureImpl.kt) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImpl.capture(CordaFutureImpl.kt:142) ~[corda-core-4.3.jar:?]
at net.corda.core.internal.concurrent.CordaFutureImplKt$fork$$inlined$also$lambda$1.run(CordaFutureImpl.kt:22) ~[corda-core-4.3.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_231]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_231]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_231]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_231]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_231]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_231]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_231]
[INFO] 13:01:05,640 [driver-pool-thread-0] internal.DriverDSLImpl. - Starting out-of-process Node Notary Service, debug port is not enabled, byteMan: not in classpath
[INFO] 13:01:05,774 [Log4j2-TF-1-AsyncLogger[AsyncContextNoThreadLocal#18b4aac2]-1] manifests.Manifests. - 141 attributes loaded from 224 stream(s) in 109ms, 141 saved, 3371 ignored: ["ActiveMQ-Version", "Agent-Class", "Ant-Version", "Application-Class", "Application-ID", "Application-Library-Allowable-Codebase", "Application-Name", "Application-Version", "Archiver-Version", "Automatic-Module-Name", "Bnd-LastModified", "Branch", "Build-Date", "Build-Host", "Build-Id", "Build-Java-Version", "Build-Jdk", "Build-Jdk-Spec", "Build-Job", "Build-Number", "Build-Revision", "Build-Time", "Build-Timestamp", "Build-Version", "Built-By", "Built-OS", "Built-Status", "Bundle-ActivationPolicy", "Bundle-Activator", "Bundle-Category", "Bundle-ClassPath", "Bundle-Classpath", "Bundle-Copyright", "Bundle-Description", "Bundle-DocURL", "Bundle-License", "Bundle-ManifestVersion", "Bundle-Name", "Bundle-NativeCode", "Bundle-RequiredExecutionEnvironment", "Bundle-SymbolicName", "Bundle-Vendor", "Bundle-Version", "Caller-Allowable-Codebase", "Can-Redefine-Classes", "Can-Retransform-Classes", "Can-Set-Native-Method-Prefix", "Caplets", "Change", "Class-Path", "Codebase", "Corda-Platform-Version", "Corda-Release-Version", "Corda-Revision", "Corda-Vendor", "Cordapp-Contract-Licence", "Cordapp-Contract-Name", "Cordapp-Contract-Vendor", "Cordapp-Contract-Version", "Cordapp-Workflow-Licence", "Cordapp-Workflow-Name", "Cordapp-Workflow-Vendor", "Cordapp-Workflow-Version", "Created-By", "DynamicImport-Package", "Eclipse-BuddyPolicy", "Eclipse-LazyStart", "Embed-Dependency", "Export-Package", "Extension-Name", "Fragment-Host", "Git-Revision", "Git-Url", "Gradle-Version", "Hibernate-JpaVersion", "Hibernate-VersionFamily", "Ignore-Package", "Implementation-Build", "Implementation-Build-Date", "Implementation-Build-Id", "Implementation-Title", "Implementation-URL", "Implementation-Url", "Implementation-Vendor", "Implementation-Vendor-Id", "Implementation-Version", "Import-Package", "Include-Resource", "JCabi-Build", "JCabi-Date", "JCabi-Version", "JVM-Args", "Java-Agents", "Java-Vendor", "Java-Version", "Kotlin-Runtime-Component", "Kotlin-Version", "Liquibase-Package", "Log4jReleaseKey", "Log4jReleaseManager", "Log4jReleaseVersion", "Main-Class", "Main-class", "Major-Version", "Manifest-Version", "Min-Java-Version", "Min-Platform-Version", "Min-Update-Version", "Module-Email", "Module-Origin", "Module-Owner", "Module-Source", "Multi-Release", "Originally-Created-By", "Os-Arch", "Os-Name", "Os-Version", "Permissions", "Premain-Class", "Private-Package", "Provide-Capability", "Require-Capability", "SCM-Revision", "SCM-url", "Scm-Connection", "Scm-Revision", "Scm-Url", "Sealed", "Service-Component", "Specification-Title", "Specification-Vendor", "Specification-Version", "System-Properties", "Target-Platform-Version", "Tool", "Trusted-Library", "URL", "X-Compile-Source-JDK", "X-Compile-Target-JDK", "service", "url"]
[INFO] 13:01:19,312 [driver-pool-thread-0] internal.RPCClient. - Startup took 1762 msec
[INFO] 13:01:19,439 [driver-pool-thread-1] internal.DriverDSLImpl. - Node handle is ready. NodeInfo: NodeInfo(addresses=[localhost:10016], legalIdentitiesAndCerts=[O=Notary Service, L=Zurich, C=CH], platformVersion=5, serial=1578036675653), WebAddress: localhost:10019
[INFO] 13:01:19,472 [main] network.NodeInfoFilesCopier. - Now watching: C:\Users\Utkarsh\Desktop\corda-sandbox\samples\cordapp-example\build\node-driver\20200103-073059.357\PartyA
[INFO] 13:01:19,474 [main] internal.DriverDSLImpl. - Starting out-of-process Node PartyA, debug port is not enabled, byteMan: not in classpath
[INFO] 13:01:19,495 [main] network.NodeInfoFilesCopier. - Now watching: C:\Users\Utkarsh\Desktop\corda-sandbox\samples\cordapp-example\build\node-driver\20200103-073059.357\PartyB
[INFO] 13:01:19,497 [main] internal.DriverDSLImpl. - Starting out-of-process Node PartyB, debug port is not enabled, byteMan: not in classpath
[INFO] 13:01:19,520 [main] network.NodeInfoFilesCopier. - Now watching: C:\Users\Utkarsh\Desktop\corda-sandbox\samples\cordapp-example\build\node-driver\20200103-073059.357\PartyC
[INFO] 13:01:19,524 [main] internal.DriverDSLImpl. - Starting out-of-process Node PartyC, debug port is not enabled, byteMan: not in classpath
[INFO] 13:01:43,753 [driver-pool-thread-1] internal.RPCClient. - Startup took 2298 msec
[INFO] 13:01:44,301 [driver-pool-thread-0] internal.RPCClient. - Startup took 2610 msec
[INFO] 13:01:44,510 [driver-pool-thread-1] internal.RPCClient. - Startup took 756 msec
[INFO] 13:01:44,598 [driver-pool-thread-0] internal.DriverDSLImpl. - Node handle is ready. NodeInfo: NodeInfo(addresses=[localhost:10024], legalIdentitiesAndCerts=[O=PartyB, L=New York, C=US], platformVersion=5, serial=1578036698710), WebAddress: localhost:10027
[INFO] 13:01:44,620 [driver-pool-thread-0] internal.DriverDSLImpl. - Node handle is ready. NodeInfo: NodeInfo(addresses=[localhost:10028], legalIdentitiesAndCerts=[O=PartyC, L=Paris, C=FR], platformVersion=5, serial=1578036698576), WebAddress: localhost:10031
[INFO] 13:01:44,642 [driver-pool-thread-0] internal.DriverDSLImpl. - Node handle is ready. NodeInfo: NodeInfo(addresses=[localhost:10020], legalIdentitiesAndCerts=[O=PartyA, L=London, C=GB], platformVersion=5, serial=1578036699110), WebAddress: localhost:10023
I can see that the nodes are up and running, but what is that error related to?
Moreover, I've also started the Spring application using gradlew.bat runPartyXServer but still unable to create IOUs (e.g. from localhost:50005 - PartyA; not able to view other parties in dropdown ) like I was able to create when I ran everything from the console instead of IntelliJ.
That error is just a warning output by the driver tests when byteman (a java agent) is not used. You can ignore it.
runPartyXServer is likely just starting the spring web app, not running the node itself.
Try running the nodes/runnodes.sh script or java -jar corda.jar in the directory of each generated node.
I have a CordaService implemented that connects to the external apache kafka MQ(inside init block) using kafka-client library. Kafka client producer requires access to the org.apache.kafka.common.serialization.StringSerializer object which is defined in the kafka-client library.
I have included kafka-client library in build.gradle of the cordapp module where the service is defined as below:
compile "org.apache.kafka:kafka-clients:2.0.1"
Upon corda node startup i get the below message:
[WARN ] 2019-08-30T07:04:40,551Z [main] internal.Node.installCordaService - com.example.flow.ProducerService is using legacy CordaService constructor with ServiceHub parameter. Upgrade to an AppServiceHub parameter to enable updated API features.
[ERROR] 2019-08-30T07:04:40,716Z [main] internal.Node.installCordaServices - Unable to install Corda service com.example.flow.ProducerService [errorCode=1aep02i, moreInformationAt=https://errors.corda.net/OS/4.0/1aep02i]
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_181]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_181]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_181]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_181]
at net.corda.node.internal.AbstractNode.installCordaService(AbstractNode.kt:654) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.AbstractNode.installCordaServices(AbstractNode.kt:577) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.AbstractNode.access$installCordaServices(AbstractNode.kt:120) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.AbstractNode$start$7.invoke(AbstractNode.kt:382) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.AbstractNode$start$7.invoke(AbstractNode.kt:120) ~[corda-node-4.0.jar:?]
at net.corda.nodeapi.internal.persistence.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:236) ~[corda-node-api-4.0.jar:?]
at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:221) ~[corda-node-api-4.0.jar:?]
at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:199) ~[corda-node-api-4.0.jar:?]
at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:205) ~[corda-node-api-4.0.jar:?]
at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:371) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.Node.start(Node.kt:419) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:185) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartupCli$runProgram$2.run(NodeStartup.kt:110) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartup$initialiseAndRun$5.invoke(NodeStartup.kt:162) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartup$initialiseAndRun$5.invoke(NodeStartup.kt:117) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartupLogging$DefaultImpls.attempt(NodeStartup.kt:450) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartup.attempt(NodeStartup.kt:117) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartup.initialiseAndRun(NodeStartup.kt:160) ~[corda-node-4.0.jar:?]
at net.corda.node.internal.NodeStartupCli.runProgram(NodeStartup.kt:108) ~[corda-node-4.0.jar:?]
at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:184) ~[corda-tools-cliutils-4.0.jar:?]
at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:152) ~[corda-tools-cliutils-4.0.jar:?]
at picocli.CommandLine.execute(CommandLine.java:1056) ~[picocli-3.8.0.jar:3.8.0]
at picocli.CommandLine.access$900(CommandLine.java:142) ~[picocli-3.8.0.jar:3.8.0]
at picocli.CommandLine$RunLast.handle(CommandLine.java:1246) ~[picocli-3.8.0.jar:3.8.0]
at picocli.CommandLine$RunLast.handle(CommandLine.java:1214) ~[picocli-3.8.0.jar:3.8.0]
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1122) ~[picocli-3.8.0.jar:3.8.0]
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1405) ~[picocli-3.8.0.jar:3.8.0]
at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:72) ~[corda-tools-cliutils-4.0.jar:?]
at net.corda.node.Corda.main(Corda.kt:13) ~[corda-node-4.0.jar:?]
Caused by: org.apache.kafka.common.config.ConfigException: Invalid value org.apache.kafka.common.serialization.StringSerializer for configuration key.serializer: Class org.apache.kafka.common.serialization.StringSerializer could not be found.
at org.apache.kafka.common.config.ConfigDef.parseType(ConfigDef.java:724) ~[?:?]
at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:469) ~[?:?]
at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:462) ~[?:?]
at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:62) ~[?:?]
at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:75) ~[?:?]
at org.apache.kafka.clients.producer.ProducerConfig.<init>(ProducerConfig.java:364) ~[?:?]
at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:304) ~[?:?]
at com.example.flow.Producer.<init>(Service.kt:26) ~[?:?]
at com.example.flow.Ping.<init>(Service.kt:49) ~[?:?]
at com.example.flow.ProducerService.<init>(Service.kt:21) ~[?:?]
... 33 more
[INFO ] 2019-08-30T07:04:41,863Z [main] statemachine.SingleThreadedStateMachineManager.invoke - Node ready, info: NodeInfo(addresses=[localhost:10004], legalIdentitiesAndCerts=[O=PartyA, L=London, C=GB], platformVersion=4, serial=1567146729127)
[INFO ] 2019-08-30T07:04:42,001Z [Node thread-1] internal.Node.registerJmxReporter - Registering JMX reporter:
[INFO ] 2019-08-30T07:04:42,003Z [main] BasicInfo.printBasicNodeInfo - Loaded 2 CorDapp(s) : Contract CorDapp: CorDapp Example version 1 by vendor Corda Open Source with licence Apache License, Version 2.0, Workflow CorDapp: CorDapp Example version 1 by vendor Corda Open Source with licence Apache License, Version 2.0
[INFO ] 2019-08-30T07:04:42,004Z [Node thread-1] internal.Node.registerJolokiaReporter - Registering Jolokia JMX reporter:
[INFO ] 2019-08-30T07:04:42,009Z [main] BasicInfo.printBasicNodeInfo - Node for "PartyA" started up and registered in 51.24 sec
[INFO ] 2019-08-30T07:04:42,012Z [main] rpc.RPCServer.start - Starting RPC server with configuration RPCServerConfiguration(rpcThreadPoolSize=4, reapInterval=PT1S, deduplicationCacheExpiry=PT24H)
What could be the reason why corda node is unable to load the org.apache.kafka.common.serialization.StringSerializer class?
Resolved. Had to add `Thread.currentThread().setContextClassLoader(null); since StringSerializer class is by default loaded by application class loader
In WSO2 APIM-2.1.0 I'm facing solrException as: ERROR {org.apache.solr.core.SolrCore} - org.apache.solr.common.SolrException: undefined field c/o
Due to above issue, unable to view API listing & Application Listing in /store url.
I will give background of why above issue is happening:
(For all below steps I've referred this documentation.
1. I've created couple of applications (around 1000) using Create New Application.
2. Generated the keys for newly created application using Generate Keys for Application.
3. Subscribed these application to the existing APIs using Subscription.
Performed above steps for 1000 applications, I'm able to regenerate tokens, get details of it & make an API calls using keys. This all is happening without errors using API (not from UI).
After that I realized that WSO2-APIM-1.9.0 was throwing an error for creating applications with special characters like '/', ','. Because in exception it mentioned that undefined field c/o, I've added c/o in many application names as XYZ Inc c/o.
Next debug step I've performed is to remove / from all application names wherever exist, so updated AM_APPLICATION table.
Also updated same thing in UM_HYBRID_ROLE table.
But somehow I'm unable to see these entries in UM_ROLE_PERMISSION table.
After performing I'm seeing the error as org.apache.solr.common.SolrException: undefined field co. This made me realize that error is associated with UM_ROLE_PERMISSION.
What will be my next step to solve this issue ?
Here is the complete stack trace I'm getting as soon as logged in to /store:
TID: [-1234] [] [2018-03-02 12:21:00,189] INFO {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} - Permission cache updated for tenant -1234 {org.wso2.carbon.core.internal.permission.update.PermissionUpdater}
TID: [-1234] [] [2018-03-02 12:21:00,532] INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - 'admin#carbon.super [-1234]' logged in at [2018-03-02 12:21:00,531-0600] {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
TID: [-1234] [] [2018-03-02 12:21:06,575] ERROR {org.apache.solr.core.SolrCore} - org.apache.solr.common.SolrException: undefined field co
at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1298)
at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getWrappedAnalyzer(IndexSchema.java:444)
at org.apache.lucene.analysis.DelegatingAnalyzerWrapper$DelegatingReuseStrategy.getReusableComponents(DelegatingAnalyzerWrapper.java:74)
at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:172)
at org.apache.lucene.util.QueryBuilder.createFieldQuery(QueryBuilder.java:199)
at org.apache.solr.parser.SolrQueryParserBase.newFieldQuery(SolrQueryParserBase.java:370)
at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:753)
at org.apache.solr.parser.SolrQueryParserBase.handleBareTokenQuery(SolrQueryParserBase.java:537)
at org.apache.solr.parser.QueryParser.Term(QueryParser.java:299)
at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:185)
at org.apache.solr.parser.QueryParser.Query(QueryParser.java:139)
at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:189)
at org.apache.solr.parser.QueryParser.Query(QueryParser.java:107)
at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:96)
at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:151)
at org.apache.solr.search.LuceneQParser.parse(LuceneQParser.java:50)
at org.apache.solr.search.QParser.getQuery(QParser.java:141)
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:203)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:229)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064)
at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:179)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135)
at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:943)
at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:958)
at org.wso2.carbon.registry.indexing.solr.SolrClient.query(SolrClient.java:613)
at org.wso2.carbon.registry.indexing.solr.SolrClient.query(SolrClient.java:528)
at org.wso2.carbon.registry.indexing.service.ContentBasedSearchService.searchContentInternal(ContentBasedSearchService.java:166)
at org.wso2.carbon.registry.indexing.service.ContentBasedSearchService.searchByAttribute(ContentBasedSearchService.java:279)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$AttributeSearchServiceImpl.search(IndexingServiceComponent.java:162)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$AttributeSearchServiceImpl.search(IndexingServiceComponent.java:175)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$AttributeSearchServiceImpl.search(IndexingServiceComponent.java:189)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$AttributeSearchServiceImpl.search(IndexingServiceComponent.java:156)
at org.wso2.carbon.governance.api.util.GovernanceUtils.performAttributeSearch(GovernanceUtils.java:2118)
at org.wso2.carbon.governance.api.util.GovernanceUtils.findGovernanceArtifacts(GovernanceUtils.java:2016)
at org.wso2.carbon.apimgt.impl.APIConsumerImpl.getAllPaginatedAPIsByStatus(APIConsumerImpl.java:573)
at org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.getAllPaginatedAPIsByStatus(UserAwareAPIConsumer.java:36)
at org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.getPaginatedAPIsByStatus(APIStoreHostObject.java:1739)
at org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getAllPaginatedAPIs(APIStoreHostObject.java:1669)
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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.store.modules.api.c1._c_anonymous_5(/store/modules/api/api.jag:136)
at org.jaggeryjs.rhino.store.modules.api.c1.call(/store/modules/api/api.jag)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.store.modules.api.c0._c_anonymous_16(/store/modules/api/module.jag:54)
at org.jaggeryjs.rhino.store.modules.api.c0.call(/store/modules/api/module.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.store.site.blocks.api.api_listing_all.c0._c_anonymous_3(/store/site/blocks/api/api-listing-all/block.jag:74)
at org.jaggeryjs.rhino.store.site.blocks.api.api_listing_all.c0.call(/store/site/blocks/api/api-listing-all/block.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.jaggeryjs.rhino.store.jagg.c0._c_anonymous_26(/store/jagg/jagg.jag:232)
at org.jaggeryjs.rhino.store.jagg.c0.call(/store/jagg/jagg.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.jaggeryjs.rhino.store.jagg.c0._c_anonymous_51(/store/jagg/jagg.jag:682)
at org.jaggeryjs.rhino.store.jagg.c0.call(/store/jagg/jagg.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.jaggeryjs.rhino.store.site.themes.wso_2.templates.api.listing.c0._c_anonymous_1(/store/site/themes/wso2/templates/api/listing/template.jag:16)
at org.jaggeryjs.rhino.store.site.themes.wso_2.templates.api.listing.c0.call(/store/site/themes/wso2/templates/api/listing/template.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.store.jagg.c0._c_anonymous_26(/store/jagg/jagg.jag:243)
at org.jaggeryjs.rhino.store.jagg.c0.call(/store/jagg/jagg.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.jaggeryjs.rhino.store.jagg.c0._c_anonymous_52(/store/jagg/jagg.jag:698)
at org.jaggeryjs.rhino.store.jagg.c0.call(/store/jagg/jagg.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.jaggeryjs.rhino.store.site.themes.wso_2.templates.layout.base.c0._c_anonymous_1(/store/site/themes/wso2/templates/layout/base/template.jag:42)
at org.jaggeryjs.rhino.store.site.themes.wso_2.templates.layout.base.c0.call(/store/site/themes/wso2/templates/layout/base/template.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.store.jagg.c0._c_anonymous_26(/store/jagg/jagg.jag:243)
at org.jaggeryjs.rhino.store.jagg.c0.call(/store/jagg/jagg.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.jaggeryjs.rhino.store.jagg.c0._c_anonymous_52(/store/jagg/jagg.jag:695)
at org.jaggeryjs.rhino.store.jagg.c0.call(/store/jagg/jagg.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.jaggeryjs.rhino.store.site.themes.wso_2.templates.page.base.c0._c_anonymous_1(/store/site/themes/wso2/templates/page/base/template.jag:70)
at org.jaggeryjs.rhino.store.site.themes.wso_2.templates.page.base.c0.call(/store/site/themes/wso2/templates/page/base/template.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.store.jagg.c0._c_anonymous_50(/store/jagg/jagg.jag:678)
at org.jaggeryjs.rhino.store.jagg.c0.call(/store/jagg/jagg.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.jaggeryjs.rhino.store.site.pages.c0._c_anonymous_1(/store/site/pages/list-apis.jag:24)
at org.jaggeryjs.rhino.store.site.pages.c0.call(/store/site/pages/list-apis.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at org.jaggeryjs.rhino.store.site.pages.c0._c_script_0(/store/site/pages/list-apis.jag:10)
at org.jaggeryjs.rhino.store.site.pages.c0.call(/store/site/pages/list-apis.jag)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.jaggeryjs.rhino.store.site.pages.c0.call(/store/site/pages/list-apis.jag)
at org.jaggeryjs.rhino.store.site.pages.c0.exec(/store/site/pages/list-apis.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
{org.apache.solr.core.SolrCore}
I've found the solution to above problem. The issue was coming because WSO2-APIM unable to generate correct solr query, when Application Name contains : character.
I removed : from table AM_APPLICATION (column Name: NAME) & from table UM_HYBRID_ROLE (column name: UM_ROLE_NAME).
Then I've performed following steps:
stopped the WSO2-APIM
deleted solr directory
Rename the <lastAccessTimeLocation> element in the <APIM_2.0.0_HOME>/repository/conf/registry.xml file. If you use a clustered/distributed API Manager setup, change the file in the API Publisher node.
For example, change the
/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime registry path to
/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1.
This has solved my problem. But now I ran into another performance issue.