Tuesday, May 5, 2015

Einstellen des Logginglevel der Starface UCI API

Die Entwicklung unseres Notes basierenden CTI Client für die Starface Telefonanlage befindet sich kurz vor der Fertigstellung. Bisher war es sehr angenehm, dass die Starface API alle Debugmeldungen auf die Standard Ausgabe geleitet hat. Diese Infos sind während der Entwicklung sehr informativ, da sie praktisch die gesamte Kommunikation des Clients mit der Telefonanlage beinhalten. Im Echtbetrieb ist es aber natürlich ein Ärgernis, wenn das gesamte Client log mit Meldungen der Starface API überflutet wird.

Leider habe ich in der Starface API Beschreibung keine Hinweise gefunden, wie man den Logging Level einstellen kann. Nach einiger Analyse des Codes der Starface API habe ich aber eine sehr einfache Methode gefunden den Logging Level auf ein vernüftiges Maß zu drosseln. Um diese Methode in seinem Code zu verwenden, muss sich das Log4j-1.2.16.jar, dass die Starface API mitbringt im Build Path eingetragen sein.

// Starface UCI API auf Level Info setzten. Keine Debug Infos werden
// mehr angezeigt
LogManager.getLogger("de").setLevel(Level.INFO);

Tuesday, April 28, 2015

IBM has announced IBM i 7.1 TR10 and 7.2 TR2 today.

Today IBM has announced the newest update for IBM i V7R1 and V7R2. This updates add many new features to IBM i and the DB/2 database. You can find details about the update in the announcement letter or in the IBM Technology Update Wiki:

IBM i 7.1 Technology Refresh 10

IBM i 7.2 Technology Refresh 2

I really recommend to install this updates when it will be available on 29. May 2015

Saturday, April 18, 2015

Remote Debug an IBM Notes client from Eclipse

Normally the easiest way to debug Notes plugins is to start the Notes client directly from eclipse. I have explained how to do this in my tutorial: "Configure Eclipse 4.3 to develop plugins for Notes Part 1 and Part2". But sometimes problems are specific to a special client environment or user configuration and can not be debugged in a test environment. Yesterday i had such a problem with a feature which works great, when i launched the client from eclipse, but fails when i start the client like a user will do.

Fortunately the JVM of the Notes client has a built in remote debugging facility. It can be activated with some small modifications in the JVM.properties configuration file:

Locate the JVM.properties of the Notes client installation you want to debug. You can find it in the  "..\framework\rcp\deploy" directory in your IBM Notes program path.


Friday, April 17, 2015

How to tell Notes that it should roam the preferences of your own plugins too.

One of the best things about Notes is that it can synchronize your settings on different devices. So you have for example the same settings on your Desktop and on your Laptop. This feature is called roaming. This works really great for all IBM provided Features, but when you have deployed your own or third party eclipse features to your Notes client the settings of them will not roam to your other clients as the IBM Features do. This is very annoying for your users. So i have analyzed the whole roaming process in the client and discovered, that IBM has already implemented an mechanism to activate the roaming feature for 3rd Party Plugins. I have not found any documentation for this on the internet, but it works without any problems.

So let's have a look how the roaming of Preferences in the Notes Standard client works. If roaming is enabled for your user you will have a "roamingdata.nsf" on your client and on the server. In this database there is one document for every plugin which contains the preferences. On the client start this database is replicated with the server and then the settings in your notes data/workspace folder gets updated with the settings in the documents in "roamingdata.nsf". When you end the client every setting you have changed will be updated in the corresponding document in "roamingdata.nsf" and all changed documents will be replicated to the server.

Follow this easy steps to enable the roaming of the settings for your own plugins:

The first step is to retrieve the existing configuration file for the roaming service from the "com.ibm.notes.roaming.provider" plugin. To do this copy the plugin from the "C:\Program Files (x86)\IBM\Lotus\Notes\framework\shared\eclipse\plugins" to your desktop and change the extension of the plugin from ".jar" to ".zip" Then open this archive file and extract the roamingconfiguration.xml file in the configuration folder to a local folder. This file contains the complete configuration of the roaming service


Saturday, March 28, 2015

There are still marketing videos from IBM that I like.



After the absolute bad marketing video about verse i have found this nice video about one of the best sources of IT knowledge regarding IBM products. The IBM Redbooks.


Unfortunatly there have been no new real Redbooks for IBM Collaboration products since the introduction of the not so good IBM Red Wikis. I hope they will go back to the normal redbooks format in the future.

Sunday, March 22, 2015

In Java 0 is not always equal to 0

I am a big fan, of the Java BigDecimal class for arithmetic operations. It provides fast and easy to use methods to do calculations in arbitrary precision. But last week i have got a bug report that in one of my programs a check whether a BigDecimal variable is 0 returns a wrong result. Here is the code:


if(value.equals(BigDecimal.ZERO))
 System.out.println("Value is zero");
else
 System.out.println("Value is not zero");


The check for a zero value has always worked, but suddenly last week it stopped working and after some investigation i have found out, that it stops working, because the scale of the value has changed from zero, to two. When you have a look in the java doc of the equals method you see, that this works as designed.

This method considers two BigDecimal objects equal only if they are equal in value and scale (thus 2.0 is not equal to 2.00 when compared by this method.

As a workaround for this problem you can replace all your equals method to compareTo which only compares the value and not the scale of the BigDecimal object. 

if(value.compareTo(BigDecimal.ZERO)==0)
 System.out.println("Value is zero");
else
 System.out.println("Value is not zero");

Tuesday, March 10, 2015

Software problem data for QTETHRD has been logged during debug session in RDI

A RPG developer in our company had problems to debug an interactive RPG program. He wants to hold the program with the hold button while the program is waiting on user input, but it does not work and after some time the debugger in RDI (Rational Developer for IBM i) stops and the program on the IBM i runs without stopping at breakpoints.

The QSYSOPR message queue shows an error message CPI93B9 "Software problem data for QTETHRD has been logged. Refer to help text for additional information." at the same time the debugger in RDI crashes. In the corresponding problem entry there is a Symptom string "5770 SP/QTETHRD MOD/QteRetriev MSGMCH1004RC117" logged. We could not find any helpful information in the joblogs or in the QHST log.

After some investigation we found out, that the root cause of this problem is that the developer had not the special authority "*JOBCTL" After adding this special authority to the userprofile with "CHGUSRPRF USRPRF(USERNAME) SPCAUT(*JOBCTL)" our RPG developer is a happy camper again.

Wednesday, March 4, 2015

Replication in Notes fails with error file does not exist

Last week i had the problem that a user who got a new replica of his mail file does not get new mails again. Every time he start the replication of his mail file he got the error "File does not exist" in the replicator tab.  The replication log shows that the replica is sending data to the server, but does not get any data from the server.

Replication never recieved file does not exist


ad