I am working with Oracle WebCenter Portal, with SOA/BPEL. I have created a custom worklist application ( portlet ) following guidelines from here :
It shows up as portlet, so deployment is fine. When I access this portlet page, it gives me following error.
ORABPEL-30503 : Invalid Token Error in Verification Service. Invalid Token Error in Verification Service. Received invalid token in getTokenType. Verify that correct token is passed
Here's my code snippet, and the complete stack trace below.
Map<IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String> properties = new HashMap<IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String>();
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE, WorkflowServiceClientFactory.SOAP_CLIENT);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.SOAP_END_POINT_ROOT, "http://<hostname>:<port>");
IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.SOAP_CLIENT,properties, null);
ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
IWorkflowContext wfCtx = querySvc.authenticate(userName,password.toCharArray(),null);
I think the code is correct, as it gives "Error in authenticating user" if i use incorrect credentials. But when I use correct credentials, it gives this :
SEVERE: <.> getTokenType: invalid token: a0a4daf4-33ad-4bdf-91d0-c7e22e70efc9;;W3JtvUSwovCa7zQLbYhVjAB8yAfYcPrl6iECyPso9bjnlUp6qzy50EApOPEQmV/3nKWySh+41yNhD4Rl8Ati72glbm1DL6wm/6Kc0nwkXCZaBFE13wFClSdg4m1a4CBqeAEC6TWNdV45mB9popu3phvDTl8LKbfq3mBv/MHTAWSmY/XnqSF+nVtH/Hq3wTOLMQ73aonamjhuKGDzVfFk6pogBKXBOqPZnbhTjfLeu/oGeBjLkwWdIC0F0wrohjgL SEVERE: <.> Invalid Token Error in Verification Service. Invalid Token Error in Verification Service. Received invalid token in getTokenType. Verify that correct token is passed.
ORABPEL-30503
Invalid Token Error in Verification Service. Invalid Token Error in Verification Service. Received invalid token in getTokenType. Verify that correct token is passed.
at oracle.bpel.services.workflow.verification.impl.Token.getTokenType(Token.java:545) at oracle.bpel.services.workflow.verification.impl.Token.<init>(Token.java:188) at oracle.bpel.services.workflow.verification.impl.WorkflowContext.getWorkflowContextFromJAXBObject(WorkflowContext.java:795) at oracle.bpel.services.workflow.verification.impl.WorkflowContext.getWorkflowContextFromElement(WorkflowContext.java:746) at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:186) at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:205) at com.kpit.cams.UAPWorklistMain.main(UAPWorklistMain.java:329)
Below solution from Oracle Support Documentation fixed the issue for me. In summary, it's a jar mismatch between server and jdev that caused the issue.
=========================================================================
You are unable to get the BPM context successfully. There will not be an exception while retrieving the context but when trying to use it you see the exception: BPM-70684
Exception exception.70684.type: error exception.70684.severity: 2 exception.70684.name: Invalid authentication context. exception.70684.description: Invalid authentication context has been passed. exception.70684.fix: Ensure valid authentication context is passed.
The following exceptions have known to be associated with the same issue: Caused by: java.lang.NullPointerException at oracle.bpel.services.workflow.verification.impl.WorkflowContext.hashCode(WorkflowContext.java:583) at java.util.HashMap.get(HashMap.java:300) at oracle.bpel.services.workflow.common.ThreadLocalCache.isContextValidated(ThreadLocalCache.java:146) at oracle.bpel.services.workflow.verification.impl.VerificationService.validateNotNullWorkflowContext(VerificationService.java:1824) at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContext(VerificationService.java:1806)
Error while authenticating on behalf of user weblogic using adminContext [user=null][sessionKey=null][token=null][requester=null][objectId=null] <<.> Verification Service cannot resolve user identity. User null cannot be found in the identity repository. Workflow Context token cannot be null in request.
ORABPEL-30511
Verification Service cannot resolve user identity. User null cannot be found in the identity repository. Workflow Context token cannot be null in request.
at oracle.bpel.services.workflow.verification.impl.LocalCacheManager.lookupUser(LocalCacheManager.java:600)
Caused By: ORABPEL-10501
Illegal argument. Illegal argument. This is because an unexpected value, possibly null, was passed as an argument. Check the error stack and fix the cause of the error. Contact Oracle Support Services if error is not fixable.
at oracle.tip.pc.services.identity.jps.AuthorizationServiceImpl.lookupUser(AuthorizationServiceImpl.java:236) at oracle.tip.pc.services.identity.jps.IdentityServiceImpl.lookupUser(IdentityServiceImpl.java:183) at oracle.bpel.services.workflow.verification.impl.LocalCacheManager.lookupUser(LocalCacheManager.java:596)
We are embedding a BPM task Flow list in an ADF App. It gives the following error infra] <.> Invalid Token Error in Verification Service.[[ Invalid Token Error in Verification Service. Received invalid token in null. Verify that correct token is passed. ORABPEL-30503
Also, If you log the username from the context you'll notice it is null. Cause
The bpm-services.jar on the client application and the server may not match. The SOA/BPM related jars being used on the client and server must be the same or unexpected issues can occur.
Solution
Copy the bpm-services.jar from the server Replace the bpm-services.jar on the client application with the one from the server Ensure that after any patches are applied that the jars on the server are replaced in the client application. This also applies to using jars within JDeveloper which can become out of sync due to patches not being applied on both dev and server machines. You may need to replace the bpm-services.jar located here JDeveloper/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar with the one located here [soa_install_dir]/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar.