Hi All, I am getting the following error when invoking new user approval REST API in IS-5.9.0-M6-SNAPSHOT, which is built with carbon kernel-4.5.0-M4 at first server startup.
Caused by: <openjpa-2.2.0-wso2v1-r128166:129108 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "SELECT COUNT(DISTINCT t) FROM org.wso2.carbon.humantask.core.dao.jpa.openjpa.model.Task t JOIN t.humanRoles hr JOIN hr.orgEntities oe WHERE oe.name IN :names AND hr.type = :roleType AND t.type = :taskType AND t.tenantId = :tenantId AND t.status IN :taskStatuses". Error message: The name "org.wso2.carbon.humantask.core.dao.jpa.openjpa.model.Task" is not a recognized entity or identifier. Perhaps you meant PresentationDescription, which is a close match. Known entity names: [Task, PresentationDescription, Message, ProcessInstanceDAOImpl, CorrelatorDAOImpl, ScopeDAOImpl, Attachment, MexProperty, ProcessDAOImpl, PresentationSubject, AttachmentDAOImpl, ActivityRecoveryDAOImpl, TaskVersion, MessageExchangeDAOImpl, MessageDAOImpl, Comment, XmlDataProperty, HumanTaskJob, PresentationParameter, OrganizationalEntity, Deadline, MessageRouteDAOImpl, PresentationName, FaultDAOImpl, GenericHumanRole, PresentationElement, PartnerLinkDAOImpl, Event, CorrelationSetDAOImpl, EventDAOImpl, DeploymentUnit, XmlDataDAOImpl, CorrSetProperty] at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:119) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:194) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:167) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:242) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:212) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:205) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$200(JPQLExpressionBuilder.java:80) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:2417) at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:61) at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:162) at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:673) at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:654) at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:620) at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:682) at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:589) at org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:997) at org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:979) at org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:102) at org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder.buildClaimableCountQuery(HumanTaskJPQLQueryBuilder.java:415) at org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder.buildCount(HumanTaskJPQLQueryBuilder.java:113) at org.wso2.carbon.humantask.core.dao.jpa.openjpa.HumanTaskDAOConnectionImpl.getTasksCount(HumanTaskDAOConnectionImpl.java:188) at org.wso2.carbon.humantask.core.TaskOperationServiceImpl$1.call(TaskOperationServiceImpl.java:100) at org.wso2.carbon.humantask.core.TaskOperationServiceImpl$1.call(TaskOperationServiceImpl.java:62) at org.wso2.carbon.humantask.core.scheduler.SimpleScheduler.execTransaction(SimpleScheduler.java:879) at org.wso2.carbon.humantask.core.scheduler.SimpleScheduler.execTransaction(SimpleScheduler.java:828) at org.wso2.carbon.humantask.core.TaskOperationServiceImpl.simpleQuery(TaskOperationServiceImpl.java:62) ... 56 more But, when I invoke HumanTaskClientAPIAdmin SOAP service to list available tasks, it doesn't give any errors. However, when I invoke the REST endpoint again after invoking SOAP service, the error gets resolved and works as expected. Below is a sample curl to invoke the REST endpoint. curl -X GET " https://localhost:9444/t/carbon.super/api/users/v1/me/approval-tasks?status=READY" -H "accept: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -k Following is the SOAP request made prior to getting the issue somehow. https://localhost:9443/services/HumanTaskClientAPIAdmin/ > > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:ns=" > http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803" > xmlns:ns1=" > http://docs.oasis-open.org/ns/bpel4people/ws-humantask/types/200803"> > <soapenv:Header/> > <soapenv:Body> > <ns:simpleQuery> > <ns:simpleQueryInput> > <!--Zero or more repetitions:--> > <ns1:status>READY</ns1:status> > <ns1:status>RESERVED</ns1:status> > <ns1:status>COMPLETED</ns1:status> > <ns1:simpleQueryCategory>CLAIMABLE</ns1:simpleQueryCategory> > </ns:simpleQueryInput> > </ns:simpleQuery> > </soapenv:Body> > </soapenv:Envelope> The above REST API is working on the pack build on top of kernel-4.5.0-M2, without any issue. Appreciate if you can have a look on this. Thanks! -Ayesha -- *Ayesha Dissanayaka* Associate Technical Lead WSO2, Inc : http://wso2.com <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> 20, Palm grove Avenue, Colombo 3 E-Mail: [email protected] <[email protected]> Mobile: +94713580922
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
