esper icon indicating copy to clipboard operation
esper copied to clipboard

Using PortfolioService methods from epl statements

Open shlominng opened this issue 10 years ago • 5 comments

Hi

I'm trying to use the following method inside an epl statement method: portfolioService.getNetLiqValueDouble()

The problem is that i get the following error - " Ambiguous method name: method by name 'getNetLiqValueDouble' is overloaded in class 'ch.algotrader.service.PortfolioService' "

I did notice that there's an overloading on that method (one without parameters and one with a string) but i'm using the method without parameters and it does work within the java code (just not in the epl statement)

Does anyone know the reason for that error ?

Thanks in advance, Shlomi

shlominng avatar Oct 13 '16 12:10 shlominng

Provide a sample class please that reproduces this?

bernhardttom avatar Oct 13 '16 14:10 bernhardttom

Hi I've added 2 attachments, the first one "MartinService "is the class who works properly and the other one " epl statement" is the one that trigger the error class martinservice epl statement

thank you for the quick respond, Shlomi

shlominng avatar Oct 13 '16 15:10 shlominng

The class PortfolioService has two methods with the same name but different signatures:

ch.algotrader.service.PortfolioService.getNetLiqValueDouble() ch.algotrader.service.PortfolioService.getNetLiqValueDouble(String)

Looks like Esper cannot distinguish those two methods and throws:

Ambiguous method name: method by name 'getNetLiqValueDouble' is overloaded in class 'ch.algotrader.service.PortfolioService'

andyflury avatar Oct 14 '16 08:10 andyflury

Hi

I notice that. Do you know a way to fix it and use portfolioService methods with esper ?

shlominng avatar Oct 15 '16 16:10 shlominng

There as a change just merged that will be in version 6 that improves this behavior for overloaded methods.

bernhardttom avatar Oct 25 '16 20:10 bernhardttom