Topic
1 reply Latest Post - ‏2012-08-29T18:07:19Z by SystemAdmin
SystemAdmin
SystemAdmin
228 Posts
ACCEPTED ANSWER

Pinned topic com.ibm.mm.sdk.common.DKQueryException: DGL5020A: Illegal token ')'

‏2012-08-23T09:49:20Z |
Below is the query of content manager which I am firing from java code but getting exception .I dont find any syntax error in the below query.Please guide.

[|#LOOSEMAILS|** ( ( @FormID [=] ((111061)) ) ) AND (@Trigger [=] (7)) |], Native Query[/LOOSEMAILS[(( ( @FormID  = 
"(111061") ) ) AND (@Trigger  = 7)) AND @SEMANTICTYPE BETWEEN 1 AND 2]]

getting error


`com.awpl.ds.dspi.ProcessInitiatorException: com.docstore.api.provider.AWDocumentstoreException: Query[|#LOOSEMAILS|**( ( @FormID [=] ((111061)) ) ) AND (@Trigger [=] (7))|],Native Query[/LOOSEMAILS[(( ( @FormID  = 
"(111061") ) ) AND (@Trigger  = 7)) AND @SEMANTICTYPE BETWEEN 1 AND 2]] at com.awpl.ds.dspi.ProcessInitiator.initiateProcesses(ProcessInitiator.java:620) at com.awpl.ds.dspi.ui.ProcessInitiatorTask.run(ProcessInitiatorTask.java:93) at java.util.Timer$TimerImpl.run(Timer.java:291) Caused by: com.docstore.api.provider.AWDocumentstoreException: Query[|#LOOSEMAILS|**( ( @FormID [=] ((111061)) ) ) AND (@Trigger [=] (7))|],Native Query[/LOOSEMAILS[(( ( @FormID  = 
"(111061") ) ) AND (@Trigger  = 7)) AND @SEMANTICTYPE BETWEEN 1 AND 2]] at com.docstore.api.engine.DSEAICM.AWEICMDocumentstore.search(AWEICMDocumentstore.java:841) at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy30.search(Unknown Source) at com.docstore.api.provider.AWDocumentstore.search(AWDocumentstore.java:274) at com.awpl.ds.dspi.impl.EngineServicesImpl.search(EngineServicesImpl.java:128) at com.awpl.ds.dspi.ProcessInitiator.initiateProcesses(ProcessInitiator.java:283) ... 2 more Caused by: com.ibm.mm.sdk.common.DKQueryException: DGL5020A: Illegal token 
')' (63,63) encountered in the query string. at com.ibm.mm.sdk.internal.ql.PQExceptionHelperICM.<init>(PQExceptionHelperICM.java:130) at com.ibm.mm.sdk.internal.ql.XqpeParser.report_fatal_error(XqpeParser.java:739) at com.ibm.mm.sdk.internal.ql.XqpeParser.unrecovered_syntax_error(XqpeParser.java:764) at java_cup.runtime.lr_parser.parse(lr_parser.java:601) at com.ibm.mm.sdk.internal.ql.PQueryEngineICM.sqlString(PQueryEngineICM.java:714) at com.ibm.mm.sdk.internal.ql.PQueryEngineICM.process(PQueryEngineICM.java:643) at com.ibm.mm.sdk.server.DKResultSetCursorICM.processQuery(DKResultSetCursorICM.java:288) at com.ibm.mm.sdk.server.DKResultSetCursorICM.Init(DKResultSetCursorICM.java:230) at com.ibm.mm.sdk.server.DKResultSetCursorICM.<init>(DKResultSetCursorICM.java:140) at com.ibm.mm.sdk.server.DKDatastoreICM.execute(DKDatastoreICM.java:3899) at com.ibm.mm.sdk.server.DKDatastoreICM.execute(DKDatastoreICM.java:3769) at com.docstore.api.engine.DSEAICM.AWEICMDocumentstore.search(AWEICMDocumentstore.java:836) ... 15 more
  • SystemAdmin
    SystemAdmin
    228 Posts
    ACCEPTED ANSWER

    Re: com.ibm.mm.sdk.common.DKQueryException: DGL5020A: Illegal token ')'

    ‏2012-08-29T18:07:19Z  in response to SystemAdmin
    Looks like the native query is putting one of the open parens inside the quotes, so it is not see as a paren.

    /LOOSEMAILS[(( ( @FormID  = "(111061") ) ) AND (@Trigger  = 7)) AND @SEMANTICTYPE BETWEEN 1 AND 2]
                                ^^
    

    should be:

    /LOOSEMAILS[(( ( @FormID  = ("111061") ) ) AND (@Trigger  = 7)) AND @SEMANTICTYPE BETWEEN 1 AND 2]
                                ^^