Thursday, 3 March 2011

Connection errors between JDeveloper 11g and OTN SoaBPM Appliance

I' m working with the "Pre-built Virtual Machine for SOA Suite and BPM Suite 11g" for a while now.
I use it to prepare for SoaSuite and BPM Bootcamps and one thing I try to do is to use JDeveloper  11g on my Host  (OpenSuse 11.2) and connect to the application server in my VirtualBox guest. In fact, that would (probably) be the architecture to use in a real developer environment.

So I changed the network adapter of the VirtualBox VM (in Device Settings) from NAT to "host-only". Then I re-activated the network-adapter in the guest (Oracle Enterprise Linux), to have it query for new ip-settings.As root I queried for the ip-address using ' ifconfig':
[root@soabpm-vm ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:1C:4C:37
          inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe1c:4c37/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:219 errors:0 dropped:0 overruns:0 frame:0
          TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21908 (21.3 KiB)  TX bytes:26686 (26.0 KiB)
          Interrupt:10 Base address:0xd020

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2222 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2222 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2942937 (2.8 MiB)  TX bytes:2942937 (2.8 MiB)

So the ip-address of my vm is '192.168.56.101'.

Then I changed the /etc/hosts file of the VM as:
127.0.0.1       localhost
192.168.56.101  soabpm-vm soapbm-vm.local bpm-vm.local bpm-vm
::1             localhost6.localdomain6 localhost6

And I added the same address in the host file of my OpenSuse host:
 192.168.56.101  soabpm-vm soabpm-vm.darwin-it.local

In Jdeveloper 11g I created an application server connection, named "soabpm-vm', added the credentials (weblogic/welcome1), hostname: soabpm-vm, ports 7001/7002, domain name: domain1. And then we test:

Fine. So in my BPM Bootcamp preperations I came to the point I have to map the abstract roles (swimlanes) to LDAP roles/users. Doing so you have to query the users over the application server connection. Choosing the connection it would populate the realm-poplist. In my case it would not.Testing in the JDeveloper within the VM would give me:
Mark the Realm "jazn.com" automatically populated.

So I tried to deploy a SoaProject, that builds fine, but deploying resulted in:

[03:10:41 PM] Error sending deployment request to server AdminServer [localhost:7001]  
 java.net.ConnectException: Connection refused 
[03:10:41 PM] Error sending deployment request to server AdminServer [localhost:7001]  
 java.net.ConnectException: Connection refused  

After a while I noticed 'AdminServer [localhost:7001]'! That's not where I want to connect to! And it is certainly not the host I applied in the Jdev Applicatioin Server dialog.

Apparently the AdminURL of Weblogic is not correctly set during startup. This is set in  the config.xml.
This can easily be found as follows:
[oracle@soabpm-vm config]$ cd
[oracle@soabpm-vm ~]$ cd bin
[oracle@soabpm-vm bin]$ . ./wls_env.sh
[oracle@soabpm-vm bin]$ cd $DOMAIN_HOME/config
[oracle@soabpm-vm config]$ ls config.xml
config.xml
Edit the config.xml and look for:
<external-dns-name>localhost</external-dns-name>
Then change it in:
<!--<external-dns-name>localhost</external-dns-name>-->
<external-dns-name>soabpm-vm</external-dns-name>

As always it is good practice to backup the config.xml. And after the change of course you'll need to restart the weblogic server.
But then the connection to the AdminServer will work, the realm can be queried and deploying will work.
Important lesson: the hostname in the setting above should not be localhost, but a meaningful host name.that can be resolved on both the SoaSuite server as well as the Client running JDeveloper.

Lightning on Thunderbird 3.x X86_64

I used to use the Mozilla Calander plugin for Thunderbird: Lightning. Haven't used it for long, but today I found that it would be nice to have it back again. I found that it was on my thunderbird plugins but it was not compatible anymore with my version of Thunderbird.

Since Lightning is architecture specific you need the 64 bit version of it. That is: if you use the 64-bit Linux Thunderbird. It is available but for some unknown reason Mozilla did not publish it. Via the Ubuntu site (thanks to the Ubuntu Community) I found the location of the 1.0b2 beta version (for Thunderbird 3.1.x) here. The 1.0b1 version (for Thunderbird 3.0.x) here. Since it is version specific, with new versions you can try it with changing the version id in the url.

Download it, together with the accompanying Google Calendar provider, and install it in Thunderbird.

Tuesday, 1 March 2011

VirtualBox on Windows XP-2

I thought it was quite simple to increase the VM-memory beyond the 1500MB limit of the GUI.
However, starting the SOABPM server in the OTN SOABPM appliance would certainly crash the VM. Very nice is the state VirtualBox will bring the VM in: the "Guru Mediation"-Mode.
Well, I would not call myself a VirtualBox-guru, so I wouldn't mediate in why the VM didn't feel as comfortable as it should.  So turn-off the machine.

It turns out that the the 1500MB limit is not as arbitrary as thought. In the Issue Ticket here I read that the VMM process places the complete VM's memory  in the process-memory space. In 32-bit Windows the maximum of the process-address space is 2GB.And 2GB for the kernel. Since there is addresspace needed for the VMM process, the video memory etc., the limit for the VM is set to 1500MB.
I would think that the limit is some further on the "save side", possibly something like 1750MB would do either.

Since I'm a pretty stubborn guy, I'll try 2000MB.  Also to see the "Guru Mediation" mode state again... Then I'll try some saver values.

VirtualBox on Windows XP

Today I installed VirtualBox 3.2.12 on a Windows XP. No not 4.0, since that was the version I happened to have with me on my external HD.

I imported the Technet SOABPM Appaliance, but I found that Virtual Box places the disks and machines in a hidden ".VirtualBox" folder within my "Documents and Settings" area. Since on this machine I have a roaming profile I don't want to have folders there with gig's on virtual disks. Logging on Windows with a roaming profile is already slow without this.

So I moved the ".VirtualBox" folder to a "C:\Data\VirtualBox" folder. Then VirtualBox won't find your machine anymore. To solve that a few things are to be done.

First change the defaults paths. In VB Go to <menu>/File/Preferences:


There you can change the paths to "C:\Data\VirtualMachines\VirtualBox\HardDisks" and "C:\Data\VirtualMachines\VirtualBox\Machines".  I differentiate my machines with a VirtualBox subfolder, since I also use VMWare Player.

Then you can make a new VMware image based on the disks. To get the new machine have the same name as the old one I backed up the existing machine directory ("c:\Data\VirtualMachines\VirtualBox\Machines\vbox-oel5u4-soabpm-11gr1ps2-bp1-otn\").

Then I create the machine with the "do not think for yourself, let's do that later"-default settings.
After creating the machine with the two disks, I did a file compare with the old and new "vbox-oel5u4-soabpm-11gr1ps2-bp1-otn.xml" file in the machine folder.

I copy and paste the diffent settings using the file compare tool of TotalCommander in Edit-mode:
  • Copy the <description> node
  •  <memory pagefusion="false" ramsize="2500"/>
    Under windows XP (with 4GB, effective 3,5 GB memory) VirtualBox does not allow the setting higher then 1500MB. But editing it on file-level allows you to raise it beyond that limit. The appliance was made with 2048. This is pretty little for SoaSuite11g. But not to eat too much from Windows I gave it 2500.
  • Copy the <guestproperties> node
  • Important: change the SATA-controller to:  <storagecontroller name="SCSI Controller" portcount="16" type="LsiLogic" usehostiocache="true"/>
  • I changed some other hardware settings from false to true based on the file compare. Eg. HardwareVirtEx.
Then it turns out that the changes did not reflect in VirtualBox. A refresh did not help. To force  VirtualBox to reread the settings, Killed the VirtualBox service with ProcessExplorer:
That did the trick. Also I have it now running with 2500MB!

Monday, 14 February 2011

JDeveloper 11g SOA & BPM Extensions

If you want to use JDeveloper 11g for Soa and/or BPM Development you need to download the SOA JDev Extension for the SOA Composite Designer and the BPM JDev extension for BPM Studio.

In all the documentation you'll find, you see an explanation on how to download them using the Help/Update utilities of JDeveloper. This might be neat and user-friendly for updating one JDeveloper instance where you have a fast internet access. But it is not so handy if you have to provide these extensions to multiple JDeveloper instances for a course for example. Then it is handy when you're able to download them and provide them on a stick.

I found these files on this JDeveloper extension page (just using Google).
So I downloaded the latest versions on my harddisk at home, where I have a good internet access. I hope this page is on-line indefinately.

Tuesday, 1 February 2011

Sql Developer Datamodeller 3.0 available

Just read on Sue Harpers blog that SQL Developer Datamodeller 3.0 went production. It's downloadable from its OTN-page. I'm happy to know it's a free download. End 2008 I used the beta version to model a datamodel for a project I did then. I found it a very nice tool, a good replacement for the ERD/Datamodelling capabilities of Designer. There were a few "misses, and the main ones I had were:
  • Generation of pl/sql packages and functions was not possible
  • Subversion support was poor: when you save a project it recreates directories to save the xml-artifacts in. Recreating directory means removal of the .svn folders, which breaks your svn working copy.
In the new features list I saw promissing statements that these should be solved now. You should be able to generate packages and functions and there is even Subversion Integration (not only support): you can see pending changes, compare models and it shoud "recognize versioned designs". Well, isn't that great?

Since it's free and since it's a really good modelling tool, I think it is a must-use on every project that uses a datamodel. Haven't used it yet? Re-engineer your ERD by importing your datamodel from the database. It gives a quick insight in the datamodel for newcomers in your project.

See also for an early adopter of Sql Developer 3.0 the SqlDeveloper OTN-page. It includes the Datamodeller.

Monday, 24 January 2011

Change http port in Oracle XE

For my current project I had to install tomcat as a j2ee server in Eclipse. It would not start since the Oracle XE database has port 8080 in use.

I found the method to change the ports in XE here. From that example I created my own little script:
set serveroutput on

select dbms_xdb.gethttpport as "HTTP-Port"
,      dbms_xdb.getftpport as "FTP-Port" 
from dual;

declare
  new_port varchar2(4):='8085';
begin

 dbms_output.put_line('Change HTTP Port to '||new_port);
 dbms_xdb.sethttpport(new_port);
end;
/

select dbms_xdb.gethttpport as "HTTP-Port"
,      dbms_xdb.getftpport as "FTP-Port" 
from dual; 


In good old Dutch: "Mucho Plezieros" with it...