When running the examples, I get the following error:
Exception in thread "main" java.lang.RuntimeException: setCurrentTime():Time zone could not be inicialized
at ch.ethz.mxquery.query.Context.setCurrentTime(Context.java:909)
at ch.ethz.mxquery.query.impl.PreparedStatementImpl.evaluate(PreparedStatementImpl.java:37)
at ch.ethz.mxquery.example.MXQuery.doQuery2(MXQuery.java:253)
at ch.ethz.mxquery.example.MXQuery.executeQuery(MXQuery.java:225)
at ch.ethz.mxquery.example.MXQuery.main(MXQuery.java:114)
I added additional debug to print the actual error message caught in Context.java, and the format of the timezoneOffset is: PT-300M
I am in the USA on EST
Looking at MXQueryDayTimeDuration.java, the first check in the parse method has the following check:
if(input.indexOf("+") >= 0 || input.indexOf("-") > 0 )
throw new StaticException(ErrorCodes.F0023_INVALID_VALUE_FOR_CAST_CONSTRUCTOR, "Incorrect format of the Duration value");
Obviously, this fails because the "-" has an index of 2.
It works OK if the time zone is GMT or any positive offset from that.
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We were able to reproduce the bug, and it is now fixed in our internal builds. We will release a new version (including this and other bug fixes) to coming week or the other week. If you want to have a snapshot release in the meantime, please let me me know.
Regards,
Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When running the examples, I get the following error:
Exception in thread "main" java.lang.RuntimeException: setCurrentTime():Time zone could not be inicialized
at ch.ethz.mxquery.query.Context.setCurrentTime(Context.java:909)
at ch.ethz.mxquery.query.impl.PreparedStatementImpl.evaluate(PreparedStatementImpl.java:37)
at ch.ethz.mxquery.example.MXQuery.doQuery2(MXQuery.java:253)
at ch.ethz.mxquery.example.MXQuery.executeQuery(MXQuery.java:225)
at ch.ethz.mxquery.example.MXQuery.main(MXQuery.java:114)
I added additional debug to print the actual error message caught in Context.java, and the format of the timezoneOffset is: PT-300M
I am in the USA on EST
Looking at MXQueryDayTimeDuration.java, the first check in the parse method has the following check:
if(input.indexOf("+") >= 0 || input.indexOf("-") > 0 )
throw new StaticException(ErrorCodes.F0023_INVALID_VALUE_FOR_CAST_CONSTRUCTOR, "Incorrect format of the Duration value");
Obviously, this fails because the "-" has an index of 2.
It works OK if the time zone is GMT or any positive offset from that.
Steve
Hi Steve,
thanks for the bug report.
We were able to reproduce the bug, and it is now fixed in our internal builds. We will release a new version (including this and other bug fixes) to coming week or the other week. If you want to have a snapshot release in the meantime, please let me me know.
Regards,
Peter
Now fixed in version 0.4.1