1 2 Previous Next 15 Replies Latest reply: Jun 20, 2013 8:13 AM by nicolas_fonnegra RSS

    Exception in lookup TaskQueryService when use remote client to get bpel tas

    479844
      hi all,
      when i run a java code to get task list from soa server, it promt this exception:
      oracle.bpel.services.workflow.client.WorkflowServiceClientException: javax.naming.NameNotFoundException: Exception in lookup.: `TaskQueryService' could not be found. [Root exception is weblogic.corba.cos.naming.NamingContextAnyPackage.NotFound: IDL:weblogic/corba/cos/naming/NamingContextAny/NotFound:1.0]
      at oracle.bpel.services.workflow.query.client.TaskQueryServiceRemoteClient.authenticate(TaskQueryServiceRemoteClient.java:105)
      ...

      here is my code:
      WorkflowServicesClientConfigurationType wscct = new WorkflowServicesClientConfigurationType();
      List<ServerType> servers = wscct.getServer();
      ServerType server = new ServerType();
      server.setDefault(true);
      server.setName("soa");
      servers.add(server);
      RemoteClientType rct = new RemoteClientType();
      rct.setServerURL("t3://TestPC:7001");
      rct.setUserName("weblogic");
      rct.setPassword("weblogic");
      rct.setInitialContextFactory("weblogic.jndi.WLInitialContextFactory");
      rct.setParticipateInClientTransaction(false);
      server.setRemoteClient(rct);
      IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(
      WorkflowServiceClientFactory.REMOTE_CLIENT, wscct, null);
      ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
      IWorkflowContext ctx = querySvc.authenticate("weblogic","weblogic".toCharArray(),null);
      List queryColumns = new ArrayList();
      queryColumns.add("TASKID");
      queryColumns.add("TASKNUMBER");
      queryColumns.add("TITLE");
      queryColumns.add("OUTCOME");
      List tasks = querySvc.queryTasks(ctx,
      queryColumns,
      null,
      ITaskQueryService.AssignmentFilter.MY,
      null,
      null,
      null,
      0,
      0);

      can anyone help? thanks.
        • 1. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
          2d963f24-6654-4274-8909-3f542fd09367

          If Possible reply soon for the above problem because I have the approximately same problem.

          • 2. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
            nicolas_fonnegra

            Hi,

             

            when using this command: rct.setServerURL("t3://TestPC:7001"), make sure that  the adress "t3://TestPC:7001" is the correct one and it points to the right server (where the soa suite is installed). If your domain contains more than one server, then typically you have to use the address of a managed server.


            cheers Nicolas

            • 3. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
              2d963f24-6654-4274-8909-3f542fd09367

              I have given correct both address and password of the weblogic server but it is showing the flowing error:

               

              Error initiating process:javax.naming.NameNotFoundException: Exception in lookup.: `TaskQueryService' could not be found. [Root exception is weblogic.corba.cos.naming.NamingContextAnyPackage.NotFound: IDL:weblogic/corba/cos/naming/NamingContextAny/NotFound:1.0]


              if any expected error is there, plz reply as soon as possible.


              Thanks.


              • 4. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                nicolas_fonnegra

                Hi,

                 

                verify in your  server if  'soa-infra' is correctly deployed in the server you are accessing and that it started correctly (state 'Active'). You can check this in the deployments page in the administration console. Also, check that you are using the correct port , because you may be connecting to the Admin Server instead of the Managed Server where the Soa Suite is

                 

                best regards Nicolas

                • 5. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                  2d963f24-6654-4274-8909-3f542fd09367

                  you were right, there was problem with my Port. But now it is creating problem while creating context.

                   

                  here is my code.

                   

                   

                   

                   

                       IBPMContext ctx = null;

                       ctx = (IBPMContext)processUtils_.getHwfServiceClient().getTaskQueryService().authenticate("test", "test123".toCharArray(), null);

                   


                      // Check that current user is authorized to init the process

                          if(ctx==null)

                          {

                          System.out.println("Authentication Faliure");

                          }

                          String processDN = processUtils_.getInitableProcessDN(ctx, PROJECT_NAME, VERSION, PROCESS_NAME);    

                          if(processDN == null) {

                            System.out.println("Process is not initable. Check deployment and privileges [user:"+ctx.getUser()+"][process:"+PROJECT_NAME+"/"+PROCESS_NAME+"/"+VERSION+"]");

                            return;

                          }

                   

                  I have passed third argument as null to the authenticate method

                  and it shows error as:

                  Error initiating process:Can't overwrite cause

                   

                  I am not getting the exact cause for the problem....................

                  • 6. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                    nicolas_fonnegra

                    provide the stackstrace so we may get a clue what is wrong with your code.

                    • 7. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                      2d963f24-6654-4274-8909-3f542fd09367

                      actually only one line error is there in my console window.

                      i.e.

                      Error initiating process:Can't overwrite cause

                       

                      and for another user it is showing me another error:

                       

                      Error initiating process:Internal error in Verification Service.Internal error in Verification Service for user asmita. LookupUser. Check the underlying exception and correct the error. If the error persists, contact Oracle Support Services.

                       

                      I have authenticated few new users and all are showing the same above error

                      i.e.

                       

                      Error initiating process:Internal error in Verification Service.Internal error in Verification Service for user asmita. LookupUser. Check the underlying exception and correct the error. If the error persists, contact Oracle Support Services.


                      where asmita is name of my user.


                      please suggest me is there any problem in my user or something wrong is going on in my code.

                      • 8. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                        nicolas_fonnegra

                        Are you sure you are printing the whole stack trace and not only the Exception message? Could you post the whole code where you use the BPM API ?

                         

                        For the second problem (Internal error in Verification Service.Internal error in Verification Service for user asmita) you can verify if your user exists in your realm. Are you using any external LDAP?

                        • 9. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                          2d963f24-6654-4274-8909-3f542fd09367

                          for user "test"

                           

                          print stack trace is:

                           

                          java.lang.IllegalStateException: Can't overwrite cause

                          at java.lang.Throwable.initCause(Throwable.java:320)

                          at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:121)

                          at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:103)

                          at $Proxy15.getInitiatableProcesses(Unknown Source)

                          at oracle.bpm.sample.util.ProcessUtils.getInitiatableProcessList(ProcessUtils.java:103)

                          at oracle.bpm.sample.util.ProcessUtils.getInitableProcessDN(ProcessUtils.java:90)

                          at oracle.bpm.sample.instance.InitiateCreditIncreaseRequest.initiateProcess(InitiateCreditIncreaseRequest.java:112)

                          at oracle.bpm.sample.instance.InitiateCreditIncreaseRequest.main(InitiateCreditIncreaseRequest.java:60)

                           

                           

                          and for user "asmita"

                           

                          print stack trace is:

                           

                          ORABPEL-30504

                          Internal error in Verification Service.
                          Internal error in Verification Service for user asmita. lookupUser.
                          Check the underlying exception and correct the error. If the error persists, contact Oracle Support Services.

                          at oracle.bpel.services.workflow.verification.impl.VerificationService.lookupUser(VerificationService.java:4397)
                          at oracle.bpel.services.workflow.verification.impl.VerificationService.authenticateUser(VerificationService.java:698)
                          at sun.reflect.GeneratedMethodAccessor3424.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:597)
                          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 oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:91)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at oracle.bpel.services.common.dms.MethodPhaseEventAspect.invoke(MethodPhaseEventAspect.java:82)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at oracle.bpel.services.common.dms.MethodEventAspect.invoke(MethodEventAspect.java:70)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
                          at $Proxy232.authenticateUser(Unknown Source)
                          at oracle.bpel.services.workflow.query.impl.TaskQueryService.authenticate(TaskQueryService.java:521)
                          at sun.reflect.GeneratedMethodAccessor3423.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:597)
                          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 oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:91)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at oracle.bpel.services.workflow.test.workflow.ExceptionTestCaseBuilder.invoke(ExceptionTestCaseBuilder.java:155)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at oracle.bpel.services.common.dms.MethodEventAspect.invoke(MethodEventAspect.java:70)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at oracle.bpel.services.common.dms.MethodPhaseEventAspect.invoke(MethodPhaseEventAspect.java:82)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
                          at $Proxy246.authenticate(Unknown Source)
                          at oracle.bpel.services.workflow.query.ejb.TaskQueryServiceBean.authenticate(TaskQueryServiceBean.java:82)
                          at sun.reflect.GeneratedMethodAccessor3422.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:597)
                          at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
                          at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
                          at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
                          at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
                          at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
                          at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
                          at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
                          at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
                          at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
                          at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
                          at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
                          at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                          at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
                          at $Proxy301.authenticate(Unknown Source)
                          at oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_EOImpl.__WL_invoke(Unknown Source)
                          at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
                          at oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_EOImpl.authenticate(Unknown Source)
                          at oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_EOImpl_WLSkel.invoke(Unknown Source)
                          at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
                          at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
                          at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
                          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
                          at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
                          at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
                          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
                          at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
                          Caused by: ORABPEL-10509

                          User not found.
                          User "asmita" is not found in configuration "jazn.com"
                          Check if the user exists in the repository specified by the configurations. 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.JpsProvider.lookupUser(JpsProvider.java:877)
                          at oracle.tip.pc.services.identity.jps.AuthorizationServiceImpl.lookupUser(AuthorizationServiceImpl.java:233)
                          at oracle.tip.pc.services.identity.jps.IdentityServiceImpl.lookupUser(IdentityServiceImpl.java:169)
                          at oracle.bpel.services.workflow.verification.impl.VerificationService.lookupUser(VerificationService.java:4393)
                          ... 66 more
                          Caused by: oracle.security.idm.ObjectNotFoundException: No User found matching the criteria
                          at oracle.security.idm.providers.stdldap.util.DirectSearchResponse.initSearch(DirectSearchResponse.java:173)
                          at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:53)
                          at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:44)
                          at oracle.security.idm.providers.stdldap.util.LDAPRealm.searchUsers(LDAPRealm.java:489)
                          at oracle.security.idm.providers.stdldap.LDIdentityStore.search(LDIdentityStore.java:272)
                          at oracle.security.idm.providers.stdldap.LDIdentityStore.searchUsers(LDIdentityStore.java:365)
                          at oracle.tip.pc.services.identity.jps.JpsProvider.lookupUser(JpsProvider.java:861)
                          ... 69 more

                           

                           

                          Please tell me the expected error

                          • 10. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                            nicolas_fonnegra

                            It would seem that your error generates when you invoke this line: processUtils_.getInitableProcessDN

                             

                            at oracle.bpm.sample.util.ProcessUtils.getInitiatableProcessList(ProcessUtils.java:103)

                            at oracle.bpm.sample.util.ProcessUtils.getInitableProcessDN(ProcessUtils.java:90)

                             

                            Is the object processUtils_ an instance of a class you wrote? You can compare your implementation with the one in this blog: http://soadev.blogspot.co.uk/2011/07/querying-oracle-bpm-process-instances.html

                             

                            The other thing you can do is to validate the parameters you are providing : (PROJECT_NAME, VERSION, PROCESS_NAME); .

                             

                            The reason for the second error is quite simple. The user "asmita" is not registered in your user realm.

                            • 11. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                              2d963f24-6654-4274-8909-3f542fd09367

                              ok and I want to know - Is there anything needed to change in system-janz-data.xml file?

                              • 12. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                                2d963f24-6654-4274-8909-3f542fd09367

                                Hi Nicolas,

                                 

                                I am still struggling with user authentication and creation of context. I am trying for two types of user.

                                in realm one is defined as OID  authenticator (user name is test) and another is define as default authenticator  (user name is asmita).

                                for OID authenticator type of user null context is getting created but for another type no context is created.

                                • 13. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                                  nicolas_fonnegra

                                  It seems you are having two different kind of problems. One is with the usage of the BPM API and the creation of the context and the second one is with the configuration of an external authenticator. You should first try to get the BPM API to work right, so if you could create the context  for user "test",   you should try to get the rest of the functionality working. After that you can focus on configuring different authenticators.

                                   

                                  Regarding the problem with the other user, as far as I know, BPM can only work with one authenticator :

                                   

                                  https://forums.oracle.com/thread/2190838

                                  http://docs.oracle.com/cd/E21764_01/integration.1111/e10226/soacompapp_secure.htm#CHDIIBHB

                                   

                                  if you really need more than one authenticator you may have to write your own provider or to use another product like OVD. Nevertheless, if this is your case, i would recommend you to open a new Thread with that question.

                                  • 14. Re: Exception in lookup TaskQueryService when use remote client to get bpel tas
                                    2d963f24-6654-4274-8909-3f542fd09367


                                    as per this line

                                    ctx = (IBPMContext)processUtils_.getHwfServiceClient().getTaskQueryService().authenticate("test", "test123".toCharArray(), null);

                                     

                                    the context created is null,

                                     

                                    is it correct to have ctx value as null?

                                    if wrong what the value of ctx should have initially?

                                     

                                    1 2 Previous Next