Posts Tagged Oracle

Fix “BEA-000394: Deadlock detected” for Weblogic with ADF Applications 12.2.1.2

If you try the newest version 12.2.1.2 (or maybe earlier versions too) you see, that your managed server does not restart, when

  • you have deployed your ADF application(s)
  • you try to restart the managed server with ADF
  • you use intentionally or not shared libraries in your weblogic-application.xml (see example below)
<?xml version = '1.0' encoding = 'UTF-8'?>
<weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd"
                      xmlns="http://www.bea.com/ns/weblogic/weblogic-application">
  <listener>
    <listener-class>oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener</listener-class>
  </listener>
  <listener>
    <listener-class>oracle.mds.lcm.weblogic.WLLifecycleListener</listener-class>
  </listener>
  <library-ref>
    <library-name>adf.oracle.domain</library-name>
  </library-ref>
</weblogic-application>

You run into unpublished Bug 24490566: INTERMITTENT DEADLOCK IN WLS STARTUP DURING ADF-SHARE-DEPLOYED-TESTS.

But no problem, Oracle has created Patch 24490566: INTERMITTENT DEADLOCK IN WLS STARTUP DURING ADF-SHARE-DEPLOYED-TESTS for us for version 12.2.1.2.

Remember to install the patches for all of your developers too!

Remember too, if you want to install more than one patch, there can be conflicts. Please test carefully, if all of your problems are solved for all patches after adding one more patch. Maybe you have to create a merge request in Oracle My Support.

That’s it!

, , , , , ,

Leave a comment

#DOAG2016 wrap up

doag_wegweiser

Another DOAG is over and here are my summary.

Day 1

Unfortunately the early train from duesseldorf arrives not before 9:30, so I missed the first morning slot. But on the other hand I this was the slot where I had to decide between 8 presentations, which I’m interested in.

The first soft skill presentation was about creative techniques beyond brain storming. The mentioned 3 techniques was all unknown for me, maybe I give it a try next time.

The next presentation promises a live demo of a forms 12c migration to production. Nothing really new here and remembers me for an “beautify our village” contest. But fairly enough for customers which absolutely want to remain on Oracle Forms. As Translation Hub 12c is not available and Oracle Reports 12c will be the last version, I think 11g will the last version we will use on our side before completing migration to ADF.

I attend two presentations, which shows Auraplayer on top of Oracle Forms to provide mobile applications via Oracle Mobile Cloud Service (MCS). I understand the MCS thing, although I find it very complicated to use. But put another layer on complicated and most slowly Oracle Forms to create web services for mobile applications seems no use case for me. I doubt that the recording of web services works really well for complicated forms which switch the displayed items and canvases depending on the selected data. All samples was very simple forms, but the response time of the resulting mobile app was not acceptable for me.

The presentation about continuous integration in APEX give me some new ideas for maybe replacing our actual deployment processes for PL/SQL in the future. Will have a look at the mentioned sql-maven-plugin, when we go for Maven for ADF too. Will check Rspec as BDD framework to run PL/SQL unit tests. Promising is the feature to tie together Selenium tests and data checks in the same Rspec test definition. One drop of bitterness remains, as the presenter had no idea how to solve a merge conflict. Seems that this was only a proof of concept and not really used daily there.

Best practices for PL/SQL performance was a good reminder, what I all know about this topic but use to seldom. But will use some of the configuration things like native compilation of the system packages or PL/SQL optimization level in my docker instances for automatic testing to optimize test times.

SQL tips and tricks was a sovereign presentation, but shows me again that for several Oracle database releases only little improvements for the developer comes with.

Day 2

In session “Standing at a Crossroads, ADF and JET” Duncan Mills clearly show the differences between Oracle ADF and Oracle JET. Running gag: The “Schnecke Chart” for quick decision between both. Will look, if I can reuse this for other decisions.

Next I tried an meeting at the Unconference about continuous integration for PL/SQL. But the most discussions really goes about the automation part. Most participants missed the most importantly definition of continuous integration: ” … continuous integration (CI) is the practice of merging all developer working copies to a shared mainline several times a day.”. Unfortunately I realize now that in the German Wikipedia translation this basis is completely softened: “developer should integrate as often as possible”. Not really new for me here, hope I have told something useful to the others.

“Extending Oracle ADF BC Models to REST, Cloud and Mobile” was a good time to remember what’s now possible as it really available and we now try another migration away from ADF 11g to the hottest version. I have seen this in the last conferences already.

Have read “Deep Dive Into Oracle ADF Transactions: Advanced Techniques” in the web already, but the information was a little bit clearer after seeing Eugene Fedorenko live.

Something completely different: “Free Load Testing Tools for Oracle Database”. I had known Swingbench before. SLOB is completely new for me and did not seen Apache JMeter JDBC test in this context before. Will test the last maybe in the future.

“Top 10 stumble stones for ADF 12c” was very technical but cool, good to have Markus Klenke at our site while our coming migration next weeks.

“Faster, Better, Cheaper: Oracle ADF Development in the Cloud” – with lot of problems in the demo part. Maybe really because of the DOAG WiFi. Quick Tip for all presenters: as I know at DOAG conferences there is ever an laptop available with LAN, try to put it in your laptop! For the content: DCS seems to restricting to much. I prefer Jenkins over Hudson. No push option directly with commit i JDeveloper etc.

Masking test data is very relevant in our banking busines, so I attend “Oracle Data Redaction live in Telko”. Seems that there are many fall knits here, as this doesn’t seem to solve all requirements out of the box.

Before the evening keynote Günter Stürner and Jürgen Menge was awarded, congratulations to both.

Following keynote “Hacking for managers” was very entertaining, if you are German then you should look on youtube for the presenter.

Now we are not ready for the evening party, we start the yearly German ADF Community meeting. Interesting part was a presentation of the Tools Statement of Direction, which again clearly differentiate between ADF, MAF, JET, MAX and ABCS. We get the clear statement ADF is standard for SAAS and JET for PAAS development at Oracle. In my opinion Oracle miss to communicate this in other presentations and miss to further present ADF in the public. A lot of questions of the present Community members was answered here too. Later we eat together with some of the product managers and community members and discussed topics for future presentations.

Later I go back to my hotel to remotely patch our fresh ADF 12.2.1.2 Server with patch for critical escalated bug to start our planned migration for ADF 11.1.1.5 next week. More later in a separate post.

Day 3

In “Indiana Nimphius und der JavaScript Tempel des Todes” Frank shows us his view on the JavaScript Universum, maybe we can really not avoid this in the future on some business cases. But for the next time we will stay on strongly supported ADF and will reduce JavaScript usage there to the minimum.

Thank god the roll-out of SQL Developer 4.1.5 is not started already in our company. Will look how fast I can add the free PLSQL/COP SQL Developer Plugin of Philip Salvisberg from Trivadis to the silent install process. He showed in “Fighting Bad PL/SQL” the theory and the practice how his static code analysis tool for PL/SQL does work. Depending on the outcome and the price maybe we will later implement in continuous integration.

The keynote “Big Picture of digital revolution” wakes the expectation to us to take responsibility for the effects of digital revolution to the society and makes me very thoughtful.

After our hopefully successful migration to ADF 12.2.1.2 I want to change our deployment from ANT to Maven, so I attend the presentation “Migration Maven Possibilities”. This gives a good reminder what to do at that point.

Very interesting presentation, which really does not deserves so few visitors, was “Home Lab Setup and Familiarization of E-Business R12.2”. My time with E-Business Suite is over 15 years away, so I was surprised that I recognized much of the components. I think I’m sure not to install E-Business Suite for the moment, but lot of the instructions for the Home Lab Setup could I reuse for other technologies. Some concepts for the E-Business Suite, eg. double filesystem for reducing offline time for patching, are very interesting.

With last 2 presentations I enter again the world of ThickDatabase paradigm. We ever know that executing business in the database seems faster as in the middle tier, but we had no proofs. Now Toon Koppelaars from Oracle itself give us this with a deep analysis. The question remains – will the other Oracle departments will learn from this?

day 4

Tomorrow I will be trained in Continuous Delivery with Oracle Fusion Middleware and Oracle Cloud. I will release another blogs, when implementing some findings from this training.

conclusion

As you see I switch often between technologies. This happens not ever voluntary. Normally I interested more in the development like ADF, MAF and JET. This year these presentation are unfortunately distributed over the conference. So I have discussed this today with the DOAG executives, they will improve this next year.

Nevertheless I get a lot of ideas from presentations in technologies I do not or not regularly use, so sometime I intentionally choose from such interesting presentations.

A recommendation for all conference visitors. Read the abstracts before you go to a conference and maybe before you book! You avoid disappointments because of wrong expectations. Often the title has the only purpose to be accept the presentation and has little to do with the real content. Abstracts give you often a better idea about the content.

That’s it!

, , , , , , , , , , , , , , , ,

Leave a comment

Virtual Development Server: Provide Docker images in docker registry for Oracle XE Database and others

For later creation of containers as needed in the deployment process we have first to build docker images whenever we do not find suitable one in docker hub.

For most of my development I need a oracle database. On the internet you can find a lot of Dockerfile’s for this, but no ready image. This is because for running a database you have to accept a license and this happens when you download the installation software. For private testing this license often is free.

The basic cycle for all of this images is the same on my side:

  1. Find a Docker image
  2. If not found download required Software and build a Docker image
  3. Build the Docker image
  4. Push the images to private docker registry or the public registry DockerHub

Fortunately Oracle provides recently on GitHub a lot of working Dockerfile’s for building different product images. The creator Gerald Venzl desribes in this blog how to create an Oracle EE image.

Following you find an example for building Oracle XE 11.2.0.2 Image.

First you have to clone the git repository to a directory of you choice, I choose C:\shared\scmlocal\docker-images.
Put the downloaded installation source oracle-xe-11.2.0-1.0.x86_64.rpm.zip in the subdirectory C:\shared\scmlocal\docker-images\OracleDatabase\dockerfiles\11.2.0.2 as described in GitHub.
Next we have to map this directory to our virtualbox via following vagrant instructions. Additional we prepare port forwarding for accessing later the database from our host system.

...
  # Port Forwardings for:
  # - Oracle database port
  config.vm.network "forwarded_port", guest: 1521, host: 1521
  # Oracle Application Express (APEX)
  config.vm.network "forwarded_port", guest: 8080, host: 8080
...
  # map Oracle Docker Images installation path
  config.vm.synced_folder "C:\\shared\\scmlocal\\docker-images", "/docker-images", :mount_options => ["dmode=777","fmode=777"]
...

After that restart the virtualbox and connect to it via

vagrant halt
vagrant up
vagrant ssh

In the output you can see this mapping.

...
    default: 1521 (guest) => 1521 (host) (adapter 1)
    default: 5000 (guest) => 5000 (host) (adapter 1)
    default: 8080 (guest) => 8080 (host) (adapter 1)
...
    default: /docker-images => C:/shared/scmlocal/docker-images
...

Now you create build the image with the Oracle XE (-x) database version (-v) 11.2.0.2 via the provided scripts from oracle. -i skips the MD5 checksum check, as the checksums are not checked in as UNIX text format and so does not work in our vagrant on windows / oel virtualbox combination.

cd /docker-images/OracleDatabase/dockerfiles
./buildDockerImage.sh -v 11.2.0.2 -x -i

Now you have to wait some time. When the process is ready, you get at the time of this writing an image with the binaries installed.

docker images
REPOSITORY          TAG                 IMAGE ID            CREATED              SIZE
oracle/database     11.2.0.2-xe         624d78c89ccb        About a minute ago   1.203 GB
registry            latest              c6c14b3960bd        5 weeks ago          33.28 MB
oraclelinux         latest              1988eb5b3fc6        6 weeks ago          278.2 MB

Next we tag this image for pushing to the local docker repository, which we have created in the first blog of this series and is up with every vagrant up of our virtualbox. After that we push it to the registry.

docker tag oracle/database:11.2.0.2-xe localhost:5000/oracle/database:11.2.0.2-xe
docker push localhost:5000/oracle/database:11.2.0.2-xe

In the output we see the succesful push.

The push refers to a repository [localhost:5000/oracle/database]
345dfbce8859: Pushed
dd4b46d40894: Pushed
11327e04fac0: Pushed
11.2.0.2-xe: digest: sha256:82058ca2c5c201ff46471a8db4d9569da9869d420727595884050f94dad0ec85 size: 955

Now we will check, if we can create a Docker container from our image in the registry and the database is working in it. Therefore at first we delete the oracle/database and oraclelinux images from our virtualbox. Then we create the container.

docker rmi 624d78c89ccb -f
docker rmi 1988eb5b3fc6
sudo docker run --shm-size=1g -p 1521:1521 -p 8080:8080 --name="db11.2.0.2-xe" --restart unless-stopped localhost:5000/oracle/database:11.2.0.2-xe

In line 3 we pull the image from the local registry, start a container, open the ports 1521 and 8080 to the virtualbox and give the container a name.

Unable to find image 'localhost:5000/oracle/database:11.2.0.2-xe' locally
11.2.0.2-xe: Pulling from oracle/database

10ec637c060c: Pull complete
1902f66bc90b: Pull complete
dd8942200fe1: Pull complete
Digest: sha256:41ce1015c8f68ce063e855e7afa96000ededeef1e197e2181bc04c9577d73a1b
Status: Downloaded newer image for localhost:5000/oracle/database:11.2.0.2-xe
ORACLE AUTO GENERATED PASSWORD FOR SYS AND SYSTEM: 9f4e9a733e7983bc

Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g Express
Edition.  The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts.  Press <Enter> to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:
Specify a port that will be used for the database listener [1521]:
Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of
different passwords for each database account.  This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:
Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.

SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 6 09:41:22 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL>
PL/SQL procedure successfully completed.

SQL> Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
#########################
DATABASE IS READY TO USE!
#########################
db_recovery_file_dest_size of 10240 MB is 0.98% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Starting background process CJQ0
Tue Sep 06 09:41:19 2016
CJQ0 started with pid=26, OS id=759
Tue Sep 06 09:41:24 2016
XDB installed.
XDB initialized.

In line 9 you can see the autogenerated passwords.
When line 46 appears, you can connect to the database.
With following command you can change the passwords of SYS and SYSTEM:

sudo docker exec db11.2.0.2-xe /u01/app/oracle/setPassword.sh LetsDocker

You see following output:

SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 6 15:49:34 2016
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL>
User altered.
SQL>
User altered.

As long as you not remove or manually stop the container, it restarts with the virtualbox now via:

vagrant halt
vagrant up

At the moment you cannot make your database instance data persistent for this container, I have opened an issue for this, but Gerald Venzl has promised to to implement this later.

Here you find the source code for this blog.

That’s it.

References:

  • GitHub – oracle-docker-images Official source for Docker configurations, images, and examples of Dockerfiles for Oracle products
  • Creating and Oracle Database Docker image (Developing using Oracle technologies)
  • , , , , , , , , , , , ,

    Leave a comment

    Set all WebLogic log levels to “Inherit” via WLST

    Logging is a very useful feature of WebLogic.

    Unfortunately the log levels, which are set after a clean install of WebLogic or some of the Fusion Middleware product creates a lot of noise and therefore it costs I/O performance.

    Additional after analyzing an issue with logging often resetting the log level is forgotten.

    Here you get a script to reset the log levels at regular intervals or after a trace session.

    #!/usr/bin/python
    execfile('get_environment.py')
    connect(wlUser, wlPassword, wlAdminUrl)
    edit()
    loggers = listLoggers(target=managedServer, runtime=0)
    for key, value in loggers.items():
      if key <> "" and key <> "ADF_PERFORMANCE_MONITOR_DATABASE" and value <> "":
        print "set " + key + " from " + value + " to <Inherited>"
        setLogLevel(target=managedServer, runtime=0, logger=key, level="")
    loggers = listLoggers(target=managedServer, runtime=0)
    exit()
    

    In line 2 a script is called to initialize your environment variables wlUser, wlPassword, wlAdminUrl and managedServer.
    In line 5 you get the list of loggers.
    In line 6..9 you iterate over this list.
    In line 7 you can add your own restrictions. Here are already filtered all inherited loggers and one special tool logger for performance monitoring of ADF applications.
    In line 10 the loggers are shown again for the result, you can remove this.

    Now call this script via

    $ORACLE_HOME/oracle_common/common/bin/wlst.sh config_loglevel.py
    

    In the output you see similar output:

    ------------------------------------------------------------------------+-----------------
    Logger                                                                  | Level
    ------------------------------------------------------------------------+-----------------
    ...
    oracle.ods.virtualization.accesslog                                     | ERROR:1
    ...
    set oracle.ods.virtualization.accesslog from ERROR:1 to <Inherited>
    
    ------------------------------------------------------------------------+-----------------
    Logger                                                                  | Level
    ------------------------------------------------------------------------+-----------------
    ...
    oracle.ods.virtualization.accesslog                                     | <Inherited>
    ...
    

    This version of the script change only the persistent logger levels (runtime=0), because we don’t want influence running trace sessions. But as our servers are dayly started, all runtime log levels are resetted at this point to the persistent one’s.

    That’s it.

    References:

    , , , , ,

    Leave a comment

    Virtual Development Server: Add enough ram and disk space to VirtualBox for further server components

    As I want later build docker images and run docker containers I have to provide enough disk space for this.

    Per default the Vagrantboxes have vmdk disks, these have a static size and are to small for my purposes.

    Therefore I convert the disk, which comes with the box, via Vagrant VirtualBox provider from vmdk to vdi, so that it allocate only the used disk space in the host system.
    Additional I add a second big disk:

    ...
      # virtualbox provider
      config.vm.provider "virtualbox" do |vb|
        # name in VirtualBox
        vb.name = "Development Server"
    
        # configure 16 GB memory 
        vb.customize ["modifyvm", :id, "--memory", "16384"]
    
        # clone the original vmdk disk into a dynamic vdi disk, which only allocate the used space on the host
        if ARGV[0] == "up" && ! File.exist?("#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/#{vb.name}.vdi")
          # configure the SATA controller for second disk port, for other box you may have another controller
          vb.customize [
            "storagectl", :id, 
            "--name", "SATA", 
            "--controller", "IntelAHCI", 
            "--portcount", "1", 
            "--hostiocache", "on"
          ]
          # clone the original disk, for other box you may have another disk name
          vb.customize [
            "clonehd", "#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/box-disk2.vmdk", 
                 "#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/#{vb.name}.vdi", 
            "--format", "VDI"
          ]
          # attach the cloned disk to the controller
          vb.customize [
            "storageattach", :id, 
            "--storagectl", "SATA", 
            "--port", "0", 
            "--device", "0", 
            "--type", "hdd",
            "--nonrotational", "on",
            "--medium", "#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/#{vb.name}.vdi" 
          ]
          # delete the original disk to release it's space
          vb.customize [
            "closemedium", "disk", "#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/box-disk2.vmdk", 
            "--delete"
          ]
        end
    
        # create addtional big dynamic vdi disk for docker images
        if !File.exist?("#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/#{vb.name}_docker.vdi")
          # create addtional big dynamic vdi (200 GB)
          vb.customize [
            "createhd", 
            "--filename", "#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/#{vb.name}_docker.vdi", 
            "--format", "VDI", 
            "--size", 200 * 1024
          ] 
          # attach the addtional disk to the controller
          vb.customize [
            "storageattach", :id, 
            "--storagectl", "SATA", 
            "--port", "1", 
            "--device", 0, 
            "--type", "hdd",
            "--medium", "#{ENV["HOME"]}/VirtualBox VMs/#{vb.name}/#{vb.name}_docker.vdi"
          ]
        end
      end
    
      # shell provider
      # format the additional disk and add the free space to the box
      config.vm.provision :shell, :path => "add_disk.sh"
      ...
    

    Lines 64..66 adds the additional disk space to a logical volume via a Vagrant shell provider, which calls the script add_disk.sh in the created VirtualBox machine.
    Resizing the first disk does not work, as therefore the machine has to be booted, which cannot be handled with Vagrant.

    # exit immediately if a command exits with a non-zero status.
    set -e
    # activate debugging from here
    set -x
    
    if [ -f /etc/disk_added_date ] ; then
       echo "disk already added so exiting."
       exit 0
    fi
    
    # show diskspace of the logical volume before adding the disk
    df -h /dev/mapper/linux-root
    
    # partitioning the disk
    sudo fdisk -u /dev/sdb <<EOF
    n
    p
    
    
    
    t
    
    8e
    w
    EOF
    
    # initialize the partition for use by logical volume manager
    sudo pvcreate /dev/sdb1
    # add the partition to volume group linux
    sudo vgextend linux /dev/sdb1
    # increase the size of the logical volume /dev/mapper/linux-root
    sudo lvextend --extents +51199 --resizefs /dev/mapper/linux-root
    # mark that the disk was added
    date > /etc/disk_added_date
    
    # show diskspace of the logical volume after adding the disk
    df -h /dev/mapper/linux-root
    

    Now you have to recreate the VirtualBox machine via

    vagrant destroy
    vagrant up
    

    In the output you can now see, how the logical volume grows:

    ==> default: Running provisioner: shell...
        default: Running: C:/Users/torst/AppData/Local/Temp/vagrant-shell20160812-2348-1ln6wrz.sh
    ==> default: ++ '[' -f /etc/disk_added_date ']'
    ==> default: ++ df -h /dev/mapper/linux-root
    ==> default: Filesystem              Size  Used Avail Use% Mounted on
    ==> default: /dev/mapper/linux-root   16G  1.9G   14G  12% /
    ==> default: ++ sudo fdisk -u /dev/sdb
    ==> default: Welcome to fdisk (util-linux 2.23.2).
    ==> default:
    ==> default: Changes will remain in memory only, until you decide to write them.
    ==> default: Be careful before using the write command.
    ==> default:
    ==> default:
    ==> default: Command (m for help): Partition type:
    ==> default:    p   primary (0 primary, 0 extended, 4 free)
    ==> default:    e   extended
    ==> default: Select (default p): Partition number (1-4, default 1): First sector (2048-419430399, default 2048): Using default value 2048
    ==> default: Last sector, +sectors or +size{K,M,G} (2048-419430399, default 419430399): Using default value 419430399
    ==> default: Partition 1 of type Linux and of size 200 GiB is set
    ==> default:
    ==> default: Command (m for help): Selected partition 1
    ==> default: Hex code (type L to list all codes): Hex code (type L to list all codes): Changed type of partition 'Linux' to 'Linux LVM'
    ==> default:
    ==> default: Command (m for help):
    ==> default: Device does not contain a recognized partition table
    ==> default: Building a new DOS disklabel with disk identifier 0xb4c74c64.
    ==> default: The partition table has been altered!
    ==> default:
    ==> default: Calling ioctl() to re-read partition table.
    ==> default: Syncing disks.
    ==> default: ++ sudo pvcreate /dev/sdb1
    ==> default:   Physical volume "/dev/sdb1" successfully created
    ==> default: ++ sudo vgextend linux /dev/sdb1
    ==> default:   Volume group "linux" successfully extended
    ==> default: ++ sudo lvextend --extents +51199 --resizefs /dev/mapper/linux-root
    ==> default:   Size of logical volume linux/root changed from 15.62 GiB (4000 extents) to 215.62 GiB (55199 extents).
    ==> default:   Logical volume root successfully resized.
    ==> default: meta-data=/dev/mapper/linux-root isize=256    agcount=4, agsize=1024000 blks
    ==> default:          =                       sectsz=512   attr=2, projid32bit=1
    ==> default:          =                       crc=0        finobt=0
    ==> default: data     =                       bsize=4096   blocks=4096000, imaxpct=25
    ==> default:          =                       sunit=0      swidth=0 blks
    ==> default: naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
    ==> default: log      =internal               bsize=4096   blocks=2560, version=2
    ==> default:          =                       sectsz=512   sunit=0 blks, lazy-count=1
    ==> default: realtime =none                   extsz=4096   blocks=0, rtextents=0
    ==> default: data blocks changed from 4096000 to 56523776
    ==> default: ++ date
    ==> default: ++ df -h /dev/mapper/linux-root
    ==> default: Filesystem              Size  Used Avail Use% Mounted on
    ==> default: /dev/mapper/linux-root  216G  1.9G  214G   1% /
    

    Here you find the source code for this blog.

    That’s it.

    References:

  • VirtualBox : Extend Virtual Disk and File System
  • Resizing disk space on vagrant box
  • , , , , , , , , ,

    Leave a comment

    Virtual Development Server: Creating Virtualbox machine including docker containers with Vagrant

    As I want to decouple my development server from my computer as much as possible I want to create first a virtual machine with linux.

    Because I have used Oracle Virtualbox in the past successfully, I will use it here too.

    As I want have later a reproducible environment via Infrastructure as code, I give Vagrant a try for this. As source code management system I use GIT, my remote repository is located at GitHub.

    As I don’t want create a new linux from scratch, I have looked for a ready system at Vagrantboxes, which contains a new Oracle Linux version, and find a Oracle Linux 7.1 x86_64 system with Chef and Puppet preinstalled.

    Before I could start, I had to install on my Windows 10 computer Vagrant 1.8.5 and Oracle Virtualbox 5.0.16. Don’t use the 5.1 Version, as at this is not yet supported by vagrant 1.8.5.

    For automatic update of the Oracle VM VirtualBox Extension Pack, which is delivered with the ready box and is required for use of shared folders and more, you should install following plugin as described here:

    vagrant plugin install vagrant vbguest
    

    Next I have created a directory of your choice and init there a Vagrantfile by calling

    vagrant init
    

    Then I changed the Vagrantfile as following, see the inline comments for documentation:

    Vagrant.configure(2) do |config|
    
      # Use the mentioned ready OEL 7 linux box
      config.vm.box = "oraclelinux-7-x86_64.box"
      config.vm.box_url = "http://cloud.terry.im/vagrant/oraclelinux-7-x86_64.box"
    
      # Create a private network
      config.vm.network "private_network", type: "dhcp"
    
      # persistant storage for all docker container
      config.vm.synced_folder "C:\\shared\\virtual_storage", "/virtual_storage", :mount_options => ["dmode=777","fmode=777"]
      
      # virtualbox provider
      config.vm.provider "virtualbox" do |vb|
        # name in VirtualBox
        vb.name = "Development Server"
    	end
    
      # Docker Private Registry container for storing later builded docker images, which are not in the Docker Public Registry at https://hub.docker.com/
      config.vm.provision "docker" do |d|
        d.run "registry", image: "registry", daemonize: true, args: "-d -p 5000:5000 -v /virtual_storage/docker_registry:/var/lib/registry"
      end
    
    end
    

    Run next from the created directory

    vagrant up
    

    Following you see the output

    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'oraclelinux-7-x86_64.box'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Setting the name of the VM: Development Server
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
        default: Adapter 2: hostonly
    ==> default: Forwarding ports...
        default: 22 (guest) => 2222 (host) (adapter 1)
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2222
        default: SSH username: vagrant
        default: SSH auth method: private key
        default: Warning: Remote connection disconnect. Retrying...
        default:
        default: Vagrant insecure key detected. Vagrant will automatically replace
        default: this with a newly generated keypair for better security.
        default:
        default: Inserting generated public key within guest...
        default: Removing insecure key from the guest if it's present...
        default: Key inserted! Disconnecting and reconnecting using new SSH key...
    ==> default: Machine booted and ready!
    [default] GuestAdditions versions on your host (5.0.26) and guest (5.0.12) do not match.
    Loaded plugins: ulninfo
    Package kernel-uek-devel-4.1.12-32.el7uek.x86_64 already installed and latest version
    Package gcc-4.8.5-4.el7.x86_64 already installed and latest version
    Package 1:make-3.82-21.el7.x86_64 already installed and latest version
    Package 4:perl-5.16.3-286.el7.x86_64 already installed and latest version
    Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
    Nothing to do
    Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
    mount: /dev/loop0 is write-protected, mounting read-only
    Installing Virtualbox Guest Additions 5.0.26 - guest version is 5.0.12
    Verifying archive integrity... All good.
    Uncompressing VirtualBox 5.0.26 Guest Additions for Linux............
    VirtualBox Guest Additions installer
    Removing installed version 5.0.12 of VirtualBox Guest Additions...
    Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
    Copying additional installer modules ...
    Installing additional modules ...
    Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
    Building the VirtualBox Guest Additions kernel modules
    Building the main Guest Additions module[  OK  ]
    Building the shared folder support module[  OK  ]
    Building the shared folder support module[  OK  ]
    Building the graphics driver module[  OK  ]
    Doing non-kernel setup of the Guest Additions[  OK  ]
    You should restart your guest to make sure the new modules are actually used
    
    ==> default: Checking for guest additions in VM...
    ==> default: Configuring and enabling network interfaces...
    ==> default: Mounting shared folders...
        default: /vagrant => C:/shared/scmlocal/blog
        default: /virtual_storage => C:/shared/virtual_storage
    ==> default: Running provisioner: docker...
        default: Installing Docker onto machine...
    ==> default: Starting Docker containers...
    ==> default: -- Container: registry
    

    In lines 1..24 you see the loading of the ready box and booting with the defined network
    In lines 25..50 the version of the VirtualBox GuestAdditions of the box is checked and after that replaced with the actual installed VirtualBox version. This happens only on the first “vagrant up” call.
    In lines 57..58 Docker is installed as a Vagrant Docker provider is called in the Vagrantfile line 20 and it does not exist in the box before.
    In lines 59..60 a Docker Private Registry container is started via loading docker image from the Docker Public Registry. In a later blog we will use this Docker Private Registry container to hold our own created docker images like database and development tools. The pushed images are saved to a mapped host volume of my windows 10 computer.

    You can connect to the virtualbox directly via

    vagrant ssh
    

    The you can see the downloaded Docker Private Registry images and the started container from this image:

    [vagrant@oraclelinux7 ~]$ docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    registry            latest              c6c14b3960bd        13 days ago         33.28 MB
    [vagrant@oraclelinux7 ~]$ docker ps
    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
    739c1c9926b1        registry            "/entrypoint.sh /etc/"   5 minutes ago       Up 5 minutes        0.0.0.0:5000->5000/tcp   registry
    

    You can now stop the Development Server via

    vagrant halt
    

    If you startup again the server via

    vagrant up
    

    the provision steps are not replayed until you destroy the server or explicitly call the provision again via

    vagrant provision
    

    Here you find the source code for this blog.

    That’s it.

    , , , , , , , ,

    1 Comment

    Oracle TranslationHub neither supported for 12c Database, 12c Forms/Reports or 64 bit!

    If you need TranslationHub (Windows only) for your forms and reports development and plan to move to one of the following

    • 12c Database for your TranslationHub repository
    • 12c Forms/Reports (only available for 64 bit Windows)
    • higher version of 64 bit 11g Forms/Reports

    then please immediately stop! None of this combination works with TranslationHub!

    For the last point I had created enhancement request 14155931 back in June 2012!

    For the first point I had created a service request last week I and get following answer:

    Unfortunately, OTH is no longer supported or being developed. Customers can continue to use OTH as-is.
    About the errors, based on today’s standards, OTH has several limitations: 

    1. It is a 32bit product and expects to co-exist with a 32bit DB and optional Forms/Reports installation. 64bit installations will not work.
    2. Likely OTH will not work correctly on newer operating systems like Windows 8.1 or newer. It likely will also not be stable on Windows 7-x64 either, although it may generally seem to function.
    3. It may be possible to use a version 12 database as the target database for OTH projects, however this has never been certified and therefore shouldn’t be supported if issues arise.

    Although Oracle currently do not have replacement for OTH, the Forms team is working on a possible alternative that may be available in the future. If customers require the use of OTH immediately, they should consider installing and using it in an environment that was previously certified for its use.
    The Oracle Technology Network Forums should be considered (for the customer) if there are questions about OTH.
    https://community.oracle.com/community/development_tools/forms

    Product Management is aware of the importance of this situation.
    Any news regarding OTH will be published on Forms’s OTN page, however, for the moment, unfortunately, there is not much we can help with, in Support.

    As 11g Database and 11g Forms will run out of support soon in my opinion Oracle has immediately to provide a working 64bit TranslationHub for 12c Database and Forms as long you has no replacement for this tool.

    What do you think?

    Update: See the according discussion on the forms forum.

    , , , , , , ,

    Leave a comment

    #Javaland 2016 conference day 2

     

    This was my second day:

    Michael Tamm (optivo GmbH): Feature Toggles on Steroids

    Very good summary off all topic’s covering feature toggles. Wish I had this summary 2 years before, were we have evaluated this. Unfortunately furthermore no solutions for declarative frameworks like Oracle ADF with it’s wizards and xml configurations, which later generated code. Ironic answer to my question: “Don’t use frameworks – use Java”

    Alexander Casall (Saxonia Systems AG): User Experience for techies

    Now comes someting completely different. As least I had expected. No techniques etc.. There are really german standards “Ergonomics of human-system interaction” in ISO 9241 – 110 (Dialogue principles) and ISO 9241 – 210 (Ergonomics of human-system interaction). I have to read this, if it really would help in development, or the presenter interprets this on its own. Nice and surprising presentation.

    Adam Gowdiak (Security Explorations): Java (in)security (Keynote)

    The presenter is really angry about Oracle and co. and the security in Java. Nevertheless it seems he has specialized only on this topic and earn this money on this. So I doesn’t know, if somebody or another product is better. What about security in OpenJDK? And what are now my alternatives? A little depressing keynote.

    Lars Röwekamp (open knowledge GmbH): Courage to professionalism

    I don’t know, what I had expected here, but this was a nice surprise too. The talk was about to find a common language between customer, analyst, developer and other roles. The patterns “Rich Entities” and “Value Objects” helps to find a way out of the helper, util and manager class hell and seems to improve the readability of the code for all stakeholders. But how will this fit in declarative Frameworks like Oracle ADF and it’s generated classes? Have to think about it. Very good speaker!

    Wolfgang Weigend (Oracle Deutschland): Build and Monitor Cloud PaaS with JVM’s Nashorn JavaScripts

    Unfortunately the worst presentation comes from Oracle itself. To be fair: this presentation should be held by Bruno Borges, which was prevented to come to Javaland. Tip: Never hold a presentation, which is created by another person, if you don’t know, what he know about the subject. But I’m not sure if I had understood more, if Bruno had held the presentation. I didn’t find a red thread in the slides. And I must add, I didn’t really find an alternative presentation in this time slot.

    Alexander Heusingfeld, Tammo van Lessen (innoQ Deutschland GmbH): When Microservices Meet Real-World Projects: Lessons Learned

    Interesting presentation but the topic was missed. This had little to do with Microservice, more what a consultant or any person has to learn on his way from Junior to Senior: communicate, communicate, communicate. Especially when you want to change something.

    Stephan Kaps (Bundesversicherungsamt): Flyway vs. LiquiBase – Battle of the database migration tools

    I wanted to do this comparison several times before, but had never enough time. Now I’m relative sure that I will start with Liquibase in my next private project before I develop the application. This was the subjective winner of the battle too. I’m overwhelmed by the mass of features of both tools. Very good summary!

    Architecture Kata

    This was a nice workshop to plan the application and technical architecture of a given small set of requirements. Result for me: the many participants from a lot of other companies comes to very similar architecture depending on the assumption they made. In real life you have to communicate again and again with your stakeholders to get answered all of the questions and get quick feedback from them. I have urgently to refresh my knowledge of tools for UML diagramming and graphical presentations. And for structured proceeding maybe I should look for TOGAF training?

    Conclusion

    This was inspiring conference, which gives me a lot of fresh ideas and reminders for some spilled goals for my private and company projects. I think we’ll see us next year!

    That’s it!

    , , , , , , , , , , , , , , , ,

    Leave a comment

    #Javaland 2016 conference day 1

    This year I have decided to give the Javaland conference a try. I’m not a java professional, but in the program was listed a lot of interesting testing presentations, so my company booked for me.

    The location in Phantasierend Brühl near cologne was very fine. Unfortunately the conference rooms had not enough space this year so for some presentation you have to go to 2 rooms outside of the parc. Additionally it is not understandable, why there is not wlan for such a conference.

    This was my first day:

    Jeremias Rößler (ReTest): Behavioral Diff as new test paradigm

    Why I don’t record a test with all information of my page objects, eliminate all variable parts until it is stable and reproducible and define this a my basic truth. If a code change break this test I check the problems, if these were expected or not. Good idea but – how many data created this and how long does it take to compare all this with previous successful run. I hope this new startup will give us effective tools for this paradigm.

    Simon Maple (ZeroTurnaround): Is Your Profiler Speaking the Same Language as You?

    When I can trust the Profiler, what are the basics of it and how can I ensure that the right data are available for it. Which traps exist, when instrumenting for tracing and logging. Nice insights, but I’m sure I have to reread the presentation to fully understand.

    Exhibition Hall after lunch

    Played around with a Jenkins docker instance and the new Pipeline Plugin (formerly named Workflow Plugin) at the Cloudbees booth. I had a nice short talk with Bernhard Cygan about some other Jenkins topics.

    Tobias Kraft, Ralf Müller (exensio GmbH): Spock and Geb: Clear and comprehensible tests

    This is an interesting combination of frameworks for human readable behavior tests. I’m not sure if it is really enterprise ready (do you use version 0.x?). Will this work with Oracle ADF development too? Have to check this as next opportunity.

    Sven Ruppert (Macros Reply): Practical mutation testing

    This seems to be the long searched key to find the right tests on the corner cases of our applications. I have mandatory to prove the mentioned PIT framework Very charismatic and tough presenter.

    Roel Spilker (TOPdesk), Reinier Zwitserloot (medipc.nl): Lombok: The Boilerplate Buster. It’s a Kind of Magic!

    Is this the way to hide generated and framework required code, like standard getters and setters, from the really interesting code, which implements my requirements? It is implemented as a java compiler plugin. Have to check immediately, if this will work with Oracle JDeveloper too. In Eclipse the structure shows the code of generated class, which contains the generated boilerplates via the lombok framework annotations. And what changes are required to fulfill now my static code analysis rules which work on the source code. Additional this was a very entertaining presentation.

    Bert Jan Schrijver (JPoint): Continuous Performance: Automated Load Testing with Gatling

    As our PoC of JMeter was not really satisfying especially for maintenance of test cases and the load testing should not cost anything at least at the moment, we should definitely this opensource tool a try. Especially the combination of the recorder and the presenter converter scripts to java looks promising. Maybe we could reuse the page object locators from our Selenium tests?

    Hubert Klein Ikkink (JDriven): Writing Documentation with Asciidoctor Is Awesome

    Focus on content instead of formatting in your documentation! With this tool it seem to be possible to really versioning and therefore to diff your documentation between commits. And still you can generate via templates modern output formats e.g. like HTML 5 or PDF. With a clever combination of features you can annotate your code with markers, to reuse this actual code between this markers in your documentation. And via ASCII art you can generate simple diagrams too. I will absolutely try this on my private projects soon.

    Community Hall – Meet the libs

    The motto was: show me your favorite opensource lib and I show your mine:

    Sven Ruppert again – Proxybuilder: Change the behavior of deep code for different purposes of CDI eg. Metrics, Logging or testing. Maybe interesting for my future tests.
    Roland Huß – Jolokia: JMX Bean access via JSON over HTTP, interesting but don’t know if I ever need this
    ? – Asciidoctor again: Jump additional over some of tool integrations
    ? – Keycloak: If I ever need a SSO or IDM solution for my private projects this will the first citizen in my tool chain.
    ? – Wildfly swarm: Interesting but actually I did not touch JBoss or Wildfly in my projects.

    Dinner

    Generally very good food, I had not expected this here. At dinner I meet at my desk with some staff of canoo, which set up the voting machines at Javaland too. Nice and diverting talk, thank you guys!

    That’s it!

    , , , , , , , , , , , , ,

    Leave a comment

    “Bob the Builder: Build/Deploy of #ADF enterprise applications” – I’m a speaker at #DOAG2015:

    csm_2015-Konferenz-Ausstellung-Logo_02_373181671d

    Today my presentation is confirmed:  “Bob the Builder: Build/Deploy of ADF enterprise applications”.

    I will speak over our experiences with following

    • build tools
    • deployment tools
    • architecture
    • versioning & branching
    • continuous integration
    • hot deployment in development
    • compile & runtime dependencies

    If you speak german and you are interested in some of this, you should come and attend DOAG 2015.

    , , , , , , , , , ,

    Leave a comment

    %d bloggers like this: