Tuesday, December 1, 2009

Oracle BPEL - Invoking a Partner Web Service through a Proxy Server

When trying to call a web service through a proxy server (or trying to avoid using the proxy server for certain hosts) the BPEL Process Manager Administrator’s Guide have steps to edit a file, but I found doing this alone don’t work. The guide basically states to modify the following file: $ORACLE_HOME/bpel/bin/obsetenv.sh

And then modify the line set OB_JAVA_PROPERTIES= as follows:

set OB_JAVA_PROPERTIES="-Dhttp.proxySet=true"
"-Dhttp.proxyPort=8090" "-Dhttp.nonProxyHosts=internal123.company.com"

After rebooting the BPEL server, it still didn’t work. What I had to do was also modify the following file: ORACLE_HOME/opmn/conf/opmn.xml

Look for the piece of XML that looks like this:

<process-type id="oc4j_soadev" module-id="OC4J" status="enabled">
<category id="start-parameters">        
<data id="java-options" value="
-XX:MaxPermSize=128M –ms512M
-mx1024M -XX:AppendRatio=3
-Dhttp.webdir.enable=false-Doraesb.home=/u01/app/oracle/product/10.1.3/soad/integration/esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60
/10.1.3/soad/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false"

Then modify the Dhttp.proxySet=false and change it to Dhttp.proxySet=true, add -Dhttp.proxyHost for your proxy server,  Dhttp.proxyPort for your proxy server port and Dhttp.nonProxyHosts for hosts that should not go through the proxy. The end result should look something like this:

<process-type id="oc4j_soadev" module-id="OC4J" status="enabled">
category id="start-parameters"> <data id="java-options" value="-server –mx1024M
-ms512M -XX:MaxPermSize=128M
-Dhttp.proxySet=false -Doc4j.userThreads=true
-Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts="

Now you can call webservices through a proxy server. ;-)

Tuesday, November 17, 2009

Oracle SQL Developer 2.1 User Snippets

If you are like me and installed the new Oracle SQL developer 2.1 Early Adopter edition on your mac you might have noticed that your user snippets are gone. Also that the directory where you could normally back them up from is no longer working. Well, its only stored in a new location and you can find all your SQL developer settings like your UserSnippets.xml, UserReports.xml and SqlHistory.xml in there.

SQL Developer 1.x location:
/Users/youruser/Library/Application Support/SQLDeveloper/

SQL Developer 2.1 EA location:

Also note that the new directory is a hidden folder so you might need to use the terminal (or any other way you access hidden files) to access it.

Sunday, August 16, 2009

Launch Apex from Oracle eBusiness Suite Release 12

From eBusiness Suite Release 12, we can't use the SSWA plsql function any more. Thus we have to use a jsp function to launch a web page. Here's how to launch a Apex report from a function:

1. Download the xx_launch_apex.jsp file here.

2. Copy xx_launch_apex.jsp to the $OA_HTML folder on the APPS application server. (Something like /u02/DEV/apps/apps_st/comn/webapps/oacore/html)

3. Compile the JSP.
- You can turn on autocompile: Metalink Note: 458338.1.
- Or you can run the following command as user applmgr:
perl -x /u01/app/oracle/TRAIN/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/ojspCompile.pl --compile -s xx_launch_apex.jsp -conf /u01/app/oracle/TRAIN/inst/apps/TRAIN_trn82301/appl/admin/ojspCompile.conf –-flush

4. Set up function to use JSP. (Example below)

Note: If you have no port number use 'null' for the port number.

5. Add function to menu and launch!

Wednesday, April 22, 2009

Is Microsoft really Evil?

No I don’t hate Microsoft, in fact in areas where they have good competition I love their products. I own a X-Box 360 and purposefully decided on one over the PS3. After buying a new Logitech mouse I went back to my comfortable Microsoft one within a week.

But yes, I will admit in areas where Microsoft has a monopoly, I have always had a huge grudge against them and thought they were evil. Yes you guessed it I don’t like Windows. In fact I’m not alone, many other people all around the world will constantly complain about the dominant operating system but yet somehow Microsoft managed to keep Windows as the only real choice for most people. Or did they? Many people might believe Windows's monopoly is due to Microsoft’s good marketing or maybe their strategy to lock you into their products, and I have no doubt that they try to get people in every way possible to use their products, but lately I don’t think that Windows has monopoly because of Microsofts own cunning plans, no I rather think its because of other companies and developers who is in no way affiliated with Microsoft. Read further to hear my story and I’ll explain why..

I am an Oracle developer, and about 10 months ago I took the big step and bought a Macbook Pro. The experience so far has been awesome, the hardware is stunning, and all the software by Apple, or software made for the Mac are all incredible. The problem I have is with multi platform software, or the lack of certain software.

One of the biggest reasons that made it possible for me to move away from Windows was the fact that Oracle Jdeveloper and Oracle SQL developer (the 2 major applications I use for work) both have a Mac version. After already buying my new notebook I realized that the Mac version of Jdeveloper has a major known bug in the BPEL module (which I use a lot) which forces me to either use the Windows version in a virtual machine, or have to use many workarounds to get by. (See http://marinussnyman.blogspot.com/2009/03/usingoraclebpelonmacosxleopard.html) On Oracle’s support site under this bug logged the response from the developer is something like “can’t look at problem since he has no Mac hardware to reproduce the error on”). The bug has been there for more than 2 years. Oracle SQL developer is much better, but even so when my network connection drops, the application just hangs, something that never happens on the Windows version.

Ok, so that’s Oracle, but that’s just one company, but there are many more examples. Lets look at a few. Skype is a great example, their latest official release for the Mac is 2.7 (Windows is 4.0) and even though it has all the major features, its still way behind the Windows version on things like games, screen sharing and more. This is quite strange to me since all Mac’s come with a build in webcam I would think it’s quite a big audience for them? Another application that’s missing from the Mac is from the big Microsoft hater, Google. Yes even though you can use Google Talk through iChat or Adium, if you want to transfer files with your Windows buddies on you have to look elsewhere. In fact, I turned to Messenger for Mac to send files to a lot of friends since even Microsoft’s IM worked better on the Mac than Google’s!

Now, lets look at the open source world. Big Microsoft hater’s right? Well, I have a problem with a bug in Firefox where the Home / End key’s don’t work in certain sites (including Gmail) and it’s a known bug on the Firefox site since 2006! (I have to use a external tool to fix it) I’m sure if there was a bug like this in the Windows version, it would have been a mayor priority to get it fixed right away!

Now, I’m in no way saying I will go back to Windows, and I still love Mac OS X. But for most people its just pain easier to stick to Windows, and know their software will work, and when a bug arrives in the Windows version it will get priority over other OS version’s. Sad, but true.. :-( What do you think?

Tuesday, March 17, 2009

SQL*Plus command history on Mac OS X

Anyone who has tried and use SQL*Plus on Unix would have seen that its quite frustrating since it does not have a command history function under Linux and Unix. When you try to use the ‘up’ key, you get something like this:
However there is a utility called rlwrap that can help us fix this problem. rlwrap is a readline wrapper for shell commands which uses input from the controlling terminal. It adds a persistent input history for each command and supports user-defined completion.

Here are the steps to install rlwrap on Mac OS X:

1. Download Macports from http://darwinports.com/ (If you don't have it already)
2. Install macports.
3. Update macports. Go to /opt/local/bin and type the following:

sudo ./port -d selfupdate

4. Install rlwrap with the following command (You will see it will install some dependencies too):

sudo ./port install rlwrap

5. Add the following line to your .bash_profile:

alias sqlplus='/opt/local/bin/rlwrap sqlplus'

6. Launch SQL*plus as usual and use rlwrap to access your sql history!

Sunday, March 15, 2009

Using Oracle BPEL on Mac OS X ­ Leopard

There is some irritating bugs in Jdeveloper 10134 and the use of BPEL on Mac OS X - Leopard. Here is what they are, and how I fixed / or got workarounds for them:

The first and biggest problem is not being able to drag a Service from the Component Palette into the BPEL Process diagram. You also can't drag in functions in your transformations. This is quite frustrating since it is a known bug on metalink, but not yet fixed. (Bug Number 6924432) Well there is a easy workaround for the BPEL process diagram. You can right­click on any of the Process Activities and go to Insert After ­> Activities ­> Activity.

But what if you created a Empty BPEL process? Whell then you'll have to go to the source and add a empty node (<empty/>) to get you started.

Its just as easy to add a Partnerlink. Right­-click in the Services area of the screen, and select Create new Partnerlink.

On the transformation side of things it's not quite that easy to work around. The best solution I could come up with is to add the functions directly to the source code in the source tab.

You can then switch back to the Design view and see your code.

This might not be the best solution, but will centainly work and enable you to create BPEL processes without VMware or Parallels. And will definitely improve your xsl knowledge.. ;­-) You can also right­click­ ->Help on a function to get information on how to use it.
The second problem I experienced was that my jdeveloper kept crashing when I wanted to edit a partnerlink. I tried changing the JDK versions it used with no luck. What I found was, as soon as I open jdeveloper I "create a partnerlink" but click cancel right afterwards. Why this worked for me, I don't know, but it certainly solved my problem.
The third and last issue I had was that when launching jdeveloper it doesn't close the terminal
window. What I did to fix that was to add the JDeveloper directory to my PATH environment variable and then launch jdeveloper with the following command:

jdev &exit

This will exit the terminal window after opening JDeveloper. To add the JDeveloper ditectory to your path open your .bash_profile file and add the following line:

export PATH=$PATH:"/Applications/jdevstudio10134/jdev/bin"

Hope this post will help you use BPEL on Mac OS X Leopard!

Sunday, March 1, 2009

Setting an environment variable in Mac OS X

Setting the environment variable in files like .bash_profile won't work (unless you launch the application from the terminal) because in OSX the applications are not started as in other UNIX'es, they don't inherit the parents shell variables.

Applications like Oracle JDeveloper for mac also don't work by just setting .bash_profile. The only way is to edit /etc/launchd.conf to contain a line like this: "setenv VAR value" and then reboot the system.

Saturday, February 21, 2009

Oracle JDeveloper anti aliased text

I don't know about you, but I love anti aliased text. Here's how to add it to Jdeveloper.

Add this to your jdev.conf file:
"AddVMOption -Dswing.aatext=true"

Monday, February 16, 2009

Using Toad with Oracle Instantclient

1. Install the Oracle instant client from here. Make sure you download version and not any of the 11.x.x.x versions, they didn't work with my version of Toad. (9.1)

2. Extract the zip somewhere. Say C:\instantclient

3. Add this directory to the PATH environmental variable. To do this, right click on My Computer, go to the Advanced tab, and click 'Environment Variables'. Under System variables, find Path. Select it, and click edit, and add to the end. (Example: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\instantclient)

4. In the same window, under 'User variables for …', Click the New button. Call the variable 'TNS_ADMIN' and point to your instant client directory. (C:\instantclient)

5. Create a file called 'TNSNAMES.ORA' in your instant client installation directory. In this file designate the connection parameters for your database. Mine looked something like this:


6. You can also create a sqlnet.ora file but its not neccesary.

7. Restart your computer and fire up toad.

You can use other clients like Oracle Sqldeveloper as well.

Done on Windows XP & Toad 9.1

Sunday, February 15, 2009

Windows not Windows?

If this isn't enough to make you ditch Vista I don't know what is.. Lets hope Windows 7 is a least "Windows".. ;-)

A typical Vista error:

Monday, January 5, 2009

Install & Use Oracle SQL Developer 1.5.x on a Mac
To install Oracle SQL Developer on a Mac is as easy as installing any application on a Mac. Just unzip the downloaded archive (download it from here), and drag the file to your applications folder. SQL Developer is a great SQL tool for the mac, but there are quite a few things I didn't like with its default settings, so here's what I changed:

1. Line Terminator – If you work like me in a Windows dominant office, you'll be sure to change your line terminator from “Platform Default” to “Windows”. This will insure that your newline caracters you add also show up on a Windows, Linux and Mac computer so you can't go wrong with that setting.

2. Fontsize – On my Macbook pro 15” the fontsize is way too small for me. To do this go to Tools -> Preferences -> Code Editor -> Fonts. I changed mine from the default 12 to 15 on Monospaced.

3. Colors – Coming from Toad, the default SQL Developer text color's are downright ugly. I liked the Toad color scheme, so I changed mine to the same colors. To do this go to Tools -> Preferences -> Code Editor -> Syntax Colors. Change the following colors:
  • Default Keyword –> Blue. Also turn off Bold.
  • Default Comment –> Green.
  • Default String –> Red.
  • Default Number –> Dark red.
  • Selected Text – Foreground -> Black. Background –> Light Grey.
You can even save your new scheme as “Toad” ;-) Your colors will then go from this first image to the second one.. :-)

Another few changes I have made is to the accelerators.You can find them under Tools -> Preferences ->Accelerators.
1. Popup Describe – I made this F4. (The same as Toad)
2. Execute Statement – I made mine Cmd+Enter and CTRL+Enter.