1

I am new to Ballerina and Ballerina Integrator While running the sample given by Ballerina Integrator tutorials getting an Error. Please help me to sort out the issues.

For the reference here i shared the screenshot and log file Error Screenshot.

java.lang.NoSuchMethodError: org.ballerinalang.jvm.types.BRecordType.<init>(Ljava/lang/String;Lorg/ballerinalang/jvm/types/BPackage;IZI)V
    at ballerina.lang_annotations.___init.$createTypeInstances(lang.annotations)
    at ballerina.lang_annotations.___init.$createTypes(lang.annotations)
    at ballerina.lang_annotations.___init.$currentModuleInit(lang.annotations)
    at ballerina.lang_annotations.___init.ballerina_lang_annotations__init_(lang.annotations:65535)
    at 13473.upload_to_ftp.___init.$moduleInit(upload_to_ftp:65535)
    at 13473.upload_to_ftp.___init.$lambda$$moduleInit$(upload_to_ftp)
    at org.ballerinalang.jvm.scheduling.SchedulerItem.execute(Scheduler.java:486)
    at org.ballerinalang.jvm.scheduling.Scheduler.run(Scheduler.java:237)
    at org.ballerinalang.jvm.scheduling.Scheduler.runSafely(Scheduler.java:207)
    at java.lang.Thread.run(Unknown Source)

[2019-11-21 12:17:32,502] SEVERE {b7a.log.crash} - org.ballerinalang.jvm.types.BRecordType.<init>(Ljava/lang/String;Lorg/ballerinalang/jvm/types/BPackage;IZI)V 
java.lang.NoSuchMethodError: org.ballerinalang.jvm.types.BRecordType.<init>(Ljava/lang/String;Lorg/ballerinalang/jvm/types/BPackage;IZI)V
    at ballerina.lang_annotations.___init.$createTypeInstances(lang.annotations)
    at ballerina.lang_annotations.___init.$createTypes(lang.annotations)
    at ballerina.lang_annotations.___init.$currentModuleInit(lang.annotations)
    at ballerina.lang_annotations.___init.ballerina_lang_annotations__init_(lang.annotations:65535)
    at 13473.upload_to_ftp.___init.$moduleInit(upload_to_ftp:65535)
    at 13473.upload_to_ftp.___init.$lambda$$moduleInit$(upload_to_ftp)
    at org.ballerinalang.jvm.scheduling.SchedulerItem.execute(Scheduler.java:486)
    at org.ballerinalang.jvm.scheduling.Scheduler.run(Scheduler.java:237)
    at org.ballerinalang.jvm.scheduling.Scheduler.runSafely(Scheduler.java:207)
    at java.lang.Thread.run(Unknown Source)```
Community
  • 1
  • 1
Sumathi
  • 93
  • 10

3 Answers3

2

To try out the Ballerina Integrator samples, please make sure that you have installed the Ballerina Integrator installer and using it to run your samples. You can download the latest Ballerina Integrator from here.

To check if you are executing Ballerina Integrator, execute which ballerina command and verify that it is similar to <EI_HOME>/ballerina-integrator/bin/ballerina.

Fleur
  • 666
  • 1
  • 8
  • 29
  • I am Sure,i have installed Ballerina Integrator. Now how to run the Ballerina Integrator Samples & Where i have to put samples? Inside of `/ballerina-integrator/` or Any other folder? Please let me know. – Sumathi Jan 22 '20 at 11:10
0

You can downgrade and upgrade Ballerina versions using the ballerina dist command. ballerina dist pull <distribution> will fetch a given distribution and set it as the active version.

  • Apparently version is 1.0.4 and it does not have dist commands – Tharik Kanaka Jan 13 '20 at 05:47
  • I have uninstalled all ballerina from my laptop. From VSCode also uninstalled. After that installed from WSO2 EI 7.0.1 Installer, checked version from /ballerina-integrator/bin/ballerina it shows version as 1.0.2, Now let me know where i have put integration samples ? – Sumathi Jan 17 '20 at 09:55
  • After installing EI 7.0.1, install the VSCode extension for Ballerina Integrator as shown in https://marketplace.visualstudio.com/items?itemName=WSO2.ballerina-integrator. You will find the integration samples in there. – Fleur Jan 21 '20 at 04:42
  • @Fleur After installing EI 7.0.1, installed VSCode Extension for Ballerina Integrator as you have mentioned in the comment, but it showing error alert notification," the dependent ballerina extension is not compatible please install latest " What should i do further – Sumathi Jan 22 '20 at 07:00
0

Mismatch of the version is problem here. Just install Ballerina Integrator alone which is packed with Ballerina 1.0.2 so no need to install Ballerina again or separately.

Locally installed "Ballerina Integrator with Ballerina" is lower version, In VSCode "Ballerina Integrator with Ballerina" is latest one. Mismatched version is the main problem which i was faced.

I have removed BI and Ballerina plugin from VSCode just tried the samples from random location which is used to refer locally installed BI with Ballerina,now its working fine

Sumathi
  • 93
  • 10