30.9.12

SOA Suite 10g–> 11g migration and Issue with composite.xml Attributes

Here is a heads up for those that might still be working on 10g –> 11g migrations. There is one unfortunate bug (8980875) in the migration process that seems innocent in the beginning but has critical effects in the end.

I logged a service request for continuous XML parse errors in the managed server log files:

org.xml.sax.SAXParseException: <Line 5, Column 92>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.

This occurs at deployment time. In most cases the deployed composite worked just fine.

Error comes from the composite.xml content where the migrated 10g SOA projects have all the XML root element “composite” attributes in a single line. The deployment parser seems to be some sort of home grown XML parser that assumes that all the attributes are physically separated in their own lines, like this:

<composite name="Archive"
           revision="1.0"
           label="2012-08-16_09-51-28_557"
           mode="active"
           state="on"
           xmlns="
http://xmlns.oracle.com/sca/1.0"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
           xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"
           xmlns:ui="http://xmlns.oracle.com/soa/designer/">
</composite>

and when the migrated projects have something like this:

<composite name="HelloWorld" revision="1.0" mode="active" state="on" xmlns:ui="http://xmlns.oracle.com/soa/designer/

in a single line, the deployment will give errors in this part. You might have some references in composite.xml pointing to external servers using “ui.wsdlLocation” like this:

<reference ui:wsdlLocation=http://mydevhost1.mydomain.com:8001/soa-infra/services/CommonExceptionHandling/CommonExceptionHandling.wsdl name="CommonException...

By default these should not affect the runtime environment since this is used at development time. Unfortunately combined with this bug 8980875, the pointer seems to stay in the runtime environment causing gray hairs when e.g. all of the sudden production environment has pointers to development environment. Changing this ui.wsdlLocation seems very hard if not possible using the built-in deployment scripts and default search/replace element descriptors.

In the end, the advice from me is to change all the migrated 10g –> 11g SOA projects manually to correct the composite.xml “composite” element attributes to their own lines. This will help greatly in the dev->tst->prd deployments avoiding those unwanted cross environment pointers.

17.9.12

One possible reason for not being able to login to OracleVM Manager

Today I faced the a weird situation when trying to login to OracleVM Manager 3.0.1 console. OVMM console did show up and provided me login screen. After entering username and password I got a weird internal error claiming login failed. Username and password were the right ones.

After a while of of debugging I noticed that all the passwords had expired from the OracleDB that holds the OracleVM repository.

I logged in as sys user and changed the default profile:

alter profile default limit password_life_time unlimited;

Then altered the passwords for the most important accounts: SYSTEM, OVS.

SYS user seemed to be in ok condition.

Then I restarted the OVMM process (root):

service ovmm stop
service ovmm start

After this login worked fine.

20.11.11

BPM Editor and Python Extension Not Playing in Nicely in the Same Sandbox

I was playing with the latest FMW 11.1.1.5 BPM Feature Pack when I noticed immediate NPE when launching any BPM process editor in my JDeveloper.

The stack trace was:

java.lang.NullPointerException

        at oracle.bpm.ui.action.BaseAction$ActionFuegoAction.putValue(BaseAction.java:496)

        at oracle.bpm.ui.action.BaseAction.setMsg(BaseAction.java:312)

        at oracle.bpm.ui.action.BaseAction$ActionFuegoAction.<init>(BaseAction.java:476)

        at oracle.bpm.ui.action.BaseAction.valueOf(BaseAction.java:100)

        at oracle.bpm.designer.catalogdoc.DocumentationEditorPanel.createActions (DocumentationEditorPanel.java:521)

        at oracle.bpm.designer.catalogdoc.DocumentationEditorPanel.createEditorPanel(DocumentationEditorPanel.java:504)

        at oracle.bpm.designer.catalogdoc.DocumentationEditorPanel.init(DocumentationEditorPanel.java:472)

After debugging long enough I found out that this was a compatibility problem with JDeveloper Python Extension and BPM Editor.

Python Extension is something I ported from JDev 10.1.2 to 10.1.3 and latest rewrote some portions to get it working on JDeveloper 11g. Aparently there is something causing side effects in BPM Editor so the recommendation from me is to disable this Python Extension to get BPM Editor working without these NPE issues.

To disable any extension you can follow these menu options:

Tools –> Preferences –> Extensions (from the left hand panel) –> Uncheck the Checkbox from Python Extension

8.11.11

Word of Warning for OracleVM 2.2 Upgraders

Decided to start upgrading my OracleVM 2.2 servers to the new OracleVM 3.0.2.

First obstacle was that the installation application didn’t recognize the CD drive it was originally started from. Weird. Got an error stating that I should have drivers to read the CD.

Went to buy an external USB DVD drive. Started the installation from there. Got a bit further but at the time I was supposed to choose my hard disk for partitioining, OracleVM 3.0.2 did’n find the hard drives at all.

Looks like OracleVM 3.0.2 is very picky on the supported hardware systems you can run it on.

Finally managed to install OracleVM 3.0.2 on USB Stick acting as hard drive. Well, obviously this isn’t a perfect solution to run my virtualization servers, so I reverted back to OracleVM 2.2.

So a word of warning to all those thinking of upgrading. You can either test the installation media just to see if it recognizes your hard drivers and then make decision whether to go forward or not.

I’m waiting for a new version of OracleVM to be released and hoping it has the kernel modules for my AMD/VIA based motherboard.

25.8.11

OracleVM 3.0 Finally Out

The wait is over for those that have been waiting for OracleVM 3.0:

http://www.oracle.com/us/corporate/press/459406

When starting my own business (http://www.ratioware.com), I decided to set up all my servers as OracleVM 2.2 virtual servers. I’ve been more than happy running my stuff virtualized, so I’m very interested in getting hold on OracleVM 3.0.

There are number of enhancements worth mentioning:

  • Policy based resource management
  • Centralized network and storage configuration and management
  • Performance, scalability and security enhancements
  • New management console

Not so happy surprise was that upgrading from OracleVM 2.2 was non-existent. All servers must be reinstalled with OracleVM 3.0.1 software, but you could utilize the 2.2 templates and virtual images.

I’m currently downloading the OVM 3.0 Server and Management Console installation packages and start planning for 2.2 –> 3.0 upgrade on my own server pool.

Maybe this would be a good time to get rid of my iSCSI SAN setup and replace it with NFS for easier management (backups, image copying etc).

Stay tuned for experiences on OVM 3.0 once I get it up and running.

15.12.10

Microsoft Powerpoint notes removal addin on Office 2007 and Windows 7

Here’s an update on my previous (dated back in 2005) blog posting on Microsoft Powerpoint 2007 notes removal add-in.

The actual add-in file is still valid and working on Office 2007. You can find it here:
http://www.pcuf.fi/~hkaukovu/blog/HJK_Remove_Notes.ppa

Update is related to where you should copy the *.ppa file on Windows 7 and how to add the add-in on Powerpoint 2007. First of all, download and copy the *.ppa file to your Windows user roaming directory:

C:\Users\<windowsusername>\AppData\Roaming\Microsoft\AddIns

e.g on my machine the path where to copy this is:

C:\Users\hkaukovu\AppData\Roaming\Microsoft\AddIns

Here are the steps to enable the add-in:

1. Go to powerpoint options

image

2. Choose Add-Ins

image

3. From lower part of window choose “Manage: Powerpoint Add-Ins” and press “Go…”

image

4. Press “Add New…”

image

5. Select the *.ppa file

image

6. Press Enable Macros

image

7. You have now the notes removal add-in enabled.

'image

8. You can execute the notes removal add-in from “Add-Ins” tab.

image

The add-in activation is permanent, so next time you startup Powerpoint, this notes removal add-in should be active.

29.11.10

New Extensions for JDeveloper 11g

Some of you may know that I wrote 2-3 years ago some JDeveloper extensions for helping out with BAM data object creation (BAM Table Migration Extension), Oracle ESB diagram documentation (ESB Tools), JDeveloper Project Copying (Project Tools), Python Development (Python Addin).

It’s been some time since I last touched those extensions and finally I decided to take the bull by the horns.

What I ended up were four new extensions for JDeveloper 11g:

These extensions are now included in the official JDeveloper extension exchange and can be installed using “Check for Updates…” functionality. Be sure to check the “Open Source and Partner Extensions” update center.

To summarize what these extension do:

BAM Table/View Copier

BAM Table/View Copier is an extension to help creating BAM data objects using any relational database as “template”. An example: you have almost perfect table in your Oracle DB or Access DB and would like to use that table or view structure as BAM Data Object. Just BAM Connection on your application workspace, navigate to database navigator, choose table or view and press context menu. You will see “Copy to BAM…” which will ask you about the BAM connection to use and target BAM folder to store the data object.

Extension will copy also all data from the table so don’t be surprised. If you don’t want to copy the data, make an copy of the table (create table mytable as select * from wantedtable where 1=2) and copy the empty table.

BAM Table/View Copier also makes it possible to design BAM Data Objects using graphical JDeveloper Database designer. Just create the tables or views on relational database first and then use this extension to copy the structures as data objects. Of course you won’t be able to model all those fine grained data object lookups etc in JDeveloper but you would start your work this way.

SCA Diagram Tools

By default you cannot print or save SCA composite diagram graphics directly from JDeveloper. SCA Diagram Tools gives you possiblity to save composite diagram as PDF, JPG, BPM or PNG.

SCA Diagram Tools also makes it possible to zoom in/out using wheel mouse and pressing CTRL button at the same time. This is not enabled by default but you can do so by choosing “Enable Wheel Mouse Zoom” from SCA Diagram Tools submenu. This might be also good addition to those that have eyesight problems.

Printing the SCA composite diagram is also possible using this extension.

Python Extension

Created originally by Brian Duff for JDeveloper 9i. Migrating the plugin from 9i to 10g took a major rewrote. I did this 2008 and now migrated the python extension from 10g to 11g.

Python extension lets you develop python/jython scripts and run them directly in JDeveloper. Also you can switch on Python Console that enables you to interactively execute any Jython commands from Python Console. You could e.g. call JDeveloper internal API’s interactively if so wanted.

Jar Search Extension

When migrating sources from 10g to 11g there are times where product development have refactored their jar classes so that the old libraries no longer exist.

I created this extension to help searching for JAR files that contain the wanted java class. This was written from ground up to be used as JDeveloper extension so you can e.g. cancel the search if it takes too much time to look for JAR files recursively.

Please note that this extension is not for searching the contents of JAR entry files, it is searching the JAR entries and their filenames, which makes it lot faster than normal search.

25.11.10

JDeveloper 10g/11g extension download and installation problems

JDeveloper 11g

Some of you might have seen installation problems with JDeveloper 11g extensions. There has been some changes in OTN download server infrastructure that causes some issues on extension download and installation. The workaround for time being is to download the extension and install from local file system, as described in JDeveloper Product Management blog:

http://blogs.oracle.com/jdeveloperpm/2010/11/installing_jdeveloper_extensions_locally.html

In addition you might check your extension download temporary directory. There might be some unfinished zip files etc. You could just clean that directory up and try downloading again. Download directory is under your JDeveloper user home directory that is pointed by environment variable <JDEV_USER_HOME>\tmp\update. If you haven’t set this, it points to your <JDEV installationHOME>\jdev\tmp\update –directory.

JDeveloper 10g on Windows 7 (64-bit)

For those that have problems installing JDeveloper 10g extensions on Windows 7, there might be other issues. For me the symptom was that I was able to choose and download the wanted extension. Everything seemed working nicely but after JDeveloper restart no extension was installed.

After digging into details of the problem I got to the root problem, not solving the problem all the way, but being able to continue my work.

For me I have multiple JDeveloper versions running on my laptop. I usually edit the <JDEVHOME>/jdev/bin/jdev.conf file so that I change the SetUserHomeVariable to use a different environment variable for different JDev versions. In this case I used environment variable JDEV10134_USER_DIR, which I hadn’t yet assigned to anywhere (so no setting for that). It appears that in this case JDev 10g falls back reading JDEV_USER_HOME environment variable that was actually used by my JDeveloper 11g environment.

So I edited jdev.conf:
SetUserHomeVariable JDEV10134_USER_DIR

And really set my environment variable on system settings:

image

After this I got my extensions downloading the appropriate place, that was C:\SHARED\jdevhome10134\tmp\update.

Issue being this time that the extensions got downloaded to the right place, but they still didn’t install automatically. When JDeveloper starts it is looking for <JDEV_USER_DIR>/lib/deferred-updates.xml which is supposed to be read and includes instructions how to install the extensions. In my case on Windows 7 (64-bit) the file was read and deleted but extensions were never unzip and placed into the correct directory.

This sounds to be an issue with JDev 10g and Windows 7 not being 100% compatible with each other. JDeveloper 9i or 10g has not been certified with Windows 7.

Anyways, you can get those extensions installed manually and you can continue working on Windows 7.

To install extensions manually open the zip file from <JDEV_USER_DIR>\tmp\update and extract the *.jar file or collection of jar files to extensions directory. In my installation I’ve installed JDeveloper 10.1.3.4 on c:\product\jdevstudio10134, so my extension directory is: C:\product\jdevstudio10134\jdev\extensions.

After unzipping/extracting, restart JDeveloper and you should have all those downloaded extensions working on your JDev 10g.

8.6.10

OracleVM and Standalone VNC Client for Console Access

OracleVM Manager has built-in browser based Java VNC console accessible from “Console” button:

image

In order this to work properly you need to have the right VNC rpm installed in the server side:

http://oss.oracle.com/oraclevm/manager/RPMS/tightvnc-java-1.3.9-3.noarch.rpm

For those that want to access the virtual server console directly using e.g. TightVNC viewer you can do so by first looking at the right VNC port from OracleVM manager.

image

Then connect to the actual bare metal server (not the virtual server) with the VNC Port. In this example the OracleVM server IP might have been 10.1.1.1.

image

You might as well leave the port 5900 since this points to the display 0 which in short can be defined:

image

If you had Virtual server VNC console defined in 5901, you can connect to 10.1.1.1:1 etc.

5.4.10

Android Beem XMPP Client Against Oracle Beehive XMPP Server

I’ve got my Android phone (Samsung Galaxy Spica) and was getting all the needed software from Android market.

One of the problem areas was to find a XMPP client that could connect to SSL protected custom XMPP server. In my case Oracle Beehive XMPP server.

One of the candidates was Beem XMPP client (tried version 0.1.2) which can connect nicely e.g. Google XMPP service. But trying to connect Beehive server with the “old port 5223” + SSL protection was something Beem was hanging forever.

I couldn’t find any other client that could do this (maybe there are), I decided to get the source code for Beem and debug the problem. Eventually found the issue and fixed the SSL connectivity problem in Beem source and voilà – Beem can now connect to Beehive XMPP server.

I’ve emailed the fix to Beem project group so maybe some day the fix will get into the new versions, until then you can get my fixed Beem application that can be downloaded here:

http://sites.google.com/site/droidprojects/file-cabinet/beem-0.1.3.1-sslfix.apk

Please note that you cannot use this application to update your current official Beem client since I used my own digital signatures to sign this custom fix. If you have Beem 0.1.2 installed, deinstall it first then e.g. point your mobile browser to the URL above and install the application. You will get notified about non-standard installation (installing applications form non-Android Marketplace), if you accept this you will get this application installed.

I’ve tested the modified Beem XMPP client both on Android 1.5 and Android 2.1. Seems to work well, at least in the cases where the server uses official (not self signed) server certificates for SSL.

7.1.10

Sample JSF 11g application that uses UCM search SOAP API and HTTP basic authentication

Here are some steps to create an application that uses UCM search API (SOAP based) and shows the results in the web page. In addition I will explain how to setup HTTP basic authentication to enable calling UCM web services.

Create an application

 

You start with creating an application

image

image

image

Give descriptive name for the default web project

image

image

Create JSF page

 

image

image

image

By default we start with the quick start layout:

image

image

Create web service data control based on UCM search WSDL

 

In this part I’ve already downloaded the UCM WSDL descriptions using another UCM instance. The SOAP API is still the same but WSDL points to another hostname as the endpoint. We will modify this later.

 

image

Choose “All Technologies” tab in the left hand side + Web Service Data Control” in the right hand side:

image

Browsing for the search API WSDL file:

image

image

image

I only choose one operation to be used:

image

image

Just click next(s):

image

image

image

Please note that at this point the end point that was derived from WSDL is still pointing to a wrong installation, and I will correct this error later in this guide.

Changing the end point URL for web service (optional)

 

Navigate to the DataControls.dcx file

image

Look into the bottom left hand side Structure pane:

image

Press mouse right click button to open context menu. Choose “Edit Web Service Connection…”

image

Let’s change the hostname. Leave username and password fields intact since they are not used as http basic authentication.

image

image

Adding input parameter field for search text

 

Next I will build up a very simple search form for UCM documents:

Select “Input Text” from component palette and drag’n’drop into the left hand pane:

image 

image

You could change the field names and labels to something more descriptive:

image

Add search results table

 

Next I will drag’n’drop the search results control to the right hand side:

image

image

image

I will only choose some of the columns by deleting the unwanted columns.

image

Leave this dialog to be as-is, press OK.

image

Add search command button

 

Next I will create a command button that will actually execute the query (calls the web service API eventually).

Select the QuickSearch operation from data control and drag’n’drop it into the left pane:

image

image

image

Bind the parameter to the input field

 

Many cases JDeveloper will automatically bind the input parameters from UI to the web service parameters, but here I’ll show you one way to do it when web full automation is not possible.

Navigate to the web service “Parameters” folder and choose the “queryText” parameter. Drag’n’drop it to the input field in JSF page.

image

Bind the input text field:

image

Let the defaults be there and press Ok:

image

image

Binding from input field to the parameter is now done.

Add HTTP basic authentication policy

 

To enable HTTP basic authentication you need to define web service security settings. I start choosing DataControls.dcx which reveals me data control structure, where I select the wanted data control.

image

Press context menu and choose “Define Web Service Security…”:

image

Press “+” to add new security policy:

image

Choose “oracle/wss_http_token_client_policy”:

image

Press “Override Properties..:”

image

Press “New key…”

image

Enter username and password for the end point (actually these will be overriden in the later phase). Enter key name that will be used to find the username and password settings from at runtime.

image

image

Csf-key is important to remember since this will be used to store the username and password for the endpoint in domain keystore.

image

image

Create deployment profiles for project and application and deploy

 

You need to first create WAR deployment profile for the project.

Then you create EAR deployment profile for the application and define the dependency to the WAR deployment profile.

You should deploy the application (not WAR).

Define credentials key under oracle.wsm.security

 

Login to the Fusion Middleware Enterprise manager console. The URL is something like http://localhost:7001/em

image

Press “Create Key”. Key attribute here is the csf-key you defined earlier. In my example I used csf-key “demo-ucm-search”. These are the actual username and password that are used when initiating the connection to UCM.

image

image

Test and run

Deploy the application to the domain and you should be fine with the application based on UCM SOAP APIs.

image

UCM search API uses special search notation, so I wanted to search for UCM documents that had “visa” in the document title. I enter the query criteria dDocTitle <substring> `visa`.

image