Hi Malintha, On Wed, Jun 27, 2018 at 4:57 PM Malintha Amarasinghe <malint...@wso2.com> wrote:
> Hi Dinusha, > > It should work, basically the shell script created inside the distribution > (distribution/micro-gw-marketing_store/bin/micro_gw.sh) also doing a > ballerina run command. > > Does running the above file (./micro_gw.sh) work? > Yes, that works. > If it works, the ballerina runtime installed in your machine may be not > matching with the balx file generated here. Please check with "ballerina > --version" > 0.970.1. What should be the ballerina version relevant to micro-gw alpha release ? Regards, Dinusha > > Thanks! > > On Wed, Jun 27, 2018 at 4:01 PM, Dinusha Senanayaka <dinu...@wso2.com> > wrote: > >> Hi APIM team, >> >> I'm trying to run micro-gw build generated balx file as a separate >> ballerina program and getting following error. Is that something possible ? >> Any idea on what could be wrong here ? >> >> Tried to execute the balx file in project's target directory and then the >> one in "target/distribution/micro-gw-marketing_store/exec" directory. >> >> projects/marketing_store/target/distribution/micro-gw-marketing_store/exec$ >> *tree* >> . >> ├── ballerina-internal.log >> └── marketing_store.balx >> >> $ *ballerina run marketing_store.balx --config ../conf/micro-gw.conf * >> ballerina: Oh no, something really went wrong. Bad. Sad. >> >> *There should be a file named "ballerina-internal.log" in the current >> directory.* >> If you are able to share with us the code that broke Ballerina then >> we would REALLY appreciate if you would report this to us: >> go to https://github.com/ballerina-platform/ballerina-lang/issues and >> create a bug report with both this log file and the sample code. >> >> Following exception can be seen in "ballerina-internal.log" file. >> >> ERROR {org.ballerinalang.launcher.Main} - ballerina: invalid program >> file format >> org.ballerinalang.util.exceptions.ProgramFileFormatException: ballerina: >> invalid program file format >> at org.ballerinalang.BLangProgramLoader.read(BLangProgramLoader.java:46) >> at >> org.ballerinalang.launcher.LauncherUtils.runProgram(LauncherUtils.java:82) >> at org.ballerinalang.launcher.Main$RunCmd.execute(Main.java:256) >> at java.util.Optional.ifPresent(Optional.java:159) >> at org.ballerinalang.launcher.Main.main(Main.java:66) >> Caused by: java.lang.IndexOutOfBoundsException: Index: 33554432, Size: 125 >> at java.util.ArrayList.rangeCheck(ArrayList.java:657) >> at java.util.ArrayList.get(ArrayList.java:433) >> at >> org.ballerinalang.util.codegen.PackageInfo.getCPEntry(PackageInfo.java:103) >> at >> org.ballerinalang.util.codegen.ProgramFileReader.getAttributeInfo(ProgramFileReader.java:1143) >> at >> org.ballerinalang.util.codegen.ProgramFileReader.readAttributeInfoEntries(ProgramFileReader.java:1133) >> at >> org.ballerinalang.util.codegen.ProgramFileReader.readStructInfoEntries(ProgramFileReader.java:497) >> at >> org.ballerinalang.util.codegen.ProgramFileReader.readPackageInfo(ProgramFileReader.java:377) >> at >> org.ballerinalang.util.codegen.ProgramFileReader.readProgramInternal(ProgramFileReader.java:159) >> at >> org.ballerinalang.util.codegen.ProgramFileReader.readProgram(ProgramFileReader.java:126) >> at org.ballerinalang.BLangProgramLoader.read(BLangProgramLoader.java:39) >> ... 4 more >> >> Regards, >> Dinusha >> >> -- >> Dinusha Dilrukshi >> Technical Lead >> WSO2 Inc.: http://wso2.com/ >> Mobile: +94764069991 >> Blog: http://dinushasblog.blogspot.com/ >> > > > > -- > Malintha Amarasinghe > *WSO2, Inc. - lean | enterprise | middleware* > http://wso2.com/ > > Mobile : +94 712383306 > -- Dinusha Dilrukshi Technical Lead WSO2 Inc.: http://wso2.com/ Mobile: +94764069991 Blog: http://dinushasblog.blogspot.com/
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev