Hi all,

The reason maybe its not working with standard ballerina 0.970.1 is, in
alpha version we are using ballerina 0.974 which comes with the balo
support. So  to generate the balx we use the complied   balo files. This
was not in the ballerina 0.970.1. So there might be a difference between
the generated balx files and also two different bre versions can not
execute same balx


On Wed, Jun 27, 2018 at 5:04 AM Malintha Amarasinghe <[email protected]>
wrote:

> Hi Dinusha,
>
> On Wed, Jun 27, 2018 at 5:01 PM, Dinusha Senanayaka <[email protected]>
> wrote:
>
>>
>> Hi Malintha,
>>
>> On Wed, Jun 27, 2018 at 4:57 PM Malintha Amarasinghe <[email protected]>
>> 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 ?
>>
>
> It is 0.974.0.
>
> I forgot to mention the ballerina runtime we are using in the distribution
> has some custom changes. It has some libraries we have added which are
> specific to APIM, those are not available in the standard ballerina distro.
> But, IIRC using the alpha with standard ballerina runtime was working due
> to they way ballerina built woked at that time. But I think this might fail
> after alpha version.
>
I think this should stay the same. The generated balx can be executed with
same ballerina version because balx is self executable (But this is not
recomended).

>
> If you do not have a special requirement to use standard ballerina for
> running the balx, better way is to use the script provided in the
> distribution itself.
>
> Thanks!
>
>
>>
>> Regards,
>> Dinusha
>>
>>>
>>> Thanks!
>>>
>>> On Wed, Jun 27, 2018 at 4:01 PM, Dinusha Senanayaka <[email protected]>
>>> 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/
>>
>
>
>
> --
> Malintha Amarasinghe
> *WSO2, Inc. - lean | enterprise | middleware*
> http://wso2.com/
>
> Mobile : +94 712383306
>


-- 
Rajith Roshan
Senior Software Engineer, WSO2 Inc.
Mobile: +94-7 <javascript:void(0);>17-064-214
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to