Merge Oracle same Table

If you  need to merge data from same table, following is the command:

This command checks if USER_ID and USER_NAME are matched, if not matched then it will insert

    ON ( d.USER_ID = '123' AND d.USER_NAME= 'blabla') 
        VALUES ('123','blabla');

"dumpTreshold" -- Message has been truncated *weblogic*

If you are facing the following message during SOAP request/response, the you need to add the dumpTreshold value

Console Message:

Message has been truncated
use property to increase the amount of printed part of the message


Add the following parameters to your setDomainEnv.cmd if using windows or in linux.

# JDK 7
# JDK 8

SSLHandshakeException SunCertPathBuilderException:unable to find valid certification path to requested target

Following error might occur when trying to make an SAP request or when SSL is not configured:

Error:ClientTransportException: HTTP transport error: PKIX path building failed:
unable to find valid certification path to requested target; HTTP transport error: PKIX path building failed: unable to find valid certification path to requested target>


·         Look in the logs to get the URL of client. Mostly, it will be
Open Internet Explorer in Admin mode, enter the url.
- Click on the HTTPS certificate chain (there is lock icon in the Internet Explorer), click on the lock to view the certificate.
- Go to “Details” of the certificate and “Copy to file”. Copy it in Base64 (.cer) format and save it on your Desktop.
- Install the certificate.
·        - Open Command prompt in Administration mode
·        - GoTo jdk\jre\bin
               - D:\Programs\JDev\12_2_1_10\JDEV_USER_HOME\oracle_common\jdk\jre\bin
               - keytool -list -keystore               D:\Programs\JDev\12_2_1_10\JDEV_USER_HOME\oracle_common\jdk\jre\lib\security\cacerts
               - If prompted for password, enter “changeit
               -It gives the list of the current certificates contained within the keystore. 
·         Now we have to include the previously installed certificate into the cacerts.
·         For Java 7+, following is the command to include our certificate into the cacerts:
keytool –importcert –trustcacerts –alias ALIASNAME -file PATH_TO_FILENAME_OF_THE_INSTALLED_CERTIFICATE -keystore PATH_TO_CACERTS_FILE -storepass changeit

After substituting the paths, the command should be something like this:

keytool –importcert –trustcacerts –alias ALIASNAME -file C:\Users\itszaif\Desktop\MyCer.cer -keystore D:\Programs\JDev\12_2_1_10\JDEV_USER_HOME\oracle_common\jdk\jre\lib\security -storepass changeit

·         It will then add the certificate information into the cacerts file.

QEMU Emulator for BitBake Gumstix

To test Linux Image builds without flashing every time on the Gumstix board,
emulator needs to be set up. 

The bash script provided by Gumstix
has to be modified such that the extensions of u-boot, uImage and Root File
System(rootfs) are to represented same as the Yocto build system provides. 

QEMU command as follows:

$ qemu-system-arm -M overo -m 256 -sd ./test.img -clock unix -serial stdio -usb -device usb-host,hostbus=2,hostaddr=1

Gumstix Overo WiFi unstable

The reason for wifi drop is the Network manager. By disabling it we can run ifconfigiwconfigwithout any interference from the NetworkManager.
or Another workaround is this which is quite successful:
After creating SD card with proper Image on, do not unmount the partitions.
Install a Custom systemd Service
To bring up the wireless interface on boot, you will need to create and install a custom systemd service on the microSD card.
  • In the rootfs partition, create a new service script:
    $sudoedit /media/rootfs/etc/systemd/system/network-wireless@.service
  • Copy and paste the following into the file:
    Description=Wireless network connectivity (%i)


    ExecStart=/sbin/ifconfig %i up
    ExecStart=/usr/sbin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant.conf
    ExecStart=/sbin/dhclient %i

    ExecStop=/sbin/ifconfig %i down


Save this file.
  • Because we are editing these files on a development machine, the normal systemd method of enabling services (systemctl) will not work. To enable our new service:
    ~ Change into the directory on the root filesystem:
    $cd /media/rootfs/etc/systemd/system/
    ~ Create a symbolic link to enable the service:
    Overo Series COMs
    $sudo ln -s ../network-wireless@.service network-wireless@wlan0.service
Finally, edit the wpa_supplicant configuration file:
$sudoedit /media/rootfs/etc/wpa_supplicant.conf
Change it to look like the following:
    ssid="Your Network's SSID"
    psk="Your WPA2 Passkey"
Save the file.
Unmount the partitions on the microSD card.
SSH Into Your System
1) If you don't know the ip $ssh root@overo.local
2) If you know the IP address $ssh root@192.xx.xx.xx.local

CMake with BitBake recipe

When writing BitBake recipes that use CMake build system, you need to inherit CMake package config or else BitBake simply downloads the src and CMakeLists.txt file and does not compile.

Following is a simple recipe to capture some images from camera.

 BitBake CMake recipe:

DESCRIPTION = "cameracapture application" 
SECTION = "examples" 
PR = "r0" 

DEPENDS = "opencv"

SRC_URI = "git://;protocol=https;tag=v0.1"

S = "${WORKDIR}/git"

inherit pkgconfig cmake

do_install() {
    install -d ${D}${bindir}
    install -m 0755 cameracapture ${D}${bindir}
If you didn't add  do_install Yocto downloads the recipe but does not include it Image.

CMakeLists.txt file:
cmake_minimum_required(VERSION 2.8)
find_package( OpenCV REQUIRED )
add_executable( cameracapture cameracapture.cpp )
target_link_libraries( cameracapture ${OpenCV_LIBS} )

AprilTags recipe with Bitbake Yocto

What are AprilTags?

AprilTags are 2D barcodes developed for robotics applications by Ed Olson. The library detects any April tags in a given image, provides the unique ID of the tag as well as its location in the image. If the camera is calibrated and the physical size of the tag known, also provides the relative transform between tag and camera.¹

AprilTags bitbake  

AprilTags has bad dependencies that are according to PC in AprilTags/cmake/pods.cmake such as Eigen3(default), whereas for OE eigen3 package is libeigen. Hard coded the requires, Libs and Cflags and also removed python pod packages which are not required.

$ "Name: ${pc_name}\n"
        "Description: ${pc_description}\n"
        "Requires: ${libeigen}\n"
 #      "Version: ${pc_version}\n"
        "Libs: -L\${bindir} ${pc_libs}\n"
        "Cflags: -I\${bindir} ${pc_cflags}\n")
AprilTags bitbake recipe:
[I am not sure about what the license field should be, so just wrote closed.]  
$ DESCRIPTION = "Apriltags application" 
SECTION = "examples" 
PR = "r5" 

DEPENDS = "opencv"

SRC_URI = "git://;protocol=https;tag=v0.3"

S = "${WORKDIR}/git"

inherit pkgconfig autotools

do_install() {
    install -d ${D}${bindir}
    install -m 0755 ${WORKDIR}/git/build/bin/apriltags_demo ${D}${bindir}

Yocto Project environment for Gumstix development

To create a custom Linux distribution for Embedded systems independent of architecture, including Gumstix-based systems, follow instructions given here:

1. Install Repo:
Repo is a tool that Google built on top of Git to manage many Git repositories. If you are curious more to know about repo follow this Link

Download the Repo script:

$ curl > repo
In order to have correct permissions, we need to make it executable:
$ chmod a+x repo
Move it on to your system path:
$ sudo mv repo /usr/local/bin/
Check whether repo is correctly installed. You can do it by the following command which gives you  a Usage message when invoked with the help flag.
$ repo --help
2. Initialize a Repo client.
Create an empty directory to hold your working files:
$ mkdir yocto
$ cd yocto
Tell Repo where to find the manifest:
$ repo init -u git:// 
A successful initialization will end with a message stating that Repo is initialized in your working directory. Your directory should now contain a .repo directory. This .repo is hidden file. You can check it by ctrl+h command in that directory
To get the known stable version:
$ repo init -u git:// -b master
$ repo sync
3. Fetch all the repositories:
$ repo sync
Sync command download the whole Yocto to your local disk. This might take some time depending on your Internet connection.
4. Initialize the Yocto Project Build Environment.
$ TEMPLATECONF=meta-gumstix-extras/conf source ./poky/oe-init-build-env
This copies default configuration information into the poky/build/conf directory and sets up some environment variables for the build system. According to Official source, this configuration directory is not under revision control; you may wish to edit these configuration files for your specific setup but I would not recommend to change Environmental variables unless you know what you are doing. In particular, change the MACHINE variable if you are not building for the Overo (default).
5. Build an image:
This process downloads several gigabytes of source code and then proceeds to do an awful lot of compilation so make sure you have plenty of space (25GB minimum), and expect a day or so of build time depending on your network connection. Don't worry---it is just the first build that takes a while.
$ bitbake gumstix-console-image

If everything goes well, you should have a compressed root file system(tar.bz2) tarball as well as kernel and bootloader binaries available in your  ~/yocto/build/tmp/deploy/images directory.
What if something is broke?
There are several degrees of starting fresh: individual packages can be rebuilt or the whole system can be reconstructed.
  1. clean a package: bitbake -c cleansstate
  2. re-download package: bitbake -c cleanall
  3. destroy everything but downloads: rm -rf build (or whereever your sstate and work directories are)
  4. destroy it all (not recommended): rm -rf build && rm -rf sources
 If you want to build a new image, you can check in ~/poky/meta-gumstix-extras/recipes-images/gumstix directory for other Image options.

Source: Gumstix-YoctoProject-Repo

Getting started with Yocto Project

What is Yocto Project?

The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture.

Check this video to get a fast understanding of what Yocto project is all about:

It was founded in 2010 as a collaboration among many hardware manufacturers, open-source operating systems vendors, and electronics companies to bring some order to the chaos of embedded Linux development.

What are the advantages of using Yocto Project?

It's a complete embedded Linux development environment with tools, metadata, and documentation - everything you need. There are many free free tools easy to get started with, powerful to work with (including emulation environments, debuggers, an Application Toolkit Generator, etc.). You are not required to be a geek to get started with Yocto, just a guys who knows how to use a Computer and that's it. You can use HOB .

What is Bitbake:

Bitbake is a tool to compile, configure, install and build packages and distributions. BitBake recipes specify how a particular package is built. It includes all the package dependencies, source code locations, configuration, compilation, build, install and remove instructions.

For more information you can read about:
Yocto Project Manual
Yocto Project Development Manual

Happy building!!