Tuesday Oct 07, 2014

OSB Proxy Error: BindingLayerException, parseCheckEnvelope

I ran into an odd issue while using Oracle Enterprise Scheduling Service (OESS) to call an OSB web service.  The error was something like this:

[2014-10-02T10:14:11.157+10:00] [osb_server1] [ERROR] [OSB-382191] [oracle.osb.pipeline.kernel.router] [tid: [ACTIVE].ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 4fba1241-2096-4208-b03f-aaad7c99de04-000271cc,0:4:60:1:0x5f62fd9:141] [APP: Service Bus Kernel] [ESS_RequestID: 4041] [FlowId: 0000KZEDErYFw000jzwkno1KACvt0001yC] OSBStatsUtility/ProxyServices/SendOpStatsToBAMPS: Unhandled error caught by system-level error handler: com.bea.wli.sb.context.BindingLayerException: The message must be an instance of: {http://www.w3.org/2003/05/soap-envelope}Envelope[[
        at com.bea.wli.sb.context.ContextUtils.newException(ContextUtils.java:875)
        at com.bea.wli.sb.context.SOAPMessageImpl.setEnvelope(SOAPMessageImpl.java:422)
        at com.bea.wli.sb.context.SOAPMessageImpl.parseCheckEnvelope(SOAPMessageImpl.java:1122)

The issue was simply that I had defined the OSB service as a SOAP 1.2 service which has an Envelope namespace of "http://www.w3.org/2003/05/soap-envelope"  SOAP 1.1 has a namespace of "http://schemas.xmlsoap.org/soap/envelope"

OESS does not recognise the 1.2 version from the WSDL, so no errors are shown.  For OSB, this was an easy fix to put a 1.1 proxy service in front of the pipeline. 

Tuesday Sep 23, 2014

WLS Console Extension: AutoLogin

This explains how to install and use a simple WLS console extension to avoid having to login when in a development environment.[Read More]

Monday Sep 01, 2014

Oracle Service Bus (OSB) Stats into Business Activity Monitoring (BAM)

Oracle Service Bus Stats into Business Activity Monitoring[Read More]

Thursday Aug 07, 2014

Large File Processing With JCA File Adapter and OSB

I was asked to prototype a possible use case where a huge file (10+GB) needed to be processed by OSB.  Yes, this is a horrible thing, but sometimes we have to architect horrible things!  This use case had a couple of important aspects:

1. The file contained many repeating records of the same type.  Each record was pretty small.

2. The records in the file were not related and their order didn't matter.

This is important because if there are relationships or order requirements in the file, some more considerations would be needed.  I don't go into it here, but it would be possible to attach a single threaded work manager to the OSB Proxy and send the messages into a JMS queue using WebLogic Unit of Order capabilities.

So how can we handle this?

We can't use the file transport because if we touch the payload or loop over the records, we end up bringing the whole message into memory.  I don't really want to setup an 11GB JVM!

We could just write some java code to break up the file, but it would be nice to manage this in OSB.  We could pass the filename into OSB and use a java callout to break the message apart, but I'd be worried about how long this might take and the result of a proxy hanging around that long on a java callout.

So, let's use the JCA File Adapter that comes with SOA Suite.

Step 1 - Setup the environment and make a schema definition.

Step 2 - Create JCA File Adapter

Step 3 - Bring JCA File Adapter into OSB - Make Proxy

Step 4 - Initial testing to output files.

Step 5 - Testing large files.

Step 6 - Testing 11GB file.

Tuesday Jun 24, 2014

MWaaS - Middleware as a Service Demo

I've had to setup the Oracle Enterprise Manager MWaaS offering at a few client sites lately.  It is a powerful way of offloading many tasks to end users such as:

- Domain Creation
- Upscale/Downscale
- Deployment of applications
- Monitoring / Managing applications

Here is a video showing MWaaS in action:

Tuesday Aug 07, 2012

WebCenter Content (UCM) Extend Error

While trying to extend a domain to include WCC, I noticed it tries to modify the em.ear file to include WCC items in the EM farm.  The problem was, it kept looking for the em.ear file in the wrong place.  I've done complete domain and environment searches and I can't seem to figure out where it's getting the APP HOME from.  Anyway, here is the error received from the configuration wizard and a work-around.


Extracting Domain Extension Contents...
Saving the Domain Information...
Domain Extension Application Failed!

Domain Location: /home/oracle/user_projects/domains/domain

Reason: null


Traceback (innermost last):
  File "<iostream>", line 80, in ?
	at oracle.sysman.omsca.plugin.PluginDeployer.doPreRequisiteChecks(PluginDeployer.java:571)
	at oracle.sysman.omsca.plugin.PluginDeployer.doPreDeployConfig(PluginDeployer.java:195)
	at oracle.sysman.omsca.framework.OMSConfigAssistantDriver.preDeploy(OMSConfigAssistantDriver.java:311)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)

java.lang.Exception: java.lang.Exception: EM ear file is not present at location /oracle/user_projects/applications/domain/em.ear

The directory should be using /home/oracle/user_projects, not /oracle/user_projects.

So, I copied the em.ear file into the directory it was looking and noticed it was slightly modified:

Original em.ear size: 103722
New em.ear size: 103733

I didn't bother figuring out what changed.  I copied the new em.ear file back to its right location and all was well.


Thursday Apr 26, 2012

Hostname OEL

I noticed an odd thing when using OEL under VirtualBox.  When using bridged network, if my dhcp server supported it, I would be assigned a hostname and on booting the VM, the hostname would be updated automatically.  I really don't want this behaviour because things like the Oracle DB use the hostname for configuration file directories and some Fusion products have problems when the hostname keeps changing, especially when the hostname is not properly configured in the /etc/hosts file.

Naturally, I thought the fix would be simple.  I went into the network config, unchecked the 'Automatically obtain DNS information from provider box and put localhost.localdomain in the hostname box:

To my surprise, this didn't work.  After much playing around with the settings, I found that if I used anything but localhost or localhost.localdomain in the hostname field, it worked.  Odd.

You have to love OEL...  In the /etc/sysconfig/network-scripts directory, you'll find a file called network-functions.  There is a function called need_hostname() about halfway down the file.  You'd think the "need_hostname" would return false if the hostname field was manually set, but no...  It has this bit of code:

need_hostname ()
    if [ "$CHECK_HOSTNAME" = "(none)" -o "$CHECK_HOSTNAME" = "localhost" -o \
        "$CHECK_HOSTNAME" = "localhost.localdomain" ]; then
        return 0
        return 1

As you can see, it simply checks to see if the hostname is currently localhost or localhost.localdomain.  If so, it asks for a hostname from the DHCP server.

I couldn't think of a better solution than just modifying the code.  I just hope I remember after an OS upgrade!

New code:

need_hostname ()
    if [ "$CHECK_HOSTNAME" = "(none)" ]; then
        return 0
        return 1

Friday Mar 30, 2012

OSB/OSR/OER in One Domain - QName violates loader constraints

For demos, testing and prototyping, I wanted a single domain which contained three servers:
OSB - Oracle Service Bus
OSR - Oracle Service Registry
OER - Oracle Enterprise Repository

These three can work together to help with service governance in an enterprise.  When building out the domain, I found errors in the OSR server due to some conflicting classes from the OSB.  This wouldn't be an issue if each server was given a unique classpath setting with the node manager, but I was having the node manager use the standard startup scripts.

The domain's bin/setDomainEnv.sh script has a large set of extra libraries added for OSB which look like this:

if [ "${POST_CLASSPATH}" != "" ] ; then
if [ "${PRE_CLASSPATH}" != "" ] ; then

I didn't take the time to sort out exactly which jar was causing the problem, but I simply surrounded this block with a conditional statement:

if [ "${SERVER_NAME}" == "osr_server1" ] ; then
else if [ "${POST_CLASSPATH}" != "" ] ; then POST_CLASSPATH="${COMMON_COMPONENTS_HOME}/modules/oracle.jrf_11.1.1/jrf.jar${CLASSPATHSEP}${POST_CLASSPATH}" export POST_CLASSPATH else POST_CLASSPATH="${COMMON_COMPONENTS_HOME}/modules/oracle.jrf_11.1.1/jrf.jar" export POST_CLASSPATH fi if [ "${PRE_CLASSPATH}" != "" ] ; then PRE_CLASSPATH="${COMMON_COMPONENTS_HOME}/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar${CLASSPATHSEP}${PRE_CLASSPATH}" export PRE_CLASSPATH else PRE_CLASSPATH="${COMMON_COMPONENTS_HOME}/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar" export PRE_CLASSPATH fi POST_CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}/oracle/fmwhome/Oracle_OSB1/soa/modules/oracle.soa.common.adapters_11.1.1/oracle.soa.common.adapters.jar\ ${CLASSPATHSEP}${ALSB_HOME}/lib/version.jar\ ${CLASSPATHSEP}${ALSB_HOME}/lib/alsb.jar\ ${CLASSPATHSEP}${ALSB_HOME}/3rdparty/lib/j2ssh-ant.jar\ ${CLASSPATHSEP}${ALSB_HOME}/3rdparty/lib/j2ssh-common.jar\ ${CLASSPATHSEP}${ALSB_HOME}/3rdparty/lib/j2ssh-core.jar\ ${CLASSPATHSEP}${ALSB_HOME}/3rdparty/lib/j2ssh-dameon.jar\ ${CLASSPATHSEP}${ALSB_HOME}/3rdparty/classes${CLASSPATHSEP}\ ${ALSB_HOME}/lib/external/log4j_1.2.8.jar${CLASSPATHSEP}\ ${DOMAIN_HOME}/config/osb" fi

I could have also just done an if [ ${SERVER_NAME} = "osb_server1" ], but I would have also had to include the AdminServer because they are needed there too.  Since the oer_server1 didn't mind, I did the negative case as shown above.

To help others find this post, I'm including the error that was reported in the OSR server before I made this change.

####<Mar 30, 2012 4:20:28 PM EST> <Error> <HTTP> <localhost.localdomain> <osr_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <11d1def534ea1be0:30e96542:13662023753:-8000-000000000000001c> <1333084828916> <BEA-101017> <[ServletContext@470316600[app:registry module:registry.war path:/registry spec-version:null]] Root cause of ServletException.
java.lang.LinkageError: Class javax/xml/namespace/QName violates loader constraints
        at com.idoox.wsdl.extensions.PopulatedExtensionRegistry.<init>(PopulatedExtensionRegistry.java:84)
        at com.idoox.wsdl.factory.WSDLFactoryImpl.newDefinition(WSDLFactoryImpl.java:61)
        at com.idoox.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:419)
        at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:309)
        at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:272)
        at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:198)
        at com.idoox.wsdl.util.WSDLUtil.readWSDL(WSDLUtil.java:126)
        at com.systinet.wasp.admin.PackageRepositoryImpl.validateServicesNamespaceAndName(PackageRepositoryImpl.java:885)
        at com.systinet.wasp.admin.PackageRepositoryImpl.registerPackage(PackageRepositoryImpl.java:807)
        at com.systinet.wasp.admin.PackageRepositoryImpl.updateDir(PackageRepositoryImpl.java:611)
        at com.systinet.wasp.admin.PackageRepositoryImpl.updateDir(PackageRepositoryImpl.java:643)
        at com.systinet.wasp.admin.PackageRepositoryImpl.update(PackageRepositoryImpl.java:553)
        at com.systinet.wasp.admin.PackageRepositoryImpl.init(PackageRepositoryImpl.java:242)
        at com.idoox.wasp.ModuleRepository.loadModules(ModuleRepository.java:198)
        at com.systinet.wasp.WaspImpl.boot(WaspImpl.java:383)
        at org.systinet.wasp.Wasp.init(Wasp.java:151)
        at com.systinet.transport.servlet.server.Servlet.init(Unknown Source)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:244)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Conky to Monitor WLS Managed Servers

I've been using a little utility on my linux-based machines for years called conky.  It can be used to monitor system resources, but I wanted to modify it to monitor my WebLogic managed servers too.

Once installing conky, you'll need to update the .conkyrc file.  Here is a simple example.

Basically, the important lines are these:

- Admin  (7001) ${if_empty ${exec /usr/sbin/lsof -i :7001 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 7001 7001 count}) ${endif}
- OSB    (8011) ${if_empty ${exec /usr/sbin/lsof -i :8011 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 8011 8011 count}) ${endif}
- BAM    (9001) ${if_empty ${exec /usr/sbin/lsof -i :9001 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 9001 9001 count}) ${endif}
- DB     (1521) ${if_empty ${exec /usr/sbin/lsof -i :1521 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 1521 1521 count}) ${endif}

It uses lsof to find out if ports are in use.

Here is a video showing it in action.

Wednesday Nov 09, 2011

java.lang.UnsatisfiedLinkError: no JniNativeOsUtils in java.library.path

While working with Oracle's UCM, I found an issue with my install.  The native OS utils was not being found in the library path.  I'm not sure why the UCM installer doesn't take care of this.

Here was the first part of the stack trace:
java.lang.AssertionError: !syNativeOsUtilsNotLoaded
    at intradoc.common.NativeOsUtilsBase.doLoad(NativeOsUtilsBase.java:386)
    at intradoc.common.NativeOsUtilsBase.<init>(NativeOsUtilsBase.java:352)

Here was the fix:

Find the right lib in the directory:

Replace 'OS' and 'Version' with what is important for you.  Then add the line in the setDomainEnv.sh/cmd script to include this directory in your library path.  For me (Linux/32bit), it looked like this:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/oracle/fmwhome/Oracle_ECM1/ucm/idc/components/NativeOsUtils/lib/linux/

I tried adding this to the java.library.path, but the scripts kept overriding it.  Perhaps there is another 'better' way.

Monday Oct 10, 2011

BPM FP4 - Install

I've been looking forward to this BPM feature pack!  This has some great new features: featurepack-list.pdf

I've had to install the new BPM feature pack on a few systems, so I made this script to make it easier.  Basically, there are several files to unzip and a couple of opatchs to run.

Get ahold of the FP4 file:  p12413651_111150_Generic.zip

patch.sh (bash script.  For those running windoze, start by installing linux, then run this script. :) )


# Set these for your environment
export MW_HOME=/opt/app/mwhome
export DB_CONNECT_STR="//dbhost:1521/XE"

unzip p12413651_111150_Generic.zip
cd 12413651_ALL

# Deal with common files
mkdir patch_top_common
cd patch_top_common
unzip ../p12413651_ORACOMMON_111150_Generic.zip
unzip ../p12319055_111150_Generic.zip
unzip ../p12614083_111150_Generic.zip

export ORACLE_HOME=${MW_HOME}/oracle_common
$ORACLE_HOME/OPatch/opatch napply -invPtrLoc ${ORACLE_HOME}/oraInst.loc

# Deal with SOA files
cd ..
mkdir patch_top_soa
cd patch_top_soa
unzip ../p12413651_SOA_111150_Generic.zip
export ORACLE_HOME=${MW_HOME}/Oracle_SOA1
$ORACLE_HOME/OPatch/opatch napply -invPtrLoc ${ORACLE_HOME}/oraInst.loc

# Update the database
./psa -dbType Oracle -dbConnectString ${DB_CONNECT_STR} -dbaUserName sys\
-schemaUserName DEV_SOAINFRA -invPtrLoc $ORACLE_HOME/oraInst.loc

Tuesday May 31, 2011

VirtualBox Port Forward Issue

This video shows how to fix some port forwarding issues when running SOA Suite on a Virtual Box instance and using NAT and port forwarding. The main key is to set the Listen Address of the servers to 'localhost' and setup a new channel to listen to the default network address of In essence, this simply reverses the addresses which come by default (ip,localhost) to become (localhost,ip). This fixes a problem with deployment from JDev. Also, this video gives a sneek peak at some VMs I plan to distribute soon. -John 

Monday Mar 28, 2011

One login to rule them all

This screen capture shows how to modify the deployment plan for the OEM Fusion Middleware Control application so that it shares the login with WebLogic server and OSB.  This can also be done for other consoles such as the BPM Workspace.

Code snippets:



Friday Mar 18, 2011

rlwrap for wlst

[Read More]

Friday Mar 11, 2011

VirtualBox Clone Root HD / Ubuntu / Network issue

[Read More]

Nodemanager Init.d Script

[Read More]

Thursday Mar 10, 2011

VirtualBox Port Forward

[Read More]

Using Scribefire

[Read More]

Coherence Warnings in WLS

[Read More]

Remote Display Config.sh Using SSH

[Read More]

WebLogic Silent Install (WLS 10.3.4)

[Read More]

WLS Console Timeout

[Read More]

Wednesday Mar 09, 2011


[Read More]

Wednesday Mar 24, 2010


[Read More]



« November 2015