Hello,
I upgreaded to openreports 3.0.1 and I found this issue:
When I log in as Administrator and attempt to edit an existing Report to add other output types (e.g. Excel) and press SAVE I get a message on the screen:
query must begin with SELECT or FROM: DELETE [DELETE org.efs.openreports.objects.ORTag orTag where orTag.objectId = ? and orTag.objectClass = ? and orTag.tagType = ? ]
I went into debug mode and narrowed this down to a statement in TagProviderImpl.java:
session
.createQuery(
"DELETE org.efs.openreports.objects.ORTag orTag where orTag.objectId = ? and orTag.objectClass = ? and orTag.tagType = ? ")
.setInteger(0, objectId.intValue()).setString(1, objectClass.getName()).setString(2, tagType).executeUpdate();
stacktrace is as follows:
org.hibernate.QueryException: query must begin with SELECT or FROM: DELETE [DELETE org.efs.openreports.objects.ORTag orTag where orTag.objectId = ? and orTag.objectClass = ? and orTag.tagType = ? ]
at org.hibernate.hql.classic.ClauseParser.token(ClauseParser.java:83)
at org.hibernate.hql.classic.PreprocessingParser.token(PreprocessingParser.java:108)
at org.hibernate.hql.classic.ParserHelper.parse(ParserHelper.java:28)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:191)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:167)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)
at org.efs.openreports.providers.impl.TagProviderImpl.setTags(TagProviderImpl.java:206)
at org.efs.openreports.actions.admin.EditReportAction.execute(EditReportAction.java:248)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Is this a problem with my setup or is this a bug?
Thanks, Diane
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, one more note on this. When I select other output types as described above the update does take place correctly (i.e. the new output types selected do show up as options when I go to run the report), but the above error in my log shows up.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I upgreaded to openreports 3.0.1 and I found this issue:
When I log in as Administrator and attempt to edit an existing Report to add other output types (e.g. Excel) and press SAVE I get a message on the screen:
query must begin with SELECT or FROM: DELETE [DELETE org.efs.openreports.objects.ORTag orTag where orTag.objectId = ? and orTag.objectClass = ? and orTag.tagType = ? ]
I went into debug mode and narrowed this down to a statement in TagProviderImpl.java:
session
.createQuery(
"DELETE org.efs.openreports.objects.ORTag orTag where orTag.objectId = ? and orTag.objectClass = ? and orTag.tagType = ? ")
.setInteger(0, objectId.intValue()).setString(1, objectClass.getName()).setString(2, tagType).executeUpdate();
stacktrace is as follows:
org.hibernate.QueryException: query must begin with SELECT or FROM: DELETE [DELETE org.efs.openreports.objects.ORTag orTag where orTag.objectId = ? and orTag.objectClass = ? and orTag.tagType = ? ]
at org.hibernate.hql.classic.ClauseParser.token(ClauseParser.java:83)
at org.hibernate.hql.classic.PreprocessingParser.token(PreprocessingParser.java:108)
at org.hibernate.hql.classic.ParserHelper.parse(ParserHelper.java:28)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:191)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:167)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)
at org.efs.openreports.providers.impl.TagProviderImpl.setTags(TagProviderImpl.java:206)
at org.efs.openreports.actions.admin.EditReportAction.execute(EditReportAction.java:248)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Is this a problem with my setup or is this a bug?
Thanks, Diane
Also, one more note on this. When I select other output types as described above the update does take place correctly (i.e. the new output types selected do show up as options when I go to run the report), but the above error in my log shows up.