Jump to content
The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now! See more information here ×

FIndByCriteria (WIldcard Search)


sello samuel

Recommended Posts

I am trying to implement a wildcard search on a case field. below is the code snipet which is exactly as from this documenthttps://docs.tibco.com/pub/amx-bpm/4.3.0/doc/html/bpmhelp/GUID-C8F9803B-1D05-4356-96CD-C08033BF4E45.html.

I am getting the follwing error detail from itermediate event mapping:com.tibco.bx.core.faults.BxException: org.hibernate.exception.DataException: could not execute query.

Snippet of log message is attched.

// Create a new Criteria object defining a query to run against the Order class.

var criteria = cac_co_za_os_osnetbuildsapbom_PNR.createCriteria(" description= :description ORDER BY description ASC", 0, 10);

// Set the initial value of the orderClerk parameter.

criteria.setQueryParameter("description", "How%");

// Execute the query.

var orderList1 = cac_co_za_os_osnetbuildsapbom_PNR.findByCriteria(criteria);

if(orderList1.size() > 0)

{

var ref1 = orderList1.get(0);

PNR = ref1.readPNR();

}

 

// Run the query again using a different orderClerk parameter value.

criteria.setQueryParameter("description", "LMY+%");

var orderList2 = cac_co_za_os_osnetbuildsapbom_PNR.findByCriteria(criteria);

if(orderList2.size() > 0)

{

var ref1 = orderList2.get(0);

PNR = ref1.readPNR();

}

 

28 Aug 2019 09:12:39,039 [PVM:DB Process Worker-2] [ERROR] com.tibco.bds.core.services.impl.BusinessDataServicesPrivateServiceImpl - [ERROR] - {BDS_GLOBAL_DATA_FIND_BY_CRITERIA_FAULT} - Fault while attempting to find BDS Class using Criteria {extendedMessage=`could not execute query`, componentClassName=`com.tibco.bds.core.services.impl.BusinessDataServicesPrivateServiceImpl`, requestReceived=`2019-08-28T07:12:38.998Z`, hostAddress=`10.227.92.10`, nodeName=`BPMPrimaryNode`, modelVersion=`co.za.os.osnetbuildsapbom.PNR`, applicationId=`Global Data Private Service / findCaseByCriteria`, eventType=`FAULT`, messageCategory=`GLOBAL_DATA`, componentId=`BDS`, managedObjectName=`1.0.0.20190821175317420`, stackTrace=`org.hibernate.exception.DataException: could not execute query

at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)

at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

at org.hibernate.loader.Loader.doList(Loader.java:2220)

at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)

at org.hibernate.loader.Loader.list(Loader.java:2103)

at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)

at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:340)

at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)

at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1122)

at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)

at com.tibco.bds.core.search.SearchEvaluator.execute(SearchEvaluator.java:140)

at com.tibco.bds.core.dao.teneo.BDSDAOImpl.findCaseBySearch(BDSDAOImpl.java:1057)

at com.tibco.bds.common.da.service.impl.BaseDACommonServiceImpl.findCaseBySearch(BaseDACommonServiceImpl.java:922)

at com.tibco.bds.core.services.GlobalDataFinderService.findCaseBySearch(GlobalDataFinderService.java:108)

at com.tibco.bds.core.services.impl.BusinessDataServicesPrivateServiceImpl.findCaseByCriteria(BusinessDataServicesPrivateServiceImpl.java:1669)

at sun.reflect.GeneratedMethodAccessor9761.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at com.sun.proxy.$Proxy263.findCaseByCriteria(Unknown Source)

at sun.reflect.GeneratedMethodAccessor9761.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.tibco.amf.platform.runtime.componentframework.internal.proxies.operation.OperationHandler$1.run(OperationHandler.java:463)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Unknown Source)

at com.tibco.amf.platform.runtime.componentframework.internal.proxies.operation.OperationHandler.invokeMethodWithThreadContext(OperationHandler.java:450)

at com.tibco.amf.platform.runtime.componentframework.internal.proxies.operation.SyncToSyncOperationHandler.invoke(SyncToSyncOperationHandler.java:81)

at com.tibco.amf.platform.runtime.componentframework.internal.proxies.ProxyInvocationHandlerRegistry$ProxyInvocationContext.invoke(ProxyInvocationHandlerRegistry.java:379)

at com.sun.proxy.$Proxy95.findCaseByCriteria(Unknown Source)

at com.tibco.bds.common.si.impl.SIServicePrivateImpl.findCaseByCriteria(SIServicePrivateImpl.java:566)

at com.tibco.bds.common.si.impl.SIServiceBaseImpl.findCaseByCriteriaObject(SIServiceBaseImpl.java:346)

at co.za.os.osnetbuildsapbom.si.cac.impl.PNRCACImpl.findByCriteria(PNRCACImpl.java:127)

at sun.reflect.GeneratedMethodAccessor9763.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.tibco.n2.javascript.MemberBox.o00000(MemberBox.java:126)

at com.tibco.n2.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)

at com.tibco.n2.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)

at com.tibco.n2.javascript.gen._Unknown_Source__51942._c_script_0(:8)

at com.tibco.n2.javascript.gen._Unknown_Source__51942.call()

at com.tibco.n2.javascript.ContextFactory.doTopCall(ContextFactory.java:394)

at com.tibco.n2.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3092)

at com.tibco.n2.javascript.gen._Unknown_Source__51942.call()

at com.tibco.n2.javascript.gen._Unknown_Source__51942.exec()

at com.tibco.n2.javascript.engine.A.eval(JsmCompiledScript.java:60)

at com.tibco.expr.script.emf.ScriptEmfExpressionManager$ScriptEmfExpressionImpl.eval(ScriptEmfExpressionManager.java:210)

at com.tibco.bx.core.behaviors.BxExpressionHelper$1.run(BxExpressionHelper.java:100)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Unknown Source)

at com.tibco.bx.core.behaviors.BxExpressionHelper.evalAsSubject(BxExpressionHelper.java:93)

at com.tibco.bx.core.behaviors.BxExpressionHelper.evaluate(BxExpressionHelper.java:120)

at com.tibco.bx.core.behaviors.activity.BxScriptBehavior.doWork(BxScriptBehavior.java:85)

at com.tibco.bx.core.behaviors.activity.BxScriptBehavior.doEval(BxScriptBehavior.java:36)

at com.tibco.bx.core.behaviors.activity.BxActivityBaseBehavior.eval(BxActivityBaseBehavior.java:884)

at com.tibco.bx.core.behaviors.activity.BxActivityBaseBehavior.eval(BxActivityBaseBehavior.java:1)

at com.tibco.pvm.infra.api.impl.util.director.IpmEventDirectorBase.handleModelEvent(IpmEventDirectorBase.java:231)

at com.tibco.pvm.infra.api.impl.util.director.IpmEventDirectorBase.handleEvent(IpmEventDirectorBase.java:112)

at com.tibco.pvm.infra.support.work.impl.WorkItemAbstract.execute(WorkItemAbstract.java:197)

at com.tibco.pvm.db.persist.services.engine.IdbSTWorkRunnable.doWorkBlock(IdbSTWorkRunnable.java:134)

at com.tibco.pvm.infra.services.engine.impl.STWorkRunnable.run(STWorkRunnable.java:50)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.sql.SQLDataException: ORA-01425: escape character must be character string of length 1

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:79)

at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)

at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)

at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)

at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)

at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)

at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)

at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)

at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)

at org.tranql.connector.jdbc.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:161)

at org.tranql.connector.jdbc.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:52)

at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:187)

at org.hibernate.loader.Loader.getResultSet(Loader.java:1791)

at org.hibernate.loader.Loader.doQuery(Loader.java:674)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:23

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...