[xwiki-notifications] [Issue] Updated: (XWIKI-2064) DBListClass and DBTreeListClass are building invalid SQL statements
[ http://jira.xwiki.org/jira/browse/XWIKI-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yoshtec updated XWIKI-2064: --- Attachment: unittestXWIKI-2064.patch I could not find any Unit Test for the com.xpn.xwiki.objects.classes package so I created it. At the moment I only test for this specific error, since I have not enough knowledge to judge on the other functions so far. But it's a start ;) > DBListClass and DBTreeListClass are building invalid SQL statements > --- > > Key: XWIKI-2064 > URL: http://jira.xwiki.org/jira/browse/XWIKI-2064 > Project: XWiki Platform > Issue Type: Bug >Affects Versions: 1.2.1, 1.3 M1 >Reporter: Yoshtec > Assigned To: Yoshtec >Priority: Minor > Fix For: 1.3 M2 > > Attachments: dblist.patch, unittestXWIKI-2064.patch > > > Query build in DBListClass and DBTreeListClass is invalid since it contains a > "," before the from statement. > Thus resulting in Exceptions like: > org.hibernate.hql.ast.QuerySyntaxException: unexpected token: from near line > 1, column 35 [select idprop.value,idprop.value, from > com.xpn.xwiki.doc.XWikiDocument as doc, com.xpn.xwiki.objects.BaseObject as > obj, com.xpn.xwiki.objects.StringProperty as idprop where > doc.fullName=obj.name and obj.className='' and obj.id=idprop.id.id and > idprop.id.name=''] > at > org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31) > at > org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24) > at > org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59) > at > org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258) > at > org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157) > at > org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56) > at > org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) > 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:1623) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1699) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1659) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1648) > at com.xpn.xwiki.store.XWikiCacheStore.search(XWikiCacheStore.java:420) > at com.xpn.xwiki.XWiki.search(XWiki.java:1278) > at > com.xpn.xwiki.objects.classes.DBListClass.getDBList(DBListClass.java:102) > at > com.xpn.xwiki.objects.classes.DBListClass.getMap(DBListClass.java:128) > at > com.xpn.xwiki.objects.classes.DBListClass.displayView(DBListClass.java:445) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1338) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1318) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1385) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1395) > at com.xpn.xwiki.api.Document.display(Document.java:857) > at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) > at > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) > at > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) > at > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) > at > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:448) > at > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) > at > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:238) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:152) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:95) > at > com.xpn.xwiki.render.DefaultXWikiRenderingEngine.rend
[xwiki-notifications] [Issue] Assigned: (XE-189) DBListClass and DBTreeListClass are building invalid SQL statements
[ http://jira.xwiki.org/jira/browse/XE-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yoshtec reassigned XE-189: -- Assignee: Yoshtec > DBListClass and DBTreeListClass are building invalid SQL statements > --- > > Key: XE-189 > URL: http://jira.xwiki.org/jira/browse/XE-189 > Project: XWiki Enterprise > Issue Type: Bug >Affects Versions: 1.2.1, 1.3 M1 >Reporter: Yoshtec > Assigned To: Yoshtec >Priority: Minor > Attachments: dblist.patch > > > Query build in DBListClass and DBTreeListClass is invalid since it contains a > "," before the from statement. > Thus resulting in Exceptions like: > org.hibernate.hql.ast.QuerySyntaxException: unexpected token: from near line > 1, column 35 [select idprop.value,idprop.value, from > com.xpn.xwiki.doc.XWikiDocument as doc, com.xpn.xwiki.objects.BaseObject as > obj, com.xpn.xwiki.objects.StringProperty as idprop where > doc.fullName=obj.name and obj.className='' and obj.id=idprop.id.id and > idprop.id.name=''] > at > org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31) > at > org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24) > at > org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59) > at > org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258) > at > org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157) > at > org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56) > at > org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) > 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:1623) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1699) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1659) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1648) > at com.xpn.xwiki.store.XWikiCacheStore.search(XWikiCacheStore.java:420) > at com.xpn.xwiki.XWiki.search(XWiki.java:1278) > at > com.xpn.xwiki.objects.classes.DBListClass.getDBList(DBListClass.java:102) > at > com.xpn.xwiki.objects.classes.DBListClass.getMap(DBListClass.java:128) > at > com.xpn.xwiki.objects.classes.DBListClass.displayView(DBListClass.java:445) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1338) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1318) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1385) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1395) > at com.xpn.xwiki.api.Document.display(Document.java:857) > at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) > at > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) > at > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) > at > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) > at > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:448) > at > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) > at > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:238) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:152) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:95) > at > com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:251) > at > com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:176) > at com.xpn.xwiki.XWiki.include(XWiki.java:3206) > at com.xpn.xwiki.api.XWiki.includeForm(XWiki.java:1409) > at com.xpn.xwiki.api.XWiki.includeForm(XWiki.java
[xwiki-notifications] [Issue] Commented: (XE-189) DBListClass and DBTreeListClass are building invalid SQL statements
[ http://jira.xwiki.org/jira/browse/XE-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_22273 ] Yoshtec commented on XE-189: Sorry wrong issue category, should have been XWIKI- > DBListClass and DBTreeListClass are building invalid SQL statements > --- > > Key: XE-189 > URL: http://jira.xwiki.org/jira/browse/XE-189 > Project: XWiki Enterprise > Issue Type: Bug >Affects Versions: 1.2.1, 1.3 M1 >Reporter: Yoshtec >Priority: Minor > Attachments: dblist.patch > > > Query build in DBListClass and DBTreeListClass is invalid since it contains a > "," before the from statement. > Thus resulting in Exceptions like: > org.hibernate.hql.ast.QuerySyntaxException: unexpected token: from near line > 1, column 35 [select idprop.value,idprop.value, from > com.xpn.xwiki.doc.XWikiDocument as doc, com.xpn.xwiki.objects.BaseObject as > obj, com.xpn.xwiki.objects.StringProperty as idprop where > doc.fullName=obj.name and obj.className='' and obj.id=idprop.id.id and > idprop.id.name=''] > at > org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31) > at > org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24) > at > org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59) > at > org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258) > at > org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157) > at > org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56) > at > org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) > 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:1623) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1699) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1659) > at > com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:1648) > at com.xpn.xwiki.store.XWikiCacheStore.search(XWikiCacheStore.java:420) > at com.xpn.xwiki.XWiki.search(XWiki.java:1278) > at > com.xpn.xwiki.objects.classes.DBListClass.getDBList(DBListClass.java:102) > at > com.xpn.xwiki.objects.classes.DBListClass.getMap(DBListClass.java:128) > at > com.xpn.xwiki.objects.classes.DBListClass.displayView(DBListClass.java:445) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1338) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1318) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1385) > at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1395) > at com.xpn.xwiki.api.Document.display(Document.java:857) > at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) > at > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) > at > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) > at > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) > at > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:448) > at > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) > at > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:238) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:152) > at > com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:95) > at > com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:251) > at > com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:176) > at com.xpn.xwiki.XWiki.include(XWiki.java:3206) > at com.xpn.xwiki.api.XWiki.includeForm(XWiki.java:1409) > at com.xpn.xwiki.api.XWik