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.xmlEdit 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.