Monday, February 13, 2012

A cool hack

Quite a long ago, I did post about decrypting jazn passwords, which came pretty handy for most of time including when I, myself forgot the passwords.

Here is some advance version, do email me if you figure it out:

Let's say, for sake of simplicity if you have 10g or 11g SOA installed on Unix box with unix oracle user.

a) If you happen to have only weblogic (or oc4jadmin) password to login to Web console. Is it possible to gain unix shell access (with oracle user) and also all database schema (and jms) passwords configured in app server?

b) If you happen to have unix shell access (with oracle user), can you gain access to weblogic or oc4j console and all db/jms password?

Answer to all questions is yes, the real question is how..

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 )




Monday, February 6, 2012

Error: SCAC-50012 (Jdeveloper 11g Composite Compilation)

While compiling SOA composite in JDeveloper, I saw this error many times:
Error: SCAC-50012

It happens mainly because of the Java code in the composite BPEL. Even after increasing the logging level of scac compilation, it didn't really show enough information to fix the problem. Here are some initial steps you can do to troubleshoot the issue (may be I will modify the scac task so we can show more information like 10g jdev used to show).

-> Check all imported libraries for composite project used by Java embed. If libraries are not found, jdev just shows SCAC-50012.

-> Make sure the java embed compiles fine by creating a sample Java project. If method signature changes or so, Jdev doesn't show any error, it just shows SCAC-50012.