Search My Ramblings
Thursday, April 11, 2013
Oracle Fusion Middleware-Inserting large XML into XMLType columns
If you're trying to save a large XML payload into an XMLType column type in an Oracle database table from a DbAdapter partner link (JCA Adapter in OSB), and receive the error:
ORA-01461: can bind a LONG value only for insert into a LONG column
You should only need to edit the mappings.xml for that partner link, navigate to the column that is an XMLType in the database, and change the xsi:type from "direct-mapping" to "direct-xml-type-mapping".
Then recompile your SOA composite (or update the OSB mappings file) and redeploy and test.
It should now support larger-size XML payloads!
Sunday, November 25, 2012
The Importance of Guiding Principles
Whether speaking about enterprise architecture or design within a project, guiding principles are paramount to keeping your focus on what's important to guiding decisions. Some examples of these would be software re-use over creation, and simplicity over flexibility to make things more maintainable. It's important to establish what your guiding principles are prior to having multiple teams making decisions either based on uniform principles or using their own discretion.
This importance to me was illustrated clearly with a little-known rule in the NFL. As a big NFL fan, you would expect with their use of instant replay and reviewing all scoring plays and turnovers, their guiding principle would be the correctness of ruling plays that directly affect the outcome of the game. However, as reinforced by an ill-fated decision made recently by the coach of the Detroit, if you throw a challenge flag on one of these plays, it renders the play un-reviewable and your team gets penalized 15 yards. I'm guessing the purpose of the rule is to ensure coaches don't try to become too demonstrative against the officials, but the end result is not getting the play called correctly in some cases.
Had they determined a guiding principle was to ensure plays are called accurately (e.g. accuracy over punishment), this rule would never have been ratified, which has now resulted in a situation the possibly changed the course of a game for a team. Having a handful of these guiding principles, a small enough number that allows remembering them clearly across teams, will ensure your organization is uniformly making decisions that can impact projects going forward.
Friday, November 2, 2012
Using Spring Portlet MVC 3.0 in Oracle Webcenter Portal (Spaces)
- Developer creates JSR-168/286 compliant portlet using their IDE and whatever framework they want
- Developer packages portlet up as EAR file for deployment
- Deployer updates EAR file using provided script to expose JSR-286 portlet as WSRP Portlet Producer EAR, and adds weblogic.xml to embedded WAR to specify shared library to include (otherwise deployment FAILS)
- Deployer deploys WSRP .ear to Webcenter Portlet Producers server.
- Webcenter Portal: Spaces Administrator registers WSRP v2 portlet producer in Webcenter Portlet: Spaces using WSDL URL.
- Webcenter Portal: Spaces page designer adds portlet to desired page and sets any default configurations.
Tuesday, October 16, 2012
Oracle Webcenter Portal 11.1.1.6 VirtualBox: Installing Webcenter Portlet Producers
Overview
In order to integrate some existing web site content/functionality into your Webcenter Portal, you'll likely need to have the provided Portlet Producers Omniportlet and Web Clipping portlet installed in your Webcenter virtual machine. These make integrating with existing sites much easier and quicker than a home-grown solution, but will need to be installed if you're using the Oracle VirtualBox VM that includes Webcenter Portal.Prerequisites
First, you'll have to download the VirtualBox VM that runs Webcenter Portal from Oracle at http://www.oracle.com/technetwork/middleware/soasuite/learnmore/vmsoa-172279.html.Second, you should have already installed it, and then started it up per the instructions at the site above. In my case I have configured the "domain" wc_spaces, since I want to setup to use Webcenter Portal: Spaces locally.
Take a Backup/Snapshot of the VirtualBox Image
Of course nothing will go wrong, right?!?! But just in case, make sure you at least snapshot your VM prior to following these steps.Adding Webcenter Portal Portlet Producers
Since the virtual machine does not include the Omniportlet and Web Clipping portlet out of the box, you'll need to install these and integrate the new WC_Portlet server installed into the VMConfig application Oracle ships with the virtual machine.Sunday, March 14, 2010
Odd numeric issue with XSLT subtraction
Upon investigation I could see that for some reason we were trying to insert the value 1.48999999997 into a field that only supports 2 digits past the decimal point, or a scale of 2. So this indicated to me 2 issues with our project:
- The Java web service we wrote to call the Peoplesoft component interface did not handle erroneous data being sent in, and
- Somewhere in our automation code before this we were creating a bad currency amount.
The other issue was tracked down by my fellow developer to an XSLT that was doing a simple subtraction of 2 currency values, but for some reason was creating this strange value. In this test case the original numbers were similar to 2450-2448.51, which was resulting in 1.48999999997! I figured somehow this was related to the BigDecimal class as well, behind the scenes used by the XSL engine in OC4J (Xalan?). As a workaround, we multiplied the value by 100, rounded it using the XSLT round() function, then divided again by 100 to ensure the correct scale was applied. While ugly it at least functioned as expected.
Thursday, September 10, 2009
Using DBMS_LOCK package to implement singleton pattern
Monday, August 24, 2009
Using BPEL's Custom Indexes for BPEL Console Searching
While this isn't a difficult thing, as the API is well-defined and easy to use within an embedded Java activity, I ran into some things that may save you some debugging time in the future, or myself when I search my own blog later to "remember" how I got it working as expected.
This blog posting will be short and sweet. The one caveat that I found was if you have either an XML-based or Message-based variable, be careful with the getVariableData function, as it will generally return an Oracle XMLElement object, so you'll need to get the text from it and not call the toString() function of it when setting the custom index. I've generally found it much easier to create a Simple-type variable of type String, then use a Copy operation with an Assign activity to get the value from within either an XML-based or Message-based variable into the simple String variable, then in the embedded Java it's easy to use getVariableData(variableName).toString() to set the custom index.