0
elemets我使用HQL要求檢查一列名爲SharedItems和映射爲java.util.ArrayList中包含了一些文字,像這樣:檢查,如果ArrayList包含使用HQL
where 'someText' in elements(SharedItems)
這工作不正常當 'SharedItems' 列包含空值,它會顯示:
Wrapped Exception: null
at com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2398)
at com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2327)
at com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2315)
at com.xpn.xwiki.store.XWikiCacheStore.search(XWikiCacheStore.java:659)
at com.xpn.xwiki.XWiki.search(XWiki.java:1747)
at com.xpn.xwiki.api.XWiki.search(XWiki.java:512)
at sun.reflect.GeneratedMethodAccessor610.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.doInvoke(UberspectImpl.java:389)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
... 137 more
是SharedItems初始化?它看起來像它可能不是 –
THX @約翰·凱恩,我想所有單元初始化空的ArrayList,但它似乎是例外存在。 – vivo
細胞?是arraylist null? –