Sunday, November 22, 2015

NetBeans and DB2 again

So for various reasons (mainly the 64bit v 32bit problem with the native driver) I changed my DB2 JDBC driver to type 4, i.e. the Universal driver.
However, when I connect from NetBeans with an URL like jdbc:db2://localhost:50000/sample the schema would stay empty.
Nothing. Zip. Zilch. Zero.
Quite some googling and debugging - mainly with a little java program like this:

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

public class MainDB2 {
    private static final String URL = "jdbc:db2://localhost:50000/SAMPLE";
    private static final String USER = "roman";
    private static final String PASSWORD = "max11";
    private static final String SCHEMA = "roman";
  public static void main(String[] args) throws Exception {
        Connection conn = DriverManager.getConnection(URL, USER, PASSWORD);
        try {
            DatabaseMetaData dmd = conn.getMetaData();
            ResultSet rs = dmd.getTables(null, SCHEMA, "%", new String[] { "TABLE" });
            try {
                while ( {
                    int count = rs.getMetaData().getColumnCount();
                    System.out.println("Column count: " + count);
                    int i;
                    for (i = 1; i <= count; i++) {
                        try {
                        } catch (SQLException e) {
                            System.err.println("Exception reading column " + i);
            } finally {
        } finally {

I was able to trace it back to an SQLCODE -443SQL0443N with diagnostic text "SYSIBM:CLI:-805". SQLSTATE=38553. Google this and you will get to here and learn that - again - a package was not bound, this time the db2schema.bnd file. Bind it as suggested in the article with the usual db2 bind db2schema.bnd blocking all grant public

and voila, NetBeans will find the schema.

Gets me every second year, it seams.

Friday, September 25, 2015

The iOS9 Podcast app is totally broken

Usually I hate and hence avoid to slam an app or service like this, but the podcast player in iOS9 really sucks. At least for video on an iPad.

No full screen video anymore, too much white space, and even with all that unused space, the controls are too small

Exhibit A:

Please Apple, we need an urgent update to fix/revert this.

Sunday, September 13, 2015

How to hide a userid from Windows login screen

With DB2 on my home PC[1] I have a service account for the DB2 instance, makes life a lot easier than trying to map it to you actual user(s).

However, regular Windows (Home) setup has 2 defaults that are annoying:
a. password and account expiry for this user.
b. the userid appears on the Windows login/lock screen, although nobody is supposed to sign in with it.

Create a maintenance free user
The first issue I fixed a couple of month ago, because that was really annoying. Because DB2 just would not start. And the first two times this happened I had to work through db2diag.log to find out what happened.
So, make sure the account actually never expires (that's separate from the password). With admin privileges run
  net user db2admin [2]
to check if the user account expires.
If it does, then run a
  net user db2admin /expires:never
to fix this.

The password expiration is trickier, since it cannot be done with the net user command.
To make the password everlasting, run
  WMIC USERACCOUNT WHERE "Name='db2admin'" SET PasswordExpires=FALSE

I found this thanks to the folks at StackExchange.

Hide the service account from the login screen
I wanted to do this on Windows 7 already, but never found the time or cared enough. Now with the move to Window 10 I thought of it again and fixed it.
So this can be done with group policies and stuff, but not on a standalone Windows Home edition.

Registry and Microsoft Technet to the rescue:

Create an entry under
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList and list the db2admin user with a dword (32) of 0 to hide it. Remove the entry or set it to 1 to show the user again.


[1] Ha, now that I no longer work for Oracle, I can again freely admit it... Not that I really held back on this in the past 5 years.
[2] replace db2admin with the userid you need this for

Saturday, September 12, 2015

Windows 10 installed

While I finally made it to a Mac (MacBook Air 13) at work, I gave in and let Microsoft install Windows 10 over my Windows 7 on my home PC.

It went surprisingly smooth and without any problems.
Except that my Tomcat did successfully start under Window 10, because for some weird reasons Redmond decided to install and activate the Internet Information Services (which I previously did not have), and those blocked port 80 of course.
Simple de-install of those features, reboot and everything was running fine again. All apps and services I had running (or those I could think of within 30minutes) are running fine again.
Amazingly even my DB2 instance did not create any problems at all.

Now I only have to get used to the new UI, but even that seems easier than I thought.... well, as long as I have the keyboard.

Sunday, August 23, 2015

WiFi + Train + Google Location = weird

For some while now, the Austrian Railways (OeBB) offer free Wifi at least on their premium trains ("railjet"). The trains are good and fast, the Wifi (most of the time, at least in Austria) is good, but it confuses the heck out of the Google/Android location services.
The trains operate all the routes from Zürich to Vienna, from Munich to Budapest, from Graz to Prague, etc etc.

And it seems that Google (and Apple as well) associate various geo coordinates to those access points, On my route from Vienna to Salzburg, both my iPad and my Nexus 5 "re-located" me to Graz, Linz and Prague, while I actually was just around Salzburg.

(For the convenience of readers outside Central Europe I include the map as a reference for the screw-up)

There must be some way to report those access points to Google so they exclude them from location services. The concept of mobile hotspots/access points should be too common.

Any idea anyone where I can report this ?

Thursday, July 23, 2015

Vertical Video - revisited

Can I just say TOLD YA.
Here to be precise.

YouTube for Android will play vertical videos in full screen

As much as we all might want to stop people from recording vertical videos, the Periscopes and Snapchats of this world have made these clips so prevalent that, sadly, they're just not going to go away. Giving in to the inevitable, YouTube's Android App is getting the ability to play vertical videos in full screen, ...

Wednesday, July 22, 2015

Publishing in the 21st Century

I always found that one of the core features or tasks of a publisher it to spend money made with best-selling artists on the newcomers. This applies both to publishers of music (a.k.a. labels) and literature.
Call it a cross-subsidy (and yell fire if you are too neo-liberal for this).

Over the last decades it appears that this is no longer the case.  
It seems that corporate financial controlling measures are being applied to each author or book of its own (or artist/album), and if it can not turn a profit, it will not be published. Profits from say Harry Potter [1] stay with the Harry Potter team and division and are not invested to find the next promising author.
That's because everyone hates cross-subsidies. Even within one company.

I especially find this is the case in music:
Take the recent rant of Taylor Swift against Apple. She complained (whether rightfully or not) about the fact Apple will not pay the artists during the 3 months trial period, because they, Apple, themselves don't receive any money.[2] Let's for a second ignore whether this is fair or not, let's turn to a separate aspect:

Taylor Swift claimed in her open letter to Apple that she's is not complaining for herself (as she gets enough money) but for the young / indie artists:
This is not about me. Thankfully I am on my fifth album and can support myself, my band, crew, and entire management team by playing live shows. This is about the new artist or band that has just released their first single and will not be paid for its success. ...
So is she asking Apple to take on the role of a publisher? She is asking them to help (i.e. finance) the young artists. Shouldn't the labels be doing this with the revenues they already make?
Interestingly she does not mention that this could be done out of the revenue streams from her music, only from the young artists themselves. That's odd.

So this is only a little less greedy than actually asking for herself - as she claims this is not doing.
Not so philanthropic after all.

Where are the publishers or labels in all of this? By taking themselves totally out of this equation, they will get by-passed in the future. Why would anyone need a publisher, when they don't even fulfill one of their core tasks? What's the value of a label/publisher to a young artist?

Instead of greedily clinging to their old business model, which is falling apart, they should think of creating new and relevant offerings to their customers, i.e. the artists.

[1] I admit I have done the research on this author/book/publisher, I just use it as an example. Correct me in the comments if I'm wrong.
[2] Apple of course changed this after her open letter.