Monday, February 13, 2012

OSB Custom Transport Deployment Tips

I was developing custom transport for OSB, development of custom transport was relatively easy but deployment and troubleshooting was a bit of nightmare. Just sharing some tips as it might be useful for someone facing same issues:

  • Deploy to both nodes (Adminserver and osb_server1)
    It seems like UI stuff is used from AdminServer, and it run time it uses code from osb_server1. (of course, if you have developer version of OSB install, that would be separate story).

  • Redeploy of the transport always result in this error:

     ####<Feb 13, 2012 6:48:52 PM CST> <Error> <OSB Kernel> <springsoa> <osb_server1> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <dba6ff6b23159a46:64053457:135794b8417:-8000-0000000000000025> <1329180532849> <BEA-380003> <Exception on TransportManagerImpl.registerProvider, com.bea.wli.sb.transports.TransportException: Transport provider for ID **** already registered  
     com.bea.wli.sb.transports.TransportException: Transport provider for ID **** already registered  
          at com.bea.wli.sb.transports.TransportManagerImpl.registerProvider(TransportManagerImpl.java:157)  
          at com.bea.alsb.transports.sock.ApplicationListener$1.run(ApplicationListener.java:43)  
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)  
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)  
          at weblogic.security.Security.runAs(Security.java:61)  
          at com.bea.alsb.transports.sock.ApplicationListener.preStart(ApplicationListener.java:38)  
          at weblogic.application.internal.flow.BaseLifecycleFlow$PreStartAction.run(BaseLifecycleFlow.java:282)  
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)  
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)  
          at weblogic.application.internal.flow.BaseLifecycleFlow$LifecycleListenerAction.invoke(BaseLifecycleFlow.java:199)  
          at weblogic.application.internal.flow.BaseLifecycleFlow.preStart(BaseLifecycleFlow.java:62)  
          at weblogic.application.internal.flow.HeadLifecycleFlow.prepare(HeadLifecycleFlow.java:283)  
          at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)  
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)  
          at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)  
          at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)  
          at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)  
          at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)  
          at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(RedeployOperation.java:104)  
          at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:128)  
          at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)  
          at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)  
          at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)  
          at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)  
          at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)  
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)  
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)  
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)  
          at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)  
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)  
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)  
     >   
    

    Correct Re-deployment sequence

    1. Undeploy from EM
    2. Restart Admin and osb_server1
      Note: This is to completely get rid of transport registration. It will get rid of : Transport provider for ID *** already registered
    3. Redeploy to both Adminserver and osb_server1
      Note: execution of business service at this time will result in "null" error.
    4. Restart AdminServer and osb_server1


  • May be there is way to configure System.out seperately for custom transport but OOTB System.out didn't work well, so better to use weblogic logger. (e.g. I used : weblogic.logging.NonCatalogLogger )




No comments: