Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use constants in Priority #106

Open
ysmartin opened this issue Feb 15, 2018 · 0 comments
Open

Cannot use constants in Priority #106

ysmartin opened this issue Feb 15, 2018 · 0 comments

Comments

@ysmartin
Copy link

I am trying to annotate some statements with an @Priority annotation whose value is defined as a constant in a different module:

create constant variable int DEBUG_PRIORITY = Integer.MAX_VALUE;

Then I try to refer that constant from an @Priority annotation

@Name('DebugXXX')
@Audit
@Priority(DEBUG_PRIORITY) // We want debug consumer statements to execut and print their result before other consumers
select *
from XXXType;

But I get this exception when trying to load the module:

2018-02-15 18:04:19,854 ERROR [AnnotationUtil] Unexpected exception compiling annotations in statement, please consult the log file and report the exception: java.lang.String cannot be cast to java.lang.Number

(detailed logs are attached, once internal data has been removed; note that it is the console output, I do not know about the location of the logs file there mentioned.)

I know that a workaround may consist on wiring the value into the priority annotation; but in any case, that ClassCastException makes little sense, as there is no String involved in the whole process (there is a java.lang.Integer constant, then an EPL int variable).
logs-issue-esper-priority.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants