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, Transport provider for ID **** already registered Transport provider for ID **** already registered  
          at com.bea.alsb.transports.sock.ApplicationListener$  
          at com.bea.alsb.transports.sock.ApplicationListener.preStart(  
          at weblogic.application.internal.flow.BaseLifecycleFlow$  
          at weblogic.application.internal.flow.BaseLifecycleFlow$LifecycleListenerAction.invoke(  
          at weblogic.application.internal.flow.BaseLifecycleFlow.preStart(  
          at weblogic.application.internal.flow.HeadLifecycleFlow.prepare(  
          at weblogic.application.internal.BaseDeployment$  
          at weblogic.application.utils.StateMachineDriver.nextState(  
          at weblogic.application.internal.BaseDeployment.prepare(  
          at weblogic.application.internal.EarDeployment.prepare(  
          at weblogic.application.internal.DeploymentStateChecker.prepare(  
          at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(  
          at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(  
          at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(  
          at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(  
          at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(  
          at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(  
          at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(  
          at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(  
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(  
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(  
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$  

    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.