jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Rhodes <spamsu...@rhoderunner.com>
Subject ClassCastException with AndQueryNode error
Date Thu, 17 May 2007 02:11:42 GMT
Hi Everyone, 
I am trying to run a xpath "and" query which errors out with a java.lang.ClassCastException:
org.apache.jackrabbit.core.query.AndQueryNode

Here is my xpath query:
/jcr:root/stitchesDemo//*[@CONTENT_TYPE = 'ImageContent'] and /jcr:root/stitchesDemo//*[jcr:contains(.,'test')]

I am running jackrabbit version 1.2.2

Is it me (and my bad xpath) or something else?

Thanks everyone.
Phillip





21:54:56,059 DEBUG StitchServiceImpl:143 - /jcr:root/stitchesDemo//*[@CONTENT_TYPE = 'ImageContent']
and /jcr:root/stitchesDemo//*[jcr:contains(.,'test')]
org.springframework.dao.DataRetrievalFailureException: Invalid query; nested exception is
javax.jcr.query.InvalidQueryException: org.apache.jackrabbit.core.query.AndQueryNode: org.apache.jackrabbit.core.query.AndQueryNode:
org.apache.jackrabbit.core.query.AndQueryNode
Caused by: javax.jcr.query.InvalidQueryException: org.apache.jackrabbit.core.query.AndQueryNode:
org.apache.jackrabbit.core.query.AndQueryNode: org.apache.jackrabbit.core.query.AndQueryNode
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.<init>(XPathQueryBuilder.java:268)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.createQuery(XPathQueryBuilder.java:294)
	at org.apache.jackrabbit.core.query.xpath.QueryBuilder.createQueryTree(QueryBuilder.java:37)
	at org.apache.jackrabbit.core.query.QueryParser.parse(QueryParser.java:54)
	at org.apache.jackrabbit.core.query.lucene.QueryImpl.<init>(QueryImpl.java:123)
	at org.apache.jackrabbit.core.query.lucene.SearchIndex.createExecutableQuery(SearchIndex.java:348)
	at org.apache.jackrabbit.core.query.QueryImpl.init(QueryImpl.java:103)
	at org.apache.jackrabbit.core.SearchManager.createQuery(SearchManager.java:314)
	at org.apache.jackrabbit.core.query.QueryManagerImpl.createQuery(QueryManagerImpl.java:85)
	at org.authsum.stitches.server.StitchServiceImpl.findContents(StitchServiceImpl.java:145)
	at org.authsum.stitches.server.StitchServiceImpl.findContents(StitchServiceImpl.java:159)
	at org.authsum.stitches.server.StitchServiceImpl.searchContents(StitchServiceImpl.java:1509)
	at org.authsum.stitches.server.StitchServiceImpl.access$16(StitchServiceImpl.java:1503)
	at org.authsum.stitches.server.StitchServiceImpl$18.doInJcr(StitchServiceImpl.java:1460)
	at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:76)
	at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:108)
	at org.authsum.stitches.server.StitchServiceImpl.searchImages(StitchServiceImpl.java:1455)
	at org.authsum.stitches.server.StitchServiceImpl$$FastClassByCGLIB$$56f432d3.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:675)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:616)
	at org.authsum.stitches.server.StitchServiceImpl$$EnhancerByCGLIB$$fe0de3ee.searchImages(<generated>)
	at org.authsum.stitches.components.image.ImageSearch.performSearch(ImageSearch.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(ListenerMethodInvokerImpl.java:214)
	at org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:155)
	at org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(ListenerMethodInvokerImpl.java:124)
	at org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:69)
	at org.apache.tapestry.listener.SyntheticListener.actionTriggered(SyntheticListener.java:51)
	at org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener(ListenerInvokerTerminator.java:51)
	at $ListenerInvoker_11297bb837f.invokeListener($ListenerInvoker_11297bb837f.java)
	at org.apache.tapestry.form.Form.renderComponent(Form.java:230)
	at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
	at org.apache.tapestry.form.Form.rewind(Form.java:327)
	at org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:439)
	at org.apache.tapestry.form.Form.trigger(Form.java:338)
	at org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:146)
	at org.apache.tapestry.engine.DirectService.service(DirectService.java:132)
	at $IEngineService_11297bb83d8.service($IEngineService_11297bb83d8.java)
	at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:66)
	at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
	at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
	at $WebRequestServicer_11297bb83b3.service($WebRequestServicer_11297bb83b3.java)
	at org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:48)
	at $WebRequestServicerFilter_11297bb83b5.service($WebRequestServicerFilter_11297bb83b5.java)
	at $WebRequestServicer_11297bb83b7.service($WebRequestServicer_11297bb83b7.java)
	at $WebRequestServicer_11297bb83af.service($WebRequestServicer_11297bb83af.java)
	at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
	at $ServletRequestServicer_11297bb8395.service($ServletRequestServicer_11297bb8395.java)
	at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
	at $ServletRequestServicerFilter_11297bb8391.service($ServletRequestServicerFilter_11297bb8391.java)
	at $ServletRequestServicer_11297bb8397.service($ServletRequestServicer_11297bb8397.java)
	at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
	at $ServletRequestServicerFilter_11297bb838f.service($ServletRequestServicerFilter_11297bb838f.java)
	at $ServletRequestServicer_11297bb8397.service($ServletRequestServicer_11297bb8397.java)
	at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
	at $ServletRequestServicerFilter_11297bb8393.service($ServletRequestServicerFilter_11297bb8393.java)
	at $ServletRequestServicer_11297bb8397.service($ServletRequestServicer_11297bb8397.java)
	at $ServletRequestServicer_11297bb8389.service($ServletRequestServicer_11297bb8389.java)
	at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
	at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:168)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: org.apache.jackrabbit.core.query.AndQueryNode
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:339)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:495)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:432)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:495)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:495)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:495)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:495)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:495)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:495)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:89)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.createPathQueryNode(XPathQueryBuilder.java:658)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:335)
	at org.apache.jackrabbit.core.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:80)
	at org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder.<init>(XPathQueryBuilder.java:263)

Mime
View raw message