Using jjs to confirm issue with DatatypeConverter in WebSphere Liberty

I kept running into a funky ‘java.lang.NullPointerException’ with the WebSphere Liberty included DataValidator. To debug the issue, I used the jjs – nashorn engine

If you need, to figure out where the class is located

try {
Class c = Class.forName("javax.xml.bind.DatatypeConverter");
System.out.println("Location " + c.getProtectionDomain().getCodeSource().getLocation());
} catch (ClassNotFoundException e1) {
TODO Auto-generated catch block

You’ll get output like this:

Location /opt/ibm/wlp/dev/api/spec/

Then you can look at the default JDK – Java SDK – 1.8

jjs> javax.xml.bind.DatatypeConverter.printHexBinary("get".getBytes())

Then you can look at the specific jar with jdk Java SDK – 1.8 + Liberty Jaxb

/opt/ibm/ibm-java-sdk-8.0-4.5/jre/bin/jjs --dump-on-error -classpath "/opt/ibm/wlp/dev/api/spec/" 
jjs> javax.xml.bind.DatatypeConverter.printHexBinary("get".getBytes())

From this, I determined that I needed to update in “”

Formatting JSON with VIM

I am working on an analytics project where we generate very complicated medical analysis and put it in a hierarchical data model.

{ "test" : { "test1" : "val1" } }

Open the JSON in vim and use python -m json.tool

:%!python -m json.tool


    "test": {
        "test1": "val1"

References (jq is another option, but… not always available on every system, python tends to work everywhere).

Mastering Yast2 Firstboot

Firstboot on Yast2, wow… it’s a powerful paradigm for those that are going redistribute *SuSE based images.

The YaST firstboot utility is a special kind of configuration workflow that can be run after the basic system is installed. It is started on the first boot of the system and guides a user through a series of steps that allow for easier configuration of their desktops.


To get started with YaST Firstboot and generate your first addition to the workflow, you can do the following.

Type zypper install yast2-firstboot

To confirm, type Y

Setup the license and welcome directories

Type mkdir /etc/firstboot

Type mkdir /etc/firstboot/welcome

Type mkdir /etc/firstboot/license

Type chmod -R 755 /etc/firstboot

Edit /etc/sysconfig/firstboot

Change FIRSTBOOT_LICENSE_DIR=”” to FIRSTBOOT_LICENSE_DIR=”/etc/firstboot/license”

Change FIRSTBOOT_WELCOME_DIR=”” to FIRSTBOOT_WELCOME_DIR=”/etc/firstboot/welcome”

*** You can launch yast2.  You can click on System > /etc/sysconfig > Firstboot.

Upload your Welcome Message file and your license files to the corresponding directories

Modify the Workflow

Edit /etc/YaST2/firstboot.xml

I like to comment out the ac_step with printers.

<ac_items config:type=”list”>

I then change the license agreements

<label>License Agreements</label>
<enabled config:type=”boolean”>false</enabled>

I enable the license view for Novell/SuSE
<label>License Agreement</label>
<enabled config:type=”boolean”>true</enabled>

I then enable the License file for the custom image
<label>License Agreement</label>
<enabled config:type=”boolean”>true</enabled>

I then edit the Networking proposal, so I can set custom networking details.

<enabled config:type=”boolean”>true</enabled>

I then add a custom network proposal, the label is what appears on the left during the FirstBoot wizard

<enabled config:type=”boolean”>true</enabled>

Creating the QuickStart Proposal

For our purposes, you’ll create a shell for your QuickStart proposal.

Mount your OpenSuSE DVD

Type zypper install yast2-devtools yast2-testsuite

Confirm the installation, type Y

Change to home folder, cd ~

Type /usr/bin/y2tool create-new-package config quickstart “Paul Bastide” “”


The create package command has created a YCP language project, it’s pretty straightforward to read through the files in the quickstart folder

Change directory into quickstart

Build and deploy the quickstart proposal,  make -f Makefile.cvs && make && make install

You’ll want to run through the log output and validate it is compiled and installed

you can launch it using yast2 quickstart (note, you can get a Graphical output if you have a Windowing environment, eg export DISPLAY=:0.0 )


To trigger firstboot on next restart, type touch /var/lib/YaST2/reconfig_system

Once, the reboot and the corresponding workflow has been completed the file will be removed.

Reboot and Test

When you are all done, you can page through your wizard and validate it’s operation.




To wrap it all up, you package the image, and ship it.  Note, you can also refer to the control.xml for more more details on the final message / finish  message.

Good Luck and I hope this helps with your wizard.

Debugging YaST2 FirstBoot

I ran into a few issues with the workflow that spanned beyond the obvious, double wizard prompts, so I needed to add debugging.

Edit /boot/grub/menu.lst

Add Y2DEBUG=1 to the end of the kernel line

Save the file

type touch /var/lib/YaST2/reconfig_system

Restart the Server

Run through your FirstBoot workflow

Navigate to /var/log/YaST2/

Open y2log

Review the log file for any errors or issues in your workflow


Issues I ran into included double prompting of the configuration wizard, I found that running through the wizard a second time after reconfig_system fixed the issue.

Activating a Script on Network Change

I needed to figure out how to launch a script to find the ip when the network was started and up on SuSE Linux. After doing some research I found out that you can add scripts to the ifup.d and ifdown.d folders.

I created a file a script

cd /etc/sysconfig/networking/scripts 
touch ifup.quickstart
vim ifup.quickstart 
# contents are below

Then I went ahead and added a symoblic link to /etc/sysconfig/networking/ifup.d

cd /etc/sysconfig/networking/ifup.d
ln -s /etc/sysconfig/networking/scripts/ifup.quickstart quickstart

Every time the interface is started up, it checks to see if the ip changed for the given hostname, and makes the modifications automatically.

This file is here is the one I created to do the edits to the hosts file.