Search code examples
integrationwso2-enterprise-integratorballerinaintegratorwso2-bi

Unable to run Examples given by Ballerina Integrator Tutorials


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)```

Solution

  • 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