jump to article
...intermittent thoughts
AdministrationBlogSphereDominoBlogProgrammingXPages

Transforming LSI_info() to GetThreadInfo()

The undocumented function call LSI_Info() is suspected to cause trouble (read, crashes) on various occasions in Notes and Domino. So while using an undocumented function is not recommendable at all, this one seems to be a real cause of pain in many cases. We have seen servers that had LotusScript code using LSI_info() calls in them crashing mystically. So we have started to iron out calls to LSI_Info() as a step in stabilizing these servers, even though we have rarely made use of this function anyway. And it proofed to be helpful.

As the information that is retrieved by LSI_Info is extremely helpful in many occasions, simply removing those calls is not the best solution. Instead, replacing calls to LSI_Info() by appropriate other calls is much better. Most of the information provided by LSI_Info() can also be retrieved by its adult sister GetThreadInfo() which is not only documented but also supported. As for the other information that is not retrievable by GetThreadInfo(), I have no idea how to retrieve it other than by using LSI_Info() - but I would personally prefer a stable server and not to have that information as a server that is instable and maybe shows me some more information on rare scenarios.

For all the Information that is retrievable, simply replacing the keyword "LSI_Info" by "GetThreadInfo" is not applicable as both functions take different values to retrieve the same information. As a note to myself and to others who are attempting to do modify their code I have put together a parameter mapping of both calls. The parameters for LSI_Info() are taken from Johan Känngård, those for GetThreadInfo() come from Lotus/IBM:

LSI_Info()GetThreadInfo()
Current line number (in the LS source)Lsi_Info(1)GetThreadInfo(0) or GetThreadInfo(LSI_THREAD_LINE)
Name of current procedure (i.e. function, sub or property)Lsi_Info(2)GetThreadInfo(1) or GetThreadInfo(LSI_THREAD_PROC)
Name of current module (i.e. ScriptLibrary name)Lsi_Info(3)GetThreadInfo(2) or GetThreadInfo(LSI_THREAD_MODULE)
LotusScript version numberLsi_Info(6)GetThreadInfo(3) or GetThreadInfo(LSI_THREAD_VERSION)
(Human) language setting (e.g. 'en' for english)Lsi_Info(9)GetThreadInfo(4) or GetThreadInfo(LSI_THREAD_LANGUAGE)
Country or region settingn/aGetThreadInfo(5) or GetThreadInfo(LSI_THREAD_COUNTRY)
Current clock ticksn/aGetThreadInfo(6) or GetThreadInfo(LSI_THREAD_TICKS)
Clock ticks per second (supported only on platforms that support parallel processing primitives)n/aGetThreadInfo(7) or GetThreadInfo(LSI_THREAD_TICKS_PER_SEC)
Current process ID (supported only on platforms that support parallel processing primitives)n/aGetThreadInfo(8) or GetThreadInfo(LSI_THREAD_PROCESS_ID)
Current task ID (supported only on platforms that support parallel processing primitives)n/aGetThreadInfo(9) or GetThreadInfo(LSI_THREAD_TASK_ID)
name of the procedure that called this one (i.e. the caller)Lsi_Info(12)GetThreadInfo(10) or GetThreadInfo(LSI_THREAD_CALLPROC)
name of the calling modulen/aGetThreadInfo(11) or GetThreadInfo(LSI_THREAD_CALLMODULE)
LotusScript Memory AllocatedLsi_Info(50)n/a
LotusScript Memory Allocated from OSLsi_Info(51)a/a
LotusScript Blocks UsedLsi_Info(52)n/a

Hope this helps not only me but others as well.

XPages Extension Library from OpenNTF is huge

During Powersphere in Paderborn yesterday, I had the opportunity to speak with Niklas Heidloff about the just released XPages Extension Library. What I have seen so far has just blown me away and I am constantly getting new ideas of what's going to be possible with that. This stuff is awesome and beams XPages development into another dimension.
While it is not that easy to install the Extension Library, it is well documented on how to do that - I am still at the beginning of the >70 pages documentation. After the install, using the Extensions works like a charm. Very interesting to me is the use of the XPages Extensibility API and the availability of the source code - that way it is a perfect tutorial on how to use the API for your own extensions. I spoke to several developers yesterday and all of them were excited to get their hands on it - just like me ;-) Sure, the things that are possible with the XPages Extensibility API used in the XPages Extension Library are tough if you are not a Java Geek - but its so totally worth looking into it! But even if you are not the crack that is easy with exploiting new opportunities of API based extensions, the library is so helpful by providing new elements to XPages that were previously comparably difficult to accomplish. You should definitely have a look at it. Great stuff!

AppIcon Plugin for Domino Designer 8.5.2

One of the new features available in Notes 8.5.2 are the 24Bit icons for DatabasesApplications. Having seen and played around with the new feature in the Beta stages of 8.5.2 I have to admit, I really like this feature. It makes me kind of more productive in a special way: it makes me feel better when seeing them and it allows me to realize some of the applications more easily on my Workspace an the Tabs than the old 16 color icons:



There were a few things I personally missed with the new feature but that I also see not as being necessarily implemented into core Domino Designer by default. So I thought I just extend Domino Designer with a small plugin that provides this functionality:
  • As the new 24 Bit Application Icon is really an Image Resource under the hood, one could easily export it to disk, if he was given the opportunity by Designer. As exporting such is not Designers purpose, this is a feature that can be added by the AppIcon Plugin
  • Did you know, your Application Icons are easily available from any web browser? Yes, they are: one could use the ?OpenIcon URL command to get a perfectly rendered version of the Classic Application Icon and <database.nsf>/$DbIcon?open for the new 24 Bit Application Icon. Not everyone likes this to be exposed to anyone who has HTTP Access to a server. Well, the new Application Icon could be hidden from Web as it is actually a special kind of an Image Resource. But as it is a special Image Resyource that is not so easy: it is hidden from the NSFs Image Resources listing and so you don't have a chance to see it anywhere in the database design. Normally a very good idea but not for this particular use case. AppIcon thus allows you to hide and unhide the new 24 Bit Application Icon from Web access with an easy click. But of course there are more general methods like using SecureDomino (a short hand setting is available in the current release) to generally block all requests of such a kind to all databases on a sever - but sometimes you can't be sure SecureDomino is installed on the server you are deploying your database to and so this granular solution might be a good solution.
  • I thought it might be a good idea to be able to export the Classic Application icon (the traditional 16 Color one). Sure, one could do so by putting the database in question to a server and use the ?OpenIcon URL command - but honestly, if that are the things I would have to do for getting hands on a file version of the traditional database icon I would be too lazy most of the times. The AppIcon Plugin allows for storing the Classic Icon in PNG format easily and directly from Domino Designer.
Sounds interesting? Well, I have good news: The AppIcon plugin is freely available. Easiest way to install is to drag the widget descriptor to your Lotus Notes "My Widgets" sidebar.

News on @WebDbName for XPages

Last week I posted some reusable, hand crafted @Function for XPages. Well there was a small mistake in it, I did not realize earlier. @WebDbName is written differently :-) So here is pretty much the same function - with correct spelling of the name:

/**
* provides functionality of the function with same name from @Formula
*
* @return the name of the current database in a websave format
* @author Michael Gollmick
* @version 1.2
* @date 20090127
*/
function @WebDbName() {
        try {
                if (typeof this.name === 'undefined') {
                        var path = database.getFilePath();
                        var re = new RegExp("\\\\", "g");
                        path = path.replace(re, "/");
                        var arr = path.split("/");
                        for (var a = 0; a < arr.length; a++) {
                                arr[a] = escape(arr[a]);
                        }
                        this.name = arr.join("/");
                }
        } catch (e) {
        }
        return this.name;
}

Besides of that correction of the spelling, I am thinking about a potential problem: what if IBM is releasing a newer version of their @Formula library containing an implementation of @WebDbName? Well, applications relying on this solution should run, since the custom function declaration should overload the initial definition - but what if such a potential native implementation works somewhat differently? That would be horrible for anyone who attempts to maintain legacy code, relying on an implementation as I just showed up above. One possible solution would be to name such functions differently. Well, that would work but would not be that easy. How to make such functions better remarkable to those who are getting used to XPages and come from an @Formula background? Daniel mentioned, to add some suffix to the function name, so that would probably be @WebDbName_MGO(). Good Idea, but I think this will look odd in the code. My current thoughts tend to rename this function to $WebDbName() and name future other implementations of known @Formulas also with a $ symbol at the beginning. They would then become the $Functions ;-)

if your Domino Designer 8.5 is not starting anymore...

... and you maybe also get "selfexplaining" error messages like this: "'Platform Command Processor' has encountered a problem."
'Platform Command Processor' has encountered a problem.
the solution is not necessarily to delete the entire workspace directory in your Notes data directory (although this is a valid and working solution). Probably it is enough to delete only one file, if you know which one and where...

At first make sure Notes is not running anymore at all. The typical suspects like KillNotes and ZapNotes may not fit your needs, try some NSD -kill and check your task list if some nsd.exe is still running. if not, assure also the task soffice.exe is not running - that's the process name of the included Symphony (which is a forge of OpenOffice formerly known as StarOffice, hence the name by the way).

If all of these processes do not run anymore, go to your notes data directory and then click down to:
<NOTESDATADIRECTORY>\workspace\.metadata\.plugins\com.ibm.rcp.personality.framework\personalityWindowState\
in that directory check for the following file:
com.ibm.designer.domino.personality.config.xml
if it exists - try renaming it or even less gentle, delete it (there should be an .bak version of it anyway) and restart Notes. DDE should now start. Well, one disadvantage: some of the settings you made to the client UI will be lost - in my case it was the window size (maximized) and the position of the panes. But I think that's way better than deleting the whole directory, loosing the vast majority of the Notes client settings, your Sametime settings, your custom plugins and all that stuff...

@WebDBName in XPages

In the last days I have worked quite a bit with Domino XPages Technology. One thing that came up was the lack of an @WebDBName function that is missing in XPages. But the solution is more than easy and requires just a few lines of code. You may want to copy that because you just don't want to code it every time. For me this is a function I have put that function into some core Serverside JavaScript-Library I include into every page and Custom control anyway, so I can use it everywhere. I took the name I expected to have which is the only critical part - if that function is included at anytime in the future, that hand crafted function may cause problems or incompatibilities, so it might be a good idea to give it another name.

/** *****************************************************************
* provides functionality of the function with same name from @Formula
*
* @return the name of the current database in a websave format
* @author Michael Gollmick
* @version 1.2
* @date 20090119
****************************************************************** */
function @WebDBName() {
        try {
                if (typeof this.name === 'undefined') {
                        var path = database.getFilePath();
                        var re = new RegExp("\\\\", "g");
                        path = path.replace(re, "/");
                        var arr = path.split("/");
                        for (var a = 0; a < arr.length; a++) {
                                arr[a] = escape(arr[a]);
                        }
                        this.name = arr.join("/");
                }
        } catch (e) {
        }
        return this.name;
}
/* ******************************************************************
* END @WebDBName
****************************************************************** */

Feel free to use it!

Amazing Ubuntu surface

Yesterday I installed Ubuntu LTS on my machine. Today I started to play around with it and installed Notes. After all I even installed Mikkels ingenious TwitNotes inside it (while it is not supported on Linux, it seems to work - you simply have to edit the file /opt/ibm/lotus/notes/framework/rcp/plugin_customization.ini to be able to install it).
Simply amazing how easy it is to work with Ubuntu - and how fast it works!
Notes on Ubuntu Linux
(the original looks even better due to more colors as in this resized pic...)

Domino Unix Start Script

Daniel has just updated is famous Domino Start Script for Unix. He now even added support for Ubuntu Linux!!! I just can say: this script is the one and only solution to work with Domino servers on Unix and Linux systems. We have started using that script around two years ago and it was already a perfect solution then. But he was always improving it and so the script evolved over time and got even better.
Just one example: originally the script was written to start a Domino server by manually running it. When I was using it the first time for my test machine I just wanted to have the machine run the script upon power up of the machine. Sure, the script was intended for production systems - and those normally do not go down. But I was in the need to stop my test machine several times a day so starting the script automatically was an idea I immediately had in mind. Although I was a Linux newbie then, I tried my very best to modify the script for my own. After two attempts I had to completely throw away (read, I had completely messed them up) I had a script that was somehow started upon system start and somehow did the thing I wanted. But since I had already talked with Daniel (and asked a couple of quite dumb questions), he had quickly decided to also think that could be a good idea and though implemented the necessary and correct runlevel extensions to the script. In fact, when I was finished with a somehow working version - he already had a fully working version with support for automatic start in runlevel 3...
From that day on, using the script is a must for all of my Linux Domino installations - I regret working on a Domino server from the systems side without that script ;-) If you don't know it - just give it a try - it is freely downloadable here!

change browser in Notes 8 and beyond

Every day is a new day to learn something. Today I learned how to change how the browser is launched in Notes 8 and beyond. For the last several weeks I saw my machine launching all internet related stuff in the internal browser of Notes 8 - which is in fact Internet Explorer on Windows machines. since I really do not like that Browser from several reasons but also from the security aspect. I do use another one. And since I am developing Web applications I have to see the users experience outside of the notes context - so I need to use a browser which is launched outside the notes RCP context in its own window. Well, the well know setting in the location document was somehow ignored by my installation. I did not really care about it since it is a development machine and several things are different from other installations. But over time it started to annoy me quite a bit. I double checked the Location settings, which were set just right:


Unfortunately Notes still launched everything in Internet Explorer. And then I found it by mistake - there is a more dominant setting in the Notes preferences now:


Well, in fact both settings work together. At first the Preferences Web Browser Settings decide what browser to start at all. And if that decision is made, the setting in the location preferences apply. Quite logic at the end but IMO too complicated for an end user if it is distributed over several different sections of the settings and both sections do not give any hint to the other one.

Well, after reading this, you are more clever than before and are now enabled to change that behavior quickly ,-)

Binary Conversion using Val()

The other day I was playing around with number system conversions in LotusScript. It came to the point I was converting a 32 bit binary value to a decimal long. By defintion long is a 32bit signed integer value in LotusScript. That means the 32nd bit is used to inidcate if the number represents a positive or negative number. Knowing that I was pretty sure I only need to take care for the 32nd bit in the binary representation I wanted to convert:
Val ( "&b00000000000000001000000000000000" )

should return 32768.
My surprise was high when I got the result form that statement: -32768.
After sticking around for quite a bit of time, I realized this number is exactly the end of the Integer datatype representable number range. The LotusScript Integer datatype is defined to be a 2 bytes signed integer value, leading to a representable range from -32768 to 32768. Then it hit me. Val() seems to be trying to convert a number to the smallest fitting datatype and then returning it as a double value. In this particular case
Val ( "&b00000000000000001000000000000000" )

looks like requiring only the first 16 digits of the boolean value, that is only two bytes. By LotusScript defintion, only the Integer datatype uses two bytes. The LotusScript Integer is a signed datatype and there's now unsigned 2 bytes datatype in LotusScript. So if you assign this value to a LotusScript Integer variable, the 16th digit is representing the sign bit and the other 15 are representing the real number. The first fifteen bits are set to zero so they represent a zero. Adding the sign bit to that number leads to the lowest possible representable number in a two byte signed integer: -32768.
Well, that was the reason. Now that I kew that I just needed a way to make sure, the value is positive and a long value. At first I was thinking about checking the return value of Val, but then realized this must be way too much work for just converting a value from one number system to another. There must be another way to do that: Finally I found the way to do that: simply add a datatype shortcut to the binary expression and the Val Function gets a directive to convert the value to the appropriate datatype. See the overview of how to accomplis this:
DatatypeLotusScript ShortcutExample
Integer%
Val ( "&b00000000000000001000000000000000" + "%" )
Long&
Val ( "&b00000000000000001000000000000000" + "&" )
Single!
Val ( "&b00000000000000000000000000001000" + "!" )
Double#
Val ( "&b00000000000000001000000000000000" + "#" )


Existence of a Notes Encryption Key

Today I was enhancing an existing application which requires an encryption key to work correctly. One of the problems to fix was how the application responded if that required encryption key was missing: the application stopped with an error message showing a callstack. While this was very bad, I was not that much concerned, because the application is used only by some of my developer colleagues. Well, thats no excuse for a runtime error, but I know they are not that shocked like an enduser if they see an error message.

Tho fix the problem I simply had to check, whether the current user has the required encryption key or not. To accomplish that simple sounding demand I checked the Designer Help but did not find a solution. So I asked the Google oracle but it came up with tons of PGP stuff and I got bored very fast. I then asked Daniel but he he also had no prompt answer (but an idea). While chatting about it, I came to a solution - I want to share with you. It's a simple function you may use in your own Scripts. With that function, it is possible to ask if the current user has the encryption key given by the only on eparameter of the function. It retunrs only true or false - so it is really simple to use:


Private Function IsEncryptionKeyAvailable( Byval key$ ) As Boolean
'/**
' * Checks whether the current user has an Encryption Key or not
' * check results are cached during runtime of the module, so multiple requests to the same key are very performant
' * @param key the name of the Key to check
' * @error Every Error is thrown by the repeater callstack technique
' * @author Michael Gollmick
' * @Version 1.0
' */
On Error Goto Repeater

Static doc As NotesDocument
Static encryptionkeyList List As Boolean
Dim it As NotesItem
Dim keyIndex$
Dim s As NotesSession
Dim testValue As Boolean

key = Trim( key )
If Len( key ) = 0 Then
IsEncryptionKeyAvailable = True
Exit Function
End If

keyIndex = Ucase( Key )
If Not Iselement( encryptionkeyList( keyIndex ) ) Then
' we did not check this key yet, so we do it now!
If doc Is Nothing Then
Set s = New NotesSession
Set doc = New NotesDocument( s.CurrentDatabase )
Set it = doc.ReplaceItemValue( "Key", "" )
it.IsProtected = True
it.IsSigned = True
it.IsEncrypted = True
End If
doc.EncryptionKeys = key
Call doc.Encrypt
' if the previous line did not throw an error, we have the key,
' so we set the test value top true (which defaults to false)
testValue = True
KeyNotAvailableForUser:
' if we have run into an error, testValue is still on false and we can store that value      
encryptionkeyList( keyIndex ) = testValue
End If

' now that we surely have the requested key in the list, we return it from the list
' that's slightly slower than returning from within the code, but is better readable and
' maintainable
IsEncryptionKeyAvailable = encryptionkeyList( keyIndex )

Exit Function
Repeater:
If Err = 4000 Then Resume KeyNotAvailableForUser
Error Err, Error & {
::}
& Getthreadinfo(1) & {():} & Erl
End Function


The function is quite handy - results are even cached, so calling it several times with the same key is quite performant (lists used the right way are sooo performant). Well, some parts could possibly be even more performant (we speak about just a few CPU ticks) but I have chosen the current coding style to keep it readable for others.

Simply copy, paste and use it - but drop me a note then.

Different types of huge

Working on a Notes database of 3.5 GB in size is not working on a small Notes database. But it is also not a very big one...

Well, today I learned a new meaning of big: We got a dabase making problems in nearly every sense. It wasn't replicating, it wasn't refreshing - for my colleague it wasn't even opening. Running a fixup took us hours on a server of actual power and more than enough RAM. Amazingly the database did'nt cause any CPU peaks on the server. It was just slow as hell. Even opening the ACL took around one minute. Replicating the database was impossible. Creating a new replica too. Nobody had a clue anymore. It was so odd that we were not even able to believe in a bug anymore.

After a lot of messing around with nearly every tool I knew, I just got back to the roots and took the good old show database console command on the server. Even this looked like being unable to access the database properly. But then, after maybe five minutes the server came up with a result. And yes the database has more than 30k documents and has huge indexes - but there was another indicator in the database which simply splashed into my eyes: nearly 4 million deletion stubs! Hell!!

While this describes every single problem we had, we have to find out why this huge amount of deletion stubs is still in the database - according to the database settings they cannot be elder than 30 days - and there was not much going on in the last month... So while we were always seeing a bigger database with 32k Documents and 3.5GB in size, in it was giantic - Notes deletion stubs count as documents on a lot of operations. Ok, they are documents, special kinds of documents.

off to Karlsruhe

Image:off to Karlsruhe

Again this will be an incredible event in coorporation with IBM. Loads of interesting people there. Besides the high quality Speakers from all accross Europe we will see and hear some of the Notos/Domino guru's. See the full Speaker list here:

Lesson learned

Manchmal muss man sich einfach nur eine Notiz machen, und das Leben wäre viel einfacher...

Seit einige Wochen hatte ich Problem mit meiner lokalen Entwicklungsumgebung. Da ich gerade einen Vortrag vorbereite war es nun an der Zeit, diese Probleme zu lösen. Also habe ich gestern einmal den kompletten Server neu installiert - naja, eigentlich keine wirklich schwere Arbeit, aber irgendwie scheue ich mich schon immer vor solchen Schritten. Dummerweise half dies auch rein gar nichts. Also habe ich ein Versions Downgrade gemacht - ich war nun fast sicher, dass ich ein Problem mit der aktuellsten Version habe und wollte auf die Version zurück, die wir auch produktiv einsetzen. Als ich mit dieser Aktion durch war, hatte ich eigentlich erwartet, ein perfekt funktionierendes System zu sehen. Weit gefehlt! Das Aussehen der generierten Seiten war noch genauso schrecklich wie vorher - und ich ziemlich ratlos.

Da nun aber des Problem definitiv nicht an der Server-Version liegen konnte, wusste ich wenigstens, dass ich noch einmal sehr genau nach eigenen Fehlern suchen musste. Nach einem kompletten Durchsuchen aller HTTP-Einstellungen blieb mir nur noch, ein und dieselbe Seite auf einem Produktivserver aufzurufen, danach lokal aufzurufen, und den HTML-Code zu vergleichen. Bei mehr als 100kB Quellcode bei den betroffenen Seiten eine Sache, die ich eigentlich um alles in der Welt vermeiden wollte. Wenn ich nur gleich an das absolut augenfällige gedacht hätte!

Beide Seiten unterschieden sich praktisch nur durch eine einzige Zeile, die erste:

auf dem Produktiv-System:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

auf dem Test-System:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Und schon war alles klar: Durch die unterschiedliche DTD-Angabe schaltet der Browser in den So genannten Standard Compliance Mode - dummerweise reagiert der Browser dann eben komplett anders auf die angaben im Quellcode. Neben diversen unterscheiden in der Darstellung des Box-Modells werden aber auch CSS-Klassen case-sensistiv und das ist bei Seiten die CSS exzessiv nutzen eben ein Problem.

Als ich diese Zeile gefunden hatte, war mir auch schon klar, woran es genau lag. In der Notes.ini des lokalen Entwicklungssystems hatte ich einen einzelnen Eintrag hinzugefügt:

DominoCompleteDoctype=1

Was eben genau die Umschaltung der Angabe auf die loose.dtd erzwingt. Der Quellcode der Seite wird aber dadurch keineswegs sauberer. Das eigentlich dumme daran war eigentlich nur, dass ich diese Zeile Testweise in die Notes.ini eingefügt hatte, keinen Kommentar hinzugefügt hatte und dann komplett vergessen hatte, was und warum ich es gemacht hatte.

Ergo: never change a rare setting without a comment!

Domino 6.5.5 released

I just installed it on my dev machine and currently see a huge memory useage. Seems to turn into a problem after a while. I just did a fixup and it took several hours to complete  because all my memory was occupied by some task. Unfortunately I was not able to see the responsible task - none of the running tasks had more than 50 megs of RAM in use. Nevertheless, some task took all the RAM and fixup had to use swap memory to complete its task.

I think I should have a closer look on it...

DNUG reloaded

Heute haben wir DNUG.de relaunched. Genau genommen haben wir die gesamte Site auf eine neue Version des CMS gebracht und die gesamte Seite ein wenig aufgefrischt. Neben einer Menge Verbesserungen im Quellcode ist DNUG.de nun weitgehend HTML-konform und lässt sich in deutlich mehr Browsern darstellen. Hier eine kleine Übersicht mit einigen Browsern:
  • Firefox
  • Internet Explorer 5.5
  • Internet Explorer 6
  • KDE Konqueror
  • Mozilla 1.7
  • Netscape 8
  • Opera 8

Image:DNUG reloaded

Praktische Formel

Rocky Oliver hat neulich eine kleine, aber feine Formel in seinem Blog vorgestellt, die er in so ziemlich jeder Domino Web-Andendung verwendet. Kann ich verstehen, mache ich ja auch nicht anders. Sogar der Code war so ziemlich genau derselbe. Genau genommen geht es nur um den im Web korrekten Pfad zur aktuellen Datenbank, aber dies hat auch so seine kleinen Tücken.

Das Interessante war zunächst einmal, dass es in Domino 6 eine wenig beachtete @Formel gibt, die eigntlich genau das gleiche erledigt, abere eben nur mit einem einzigen Befehl und nicht mit einer Kombination. Insgesamt ist das nicht nur Übersichtlicher zu programmieren, sondrn auch noch performanter.

Weiterhin gab es noch einen Post eines Lesers, der die Formel noch einmal ein gutes Stück einfacher un besser gemacht hat. Dadurch war die Formel schon einmal unglaublich vielseitig einsetzbar:

"http://" + @GetHTTPHeader("HOST")  + "/" + @WebDbName

Naja, bis auf HTTPS, falls das mal jemand verwenden sollte. Aber auch das ist eigentlich nicht wirklich schwer. Wenn man berücksichtigt, dass die Funktion @GetHTTPHeader in jedem Fall den richtigen Port zurückliefern wird. Also genau nichts, wenn https eingeschaltet ist, muss man die Formel eigentlich nur für HTTPS um einen kleinen Teil erweitern:

Wenn zu den im Web eh schon eher obligatorischen CGI-Feldern auch das Feld HTTPS gehört hat man an den Feldern der maske nichts zu ändern, ansonsten eben noch dieses Feld anlegen. Danach die fogende Formel verwenden und schon ist die URL zur eigenen Datenbank immer richtig:

"http" + @If( HTTPS="ON"; "s"; "" ) + "://" + @GetHTTPHeader("HOST") + "/" + @WebDbName

Start Script for Domino on Linux and Unix

Daniel has just released a start script for Domino on Linux and Unix systems. It's easy to customize, install and use.

One really helpful stuff is the monitor option, which is not only a monitor but a full terminal based console to the server, meaning input and output at the same time.

One other really helpful part is the support for partitioned Domino servers. Simply add or change a couple of lines in the script and you're done

Great work, Daniel!

automatisches Troll-Blocking

nun habe ich endlich einmal ein Update auf die neueste Beta vom DominoBlog vorgenommen und eben die Datenbank ein wenig kontrolliert. Neben ein paar kleinen HTML-Fehlern, die ich selbst verursacht hatte, ist mir aufgefallen, dass in den Kommentaren einige sinnlose existieren, aber nicht in jeder View und schon gar nicht auf der Seite angezeigt werden. Naja, nach ein wenig Weiterlesen in der Outline wars dann soweit - ich habe zum ersten mal die geblockten Kommentare geöffnet und habe eine nette Überraschung erlebt: ungefähr hundert trollige Kommentare waren automatisch geblockt worden und warteten hier auf weitere Bearbeitung. Schade nur, dass diese Kommentare nicht in der All Comments View mit einem eigenen Indikator stehen...

Attachment found on more than one document

currently I'm involved in a the update of a bigger Notesdatabase, requiring to rename richtext items on Notes documents. So the first thing I did was to learn how to move one Item into another name on a Notes document. (yes, there is no rename method in the Lotusscript NotesDocument class). This part should have been easy:

get the Item, copy it into a new one with the desired target name, delete the old one.

That was the first time when I had several documents throwing the Message: Document has been found on more than one document. So I looked a bit at google, looked into the Error resources of Domino and got nothing really helpful. One described to having the problem when moving rich text items having attachements on the same document. Well, that's it - all the documents causing trouble at my database have attachments. So I tried another way:

create a new document - copy all items to the new document, save both documents, go through all the items on the new document and copy them back to the old document. If you get a field named $file leave it out since it will be created by the corresponding Richtext field and will contain the Attachments on the recentyl copied richtext fields.

Even though this algorithm is much more longer than the first one - it does not work! the same Documents are still making problems by poping up the messagbox during NotesDocument.save()

My solution is now to include a subform on the new document form having richtext fields named like the old ones plus all the new fields, open this document in the UI, and move the content of those fields into the new content fields manually! What a fun - I had to process some 1600 documents, 31 were corrupt and had to be done by hand - 25 of that 31 are bigger than 10 MB. Since the database has a size of 4.5 Gig - I don't have a local replica at the moment - processng that documents takes plenty of time, even if you have a speedy DSL line.

But what is making me really nervous - I have still some 1000 documents to analyze. They are of a different doctype which has changed too and need to be migrated the same way - I'm afraid I will have some more fun with this nasty error message....

Anyone was having this too? Any better solutions? Your comment is appreciated.

HTTP redirects with LotusScript

Have you ever used the $$Return field in a Lotus Notes form? Have you then tried to use a similarity in LotusScript? found one? Hey, you are lucky! For all the other's here's a little how to:

The purpose of a $$Return form is to redirect a HTTP-Request from one location to another. This is really useful if you save a document via Web and want to avoid the very well designed and absolutely self-describing "Form processed" page of a Domino server. There are tons of other things you may need to redirect a page for, using the $$Return field is the way to do this. Usually. But what if you have to or want to use just plain LotusScript to do all the stuff you want to - including a redirect to any kind of a return page? Usually you have two options:
try to pre-calculate the $$Return field by the @Formula engine and then use it. But this is not really a clean way - you always have to code in two different programming languages. Additonally if you are using a WebQuerySave agent on a form which should not be saved (SaveOptions field set to "0") this option does not work.
So, the second option is to print out some small html code like:

< html>< head>< meta http-equiv="refresh" content="5; URL=somewreelse">< /head>< body>< /body>< /html>

yes this works, but it is long, very long and not really the best way to make a redirect. Of course there is the option to do the same by using JavaScript, which is in fact even worse - not every browser uses or wants to use javascript. That's why I dont give an example here.

So how does a real redirect work?

Its so simple I wonder, why I didn't realize it before. If you consider that the first print statement of every LotusNotes agent is written directly to the HTTP protocol header you can easily find the solution. In RFC1945, the spec for HTTP1.0 there is a paragraph describing how a redirect should be done by a server, serving the http protocol. So if you do the same, you can get a redirect too:

simply print the complete URI of your redirect adress as the first output line in your WebQuerySafe agent. Here's an example:

... some piece of code...
print "Location:" & newurl
...some other piece of code...


where newurl contains the complete path or URI of the page to be redirected to.

Yes, that's it! Fast, easy and efficient!

kaum zu glauben...

Ich wusste noch gar nicht, dass der Workspace so alt ist...

Image:kaum zu glauben...

not only CAAD

but also IBM CASA now :-)

Skype & nhttp.exe

I just tried to troubleshoot my locally installed Domino server - I was unable to access its http service. This experience took me now around three hours. Reason was so simple but for my apologies I was unable to use the standard trouble shooting way of thinking about what was changed just before http stopped to word. Why? Almost everything had changed - I had kind of an installation "orgy" yesterday when I was getting a brand new R51 and had to migrate all the software from the old R40 and the A22m to it. Finally a simple netstat -da gave me the hint: Skype was the "terrorist" There was an http connection listening on port 80 belonging to Skype. So when Domino started up (which is in fact later than skype in my case) the port http wanted to work on was already bound to skype and so no connection was possible to local Domino. Unfortunately nhttp.exe does not give any output about this and Skype has no option to not use port 80....

Migrated

Finally I got it. All my old posts in the Blogsphere template are now in this new database. Additionally I decided to change the design once more. Now we have a classical left hand navigation width a biger one right hand content area. The layout is highly scalable and flexible. Of couse I cannot claim to have it finished - there may be a lot more to do. Especially conformity issues could come up in the next days. I just started to migrate a layout into Dominoblog and did almost every testing with Firefox - maybe there are issues with Internet Explorer. Additionally I didn't use a validator at all - I'm sure there are smaller or bigger bugs inside :-)

At last and for me most important: how do you like the layout?

Blogsphere loosing content?

While migrating content from Blogsphere to DomBlog I had several documents with empty content fields. I know I had these articles finished, but now contents has disappeared - scary!

Migrating content

although I thougt I wasn't too diligent on my blog, migrating the old contents to this new one takes time. Currently I like it more to watch an old sequel of the X Files than continuing the migratition of old content (and this is also because of the content itself :-))

So, migration will go on, but may take some time - maybe I should have followed one of the rules of my professor at university:
Don't do anything by hand, you can put into an algorithm in the same time.

Blog Restarted

Yesterday I discovered the current DomBlog playground template version 3b1 in the net - and started playing around with it. I was (and am) excited, even if there's still something to do for a stable release. All over all I spontaneously decided to switch the system from Blogsphere to DomBlog!

Retuning the blog

while having some spare time, I had a look into this database design again. I dear, when I was retuning the database a couple of month before, my work was too lousy - several selction formulas where simply wrong, so the views did'nt contain any documents anymore. I wonder why the database was still running :-)

Now have corrected about 10 views and will go on looking - let's see how this will improve the site experience. Maybe I will attach some more features to it like a better RSS generator.

Lotus Notes Support - oder doch nicht?

Seit einiger Zeit habe ich ein SonyEricsson P900. Dieses Smartphone rühmt sich einiger wirklich toller Features, unter anderem auch der Möglichkeit, mit Lotus Notes zu synchronisieren. Genau dieses Feature war der Grund für den Kauf dieses Telefons - meine Mail und meinen Kalender im Telefon zu haben. Leider habe ich einige sehr schlechte Erfahrungen mit der zugehörigen Software gemacht. Beispielsweise bricht die Synchronisierung mit der Meldung "Notes API Error" oder "Die Synchronisierung ist fehlgeschlagen" ab. Dummerweise erhält man dann keinerlei weiter führende Hilfe um irgendeinen möglichen Fehler zu beheben. Nachdem mir dies einige male passiert war, hatte ich zunächst meine Versuche, mein Telefon zu synchronisieren eingestellt. Die nächste Replikation meiner Mail-Datenbank brachte dann aber doch noch eine böse zusätzliche Überraschung. Bei den fehl geschlagenen Synchronisierungen waren alle möglichen Dokumente in meinem Mailfile dupliziert worden. Ich hatte 6000 (!!!) zusätzliche Termindokumente. Witzigerweise gehörten die auch noch in einen Zeitraum, der durch die Einstellungen in der Software ausgeschlossen sein sollte.

Gestern hatte ich dann die glorreiche Idee, mir noch einmal ein bisschen Support vom Hersteller zu holen - auch wenn ich immer gedachte hatte, ein bisschen was über Notes zu wissen - hierfür schien es absolut nicht zu reichen. Also kurz einmal die Seite aufgerufen, die Telefonnummer für die Hotline gefunden und los gehts. Das Telefonat war sehr angenehm - mein Operator war wirklich bemüht und hilfsbereit. Leider hatte er keine Ahnung von Notes - gar keine. Ich habe dann so witzige Bemerkungen bekommen, wie: "Wollen Sie nicht lieber mit Outlook synchronisieren?". Keine Option, also weiter bohren. Ich habe dann versucht zu erfahren, wie man die Remote-Synchronisation des Telefons benutzen kann - die Anleitung bietet immerhin den Hinweis ich solle meine IT-Abteilung fragen (ich wusste nur dummerweise nicht, was ich mir antworten sollte). Der Hinweis hierzu war wirklich prima: zunächst wurde mir nach Rückfrage gesagt, dass die Remote-Synchronisierung mit Domino "einfach so" funktioniert. Nach ein paar kurzen Worten, über Domino war auch meinem gegenüber klar, dass das irgendwie nicht stimmen kann und er fragte erneut nach. Nun bekam ich eine neue Antwort: Ich solle bitte auf die Seite www.syncml.org gehen. Meine Frage, was ich denn dort runterladen soll, konnte mir dann aber keiner beantworten: "das ist ja keine Software von uns, da können wir keinen Support leisten". Leider gibt es nach Auskunft des Operators auch keine Person bei Sony-Ericsson, die mir zum Thema Notes/Domino im Allgemeinen und zur Remote-Synchronisierung im Speziellen weiter helfen kann.
So stand ich denn da, und mir wurde bewusst, dass ich ein Telefon habe, dass zwar mit Notes synchronisiert, dies jedoch nur äußerst unzuverlässig und fehlerhaft tut. Hilfe kann man hierzu nicht erwarten, die wird von Sony-Ericsson abgelehnt, da es sich ja nicht um das eigene Produkt handelt. Dies passt auch zu den restlichen Anwendungen, die mit diesem Telefon geliefert werden - die meisten habe ich trotz aktuellster Software-Version bereits mehrfach zu kryptischen abstürzen gebracht oder direkt nach der Installation feststellen müssen, dass es sich um Demoversionen handelt. Im Endeffekt kann man die mitgelieferte Software durch die Bank so gut wie gar nicht nutzen und muss sich direkt nach dem Kauf des Telefons um weitere Software kümmern, die dann allerdings kostenpflichtig von anderen Herstellern kommt.

Notes 7 Beta 2 - the story continues

it seemed, N7b2 has a problem with database scripts. The only database currently running without problems is my Mailfile. Other databases make the client crash. I expected a problem in the database script but wheen looking into two of thos scripts it showed there's only the posdocumentdelete interface used, which is not runned upon opening of a database. So I will have to look more.

Sorrily N7b2 is not really usable to me since of client crashes causen by my most frequently used databases. This is a pitty, but N7b2 is a beta, so there's absolutely no reason to complain

Notes Domino 7 b2 - customized actions on right mouse click

Image:Notes Domino 7 b2 - customized actions on right mouse click

This is my current Inbox folder with an opened context menu. In ND7 b2 it is possible to add actions to the right mouse click menu. Cool stuff! A new opportunity for designing intuitive Domino applications. But keeps out Mac users...

Nevertheless - it's my favourite new feature today!

Notes/Domino 7 Beta 2 available

There is a new milestone of Notes/Domino 7 available. The Beta 2 version has a lot of improvements in top of those in ND7 Beta 1.
Since I had problems installing beta 1 and a lot of work load that time I skipped that first release and had my first impressions today....

  • well, the famous redbox is still in there I saw it when attempting to open my Blogsphere database to write this article. I assume the database script makes the client crash and I think this will be fixed in the next milestone release
  • I saw some really useful options in the preferences dialog:
  • Auto save
  • editing of the data directory path
  • state memory (restores the last state of notes when restarting)
  • Really helpful - the annoying box showing that Lotus Script debugging has been enabled/disabled is now moved to a status bar information, which is the only one correct place for that information. Thank you Lotus!

Difficult URL-Command Problem

I have a Notes database which is created out of a Template developed by me. This is web enabled and intended for web usage (in fact highly optimized). One of the functionality is used by the following URL:

http://server/databasepath/database/form?Open

which is quite ok, since I do not want the form to be saved in any case - all of its work is done by an WQS agent. Everything works really fine on my development server(D6.5.2), a second development server (D6.0) and a pre staging server (D 6.5.1 with some Hotfix). Now we have set up a brand new server on Win 2000 with Domino 6.5.2. Calling the URL causes the Domino server to present an error: Error 400 Unknown Command Exception.

If I use http://server/databasepath/database/form?ReadForm

on that server, everything is fine again - but I have headaches about it. Especially because all teh other servers are working with the normal URL command. So I would really have the new server working as all the others.

Any hints are appreciated.

Beim Beenden eines englischen Domino Designer 5.0.13

Image:Beim Beenden eines englischen Domino Designer 5.0.13

und nur Killnotes hilft, den Designer auch wirklich zu beenden....

How stupid

I just recognized a stupid bug - coded by myself! I have been working again on my java mail puller for Domino - which is working quite good at the moment. But there's one exception: The pulling stops somewhere while processing all my mails on the pop box. So I tried to find some catched exception I do not explicitly log. And then it hit me. I am counting down the total messages in my pop3 folder in the following loop:
 for ( int ii=1; ii<=folder.getMessageCount(); ii++ ) {
That's not really a good line of code - because it is not only quite inperformant (getMessageCount() is done on EVERY loop), it is also wrong in this case. Since mails can be removed inside the loop (which is currently always the case), getMessageCount() returns one less on every loop. Leading to a Loop which works on exactly the half of all mails - uhh did I say that this is stupid?

Left to Karlsruhe

Leaving to attend the 20ths DNUG Conference. This time it will be in Karlsruhe. There are a lot of quite interesting tracks, sessions and workshops with several great keynote speakers and referees, including Dr. Ambuj Goyal of IBM Software. On Thursday there will be another great workshop held by Bob Balaban. And for sure there will again be a view of the currently running events (starting on Thuesday morning when conferene starts) directly on the frst page of dnug.de.

Oh no: "Database xxx time is too far in the future"

With installing the ND 6.5 pre release I got the problem of getting such messages on the Domino server console:
"Database
time is too far in the future". I always thought this is a problem of the beta release. When I was upgrading to ND6.5.1 the problem disappeared and I was happy again. Last week I had another look in my log and there it was again. Many of my most important databases promote this error on the servers log.
This time I started to google a bit for learning more about it - and yes the hints showed me there are others having the same problem. But now I am convinced not Domino is the time cracker, it is my Tardis time service which occasionally sets time to some date in the year 2020. If this happens Domino gets this date too and you get databases with documents as of the year 2020 already in 2004 ( ey, the try to spam you in 2020 too :-) )

But what to do, if you have this problem too?

The last times I had this prob, I just made a local replica of all those databases, shut down the Domino server, deleted the damaged ones, replicated the local replicas back and started the server again. Now I know more. To avoid the loss of data do the following on all those databases:
  • delete the replication history on all replicas
  • delete the cutoff-date in the replication settings on all replicas
  • reactivate all scheduled agents (the last run date may be affected)
  • re-create all full text indexes
  • for mail databases there is the hint of copying the ($inbox) folder to a protected temp one, moving all contained documents over there, delete the ($inbox) folder, replace the design, move all documents back to the reappeared ($inbox) and delete the temp folder to avoid non appearing of mails in the inbox (sounds really hard and seems to be not required to me - my inbox is working)

For fixing the date values of already deliverd mails, I have written some small agent fixing the year-time stamp of mails seeming to be delivered in the future. If you are interested in getting it, just contact me! (Don't care - I won't charge you for it)

measurable speed improvement

Later this day I had time to measure the speed improvement I got from my Blogsphere tunings last night. The result is quite impressive. While the untuned Blogsphere has response times of around 12500 ms per page the tuned version is around 3000. That sounds like an improvement of four times!!!

Tuning BlogSphere

Today I have played a bit with BlogSphere's performance - after the move to the new server the speed was not as good as expected to me. And yes, there was something to improve - I did this and for my impression speed is incredibly better now. Currently this Blogspere database runs on a Domino 6.5.1 which is installed on a heavily loaded 1,8GHz standard desktop machine - a better server would maybe generate another improvement of speed. My felt speed improvement is around four times at the moment. How is your impression?

Further optimization may follow this weekend - at the moment I get this more of speed by using an agent which is maybe not necessary. And there are some more ideas for improvement to be checked...

Too few entries in Blogspere’s RSS-Feed?

Yes, its true, the number of entries in BlogSphere's RSS-Feed is limited. The entries are limited to 10 which leads to a feed having a maximum of 10 entries plus their responses.
Changing this is so easy: just go to the stories.xml-Page and pick um the embedded View properties. By changing the value of "lines to display" to a value you like you can change this behaviur. But be careful! It does not often make sense to display a lot of elder stories in the feed... And by the way - this increases the size of your feed :-)

Image:Too few entries in Blogspere´s RSS-Feed?

BlogSphere with complex RSS-Options

pew - I have it. just two hours of working and now my Blogsphere is not only valid RSS but even highly configurable at the feeds options:

Image:BlogSphere with complex RSS-Options

  Read More...



including the changes is not that hard but there are several design elements affected:
RSSConfig (SubForm) new Subform for all teh options - will be used in the configuration
Stories.xml | stories.rss (Page) The Header has become completely obsolete and is now just one computed Text, which is read from BlogSphere's Profile
comments.xml | comments.rss (Page) The Header has become completely obsolete and is now just one computed Text, which is read from BlogSphere's Profile
Blog Configuration | BlogConfig (Form) There's a new Tab which includes the RSSConfig-Subform

valid RSS with Umlauts again - äöü

Rocky praised my umlaut fix at first and then complained about the break of RSS sometimes coming with it. He was absolutely right! Today I had time to look at it - and I think there's a solution (uh yes - to the bug in my fix :-( ):

The Design-Element (Page) stories.rss generates the code for the RSS-Feed of Blogsphere but defines it to some certain character set. This character set may not be the same as the one your Domino Web Engine uses to generate the page. Since that characters sets have to be the same the broken RSS may occur if you have special characters like umlauts in it. I have changed that line and my RSS-Feed appeared again to be vaild by the feed validator. and also appered again in SharpReader. I think that's how the fix of the fix works:

Simply change the first line in your sories.rss page in Blogsphere to the value you have in your Domino Web Engine configuration to be used as default settings character set. In my case this is Western which is configured to be ISO-8859-1. If you have other settings, you need to enter the other value :-)

The result is a valid RSS: Image:valid RSS with Umlauts again - äöü

Of course I have tried to automatize this setting to avoid manual change of that design element. Sorrily a complete automatization seems to be impossible or  in sight to the effort inadequate: If you try to read the accordingn fields from the current server document you need to give Anonymous Reader rights to your NAB, since the @DBLookup is done from the user agents authenticity. Well, simply not a useful hint! Another way would be rewriting the page's code to a Form with SaveOptions=0 and a WebQueryOpen Agent which is setting some certain field to the Form to the value of the Domino Web Engine Setting - executetd by the Agent Signer's right or on behalf of some adequatly granted user id. But this is also not really beautiful because of performance reasons (remember only one value is calculated by reading just to fields and that is only for the few Blogsphere instances using charcters above ASCII-127 when running a complete Agent). The third and maybe only useful way is to place a setting to the Blogsphere config Profile Document which is read when generating the feed. But this would be some part of a couple of definitions around the whole RSS and should not be done as the only one option in the profile document. I had already started to create some more complex and more configurable feed-functionality than Blogsphere has at the moment, but did'nt had the time to finish it until now.

What do you think?

more speed to this blog

This server has been updated from Domino 6.0 RC2 to 6.5.1 - response times decreased significantly.

Combining Pullmail, SpamPal and Domino

Today I dropped my solution of getting mail automatically to Domino from POP3 account. One Year ago I had written some Notes Database using a JavaAgent with Suns JavaMail-Package included. The solution was working all the time quite well but had also some probs (e.g. stopping at erroneous mails in the POP3 or IMAP box which was simply annoying). Additionally the amount of Spam, sent to my account is now by 85% or more of my total mail amount and so I was looking for a solution for filtering spam.

While searching I remembered some article on my favourite blog (vowe.de) and so I stopped my googling and switched to vowe, full text searched the site and got the name of that particular freeware tool he uses to get mails from POP3 Boxes. Additionally I got the tip to a cool spam washer (SpamPal).

At first I thought about using my old Email Retrieval System Database (basing on some Java code, including Suns JavaMail Package) - it should be easily upgradeable to connect to SpamPal - but then I dropped this, because of the probs I have and because I had no time to completely review the code to place some more and better error handling and the port extension in it.

Now the goal was easily  defined: Combine Pullmail, SpamPal and Domino in a way that everything is automatically running together on one machine pulling several POP accounts while marking Spam and removing it from the Inbox automatically.

I started by donwloading all the progs to my R40 and tried all of it a bit. I noticed there's no description of how to use Spampal with Lotus Notes - but it is so easy - you don't really need such a description if you can abstact from another mail program :-)

Well after testing a bit (and being impressed by SpamPals power) I switched to my Server. Installed SpamPal, copied Pullmail and started combining it.

SpamPal was installed and configured easily - but the combination with pullmail.exe and Domino was a bit more harder. Finally I wrote a batch to pull several accounts to several MailBox-Files on the Domino-Server. a bit more complicated was the scheduled pulling. Windows Task Manager was not my choice and ddidn't really work - I think this is crap. So I renamed the batch to npullmail.bat and created a program document.
you may wonder why not to rneame pullmial.exe to npullmail.exe and write a Domino Program Document for every account you want to pull. I give you two reasons:
  • the commandline options for pullmail are not encrypted in the program document and so you have you password stored in a clear format in the Domino Directory which is public accessible for you Notes users
  • the commandline options in Domino Program Documents are not passed by completely. Only the first XXX characters are passed by to the commandline and so you may not be able to provide all the data you need for pullmail by the program document.

After all, the system works quite fine - better than ever before. I have some more Mail Rules now - and have a much more clearer inbox. Reaching me by mail has now become much more reliable...

Fun with Domino Designer

Do you know this message box?



Image:Fun with Domino Designer

Avoiding replication conflicts in Blogsphere - part 2

Rocky Oliver has just provided some kind of Blogsphere official solution for avoiding replication conflicts within multiple replicas of Blogsphere. Looks like a similar way to my solution but is up to date to the latest release and a kind of official solution :-)

Correct settings for German Umlauts in Domino InternetSites

ever tried to set up a Domino based site having German umlauts in it? Yes that's not really a hard job, but by default the settings for the Domino Web engine are wrong to sites allowing German umlauts in web forms - so the game begins: playing some setting, unloading http loading http - testing - not working, again....

Here are some notes that worked to me ;-)

go to the InternetSite config Document (or the server document, if you have only one site) and look for the following:
  • Use UTF-8 for HTML forms: No
  • Default character set group: CentralEuropean
  • Western: ISO-8859-1
  • Central European: ISO-8859-2
  • Character set in header: disabled
  • Meta character set: disabled

some of these settings don't look really senseful to me but it works here...

It took me one minute to save...

When saving a story in BlogSphere it took me around one minute to save it. A bit annoying to me but the fortune is it makes you work more accurate to prevent any unneccessary waiting for the save... ;-)

I had a look into the code behind and did some optimizations. I mainly put the calendar refresh into an agent which is called to run on server. Now all the agents work is not transferred over the network connection between client and server (and this is not really a low amount). By this way the Postsave event (which updates the calendar) takes only two seconds instead of 56 it was before on my network. By the way, Sundays are now displayed in the calendar in a different color - just for fun.

SMTPAuth on Domino

here's a nice tool to do SMTPAuth on Domino

now I have a combination of a hand made Java Agent for POPing my mail account and a Windows binary for sending mails from Domino to that account.

Here's a description of how to configure Domino 6 with it.

 Read More...




1.        configure Bisswangers SMTPAuth to use port 1025 on your system, use your personal connection data for sending in teh other fields
2.        go to the Server Document in Notes and edit the Ports\Internet Ports\Mail section and edit the SMTP Outbound column to use port 1025 instead of the normal port 25 for sending to SMTP Servers.
3.        edit the Messaging Settings and set the Relay host for messages leaving the local internet domain: to localhost (or 127.0.0.1)
4.        Enter "tell router update config" command at the console or simply restart the router or the whole server

it should now be working!





Image:SMTPAuth on Domino

a bit of tuning

Blogsphere is great! I really like it, it is so easy to me to work with it - from now on, my personal Blogsphere will also work a bit faster - I reduced the number of uncached @DBLookups by 40 - there are still a lot of them in every page but these were simply unnecessary and are now gone to improve my very personal Blogsphere speed :-)

Why does nhttp use so much memory?

Yesterday I installed some more memory into my machine, having now 768 MB of RAM. Today I saw the following:



Image:Why does nhttp use so much memory?




Whats going on there? This is a laptop with only me as Web user - doing nothing but developing some quite simple Web applications. Currentyl only displaying some views at the moment (ok, arounfd 5000 docs in there)? Are there ways to tell nhttp.exe to not use so much memory? Tons of questions and no answer yet - do you know something?

off to Kassel

leaving Cologne to attend the DNUG Conference in Kassel

this is my 6th DNUG, but in one facette a premiere - I'am a referree for the first time: Topics will be the DNUG Conference Planning and Agenda System and some other projects I recently worked on or am currently working on.

By the way, you may close the popup by double right mouse click or ESC...

Fixing RSS

RSS in Version 1.2b1 of BlogSphere won't work anymore for several reasons - i have fixed it today for my blog and don't want to hold thet info in my backhand...

The reasons:
  • if you change the story date of a document, this doc will be saved with a date and no time information - the RSS-feed will be generated with an invalid UTC date format
  • that's also the reason, why the lastBuildDate token may be corrupted
  • after using mimeEntity.DecodeContent() in V1.2b1 the RSS-code is no longer in UTF-8 format - on my machine the format is ISO-8859-1

The Design Elements:

invoked Design-Elements are:
  • Page: "Stories.xml | stories.rss"
  • View: "RSS\Stories | RSS_Stories"
  • Form: "ClientStory | Story"

The fix:

Page: "Stories.xml | stories.rss"

1.        go to the Domino Designer
2.        open the Pages
3.        open the "Stories.xml | stories.rss" page
4.        go to the 1st line
5.        change the encoding of this page to an apopropriate value i.e. from to
6.        save the design page

View: "RSS\Stories | RSS_Stories"

1.        go to the Views
2.        open the "RSS\Stories | RSS_Stories" view
3.        go to the 2nd column
4.        replace the following line:
vTime := @Text(vDate;"S1T0");

by these two:
vTime2 := @Text(vDate;"S1T0");
vTime := @If (vTime2 = ""; "00:00:00"; vTime2);

5.        go to the third column
6.        replace the following Block:
vHour := @Right("0" + @Text(@Hour(vDate));2);
vMinute := @Right("0" + @Text(@Minute(vDate));2);
vSecond := @Right("0" + @Text(@Second(vDate));2);

by this one:
vHour2 := @Right("0" + @Text(@Hour(vDate));2);
vHour := @If ( vHour2 = "-1"; "00"; vHour2);
vMinute2 := @Right("0" + @Text(@Minute(vDate));2);
vMinute := @If ( vMinute2 = "-1"; "00"; vMinute2);
vSecond2 := @Right("0" + @Text(@Second(vDate));2);
vSecond := @If ( vSecond2 = "-1"; "00"; vSecond2);

7.        save the view

The RSS feed will work already, but until now only the symptoms have ben treatened, the reason is still untouched:
Form: "ClientStory | Story"

1.        go to the Forms
2.        open the "ClientStory | Story" form
3.        go to the StoryDate field
4.        rename it to "StoryDateInp"
5.        change the "DefaultValue" Formula to:
_date2 := @Date( Storydate );
_date := @If (@IsError( _date2 ); ""; _date2);
@If ( StoryDateInp != ""; StoryDateInp; _date != ""; Storydate; @Now)

6.        create a copy of this field, rename it to "StoryDate" and change the type to "Computed"
7.        change the datatype properties to display time values too
8.        hide the field fromNotes and web - it is unnecessary to be seen
9.        enter the following formula:
_baseVal := StoryDateInp;
@TextToTime (
@Text( @If ( @Date ( _baseVal ) = ""; @Date( @Today ); @Date ( _baseVal ) ) )
+ " " +
@Text ( @If ( @Hour (_baseVal) = -1 | @Minute (_baseVal) = -1 | @Minute (_baseVal) = -1; @Time(@Now);  @Time ( _baseVal ) ) )
);

10.        save the form

avoiding Replication conflicts in Blogsphere

I am replicating Blogsphere between two servers, and have had tons of replication conficts in it - now I know why - and have a fix for it

Well, there are some really useful agents in Blogsphere, which run on a schedule by 5 minutes basis. These agents are modifying the story documents in the database nearly every time they run and are set up to run on any server. So replication conflicts are preprogrammed:

How to fix it?
1.        go to the Domino Designer
2.        open the Agents
3.        open the "Update Stories Calendar" agent
4.        go to the agent properties window Image:avoiding Replication conflicts in Blogsphere
5.        go to the "Schedule" box
6.        change the "-Any Server-" entry to the server you run your BlogSphere on
7.        Save the agent
8.        do this for the "Update Story Response Count" too

minimizing replication traffic on BlogSphere

I recently had some remarks on two agents in Blogsphere - one of them can be fine tuned to reduce document saving and therefore replication overhead...

the second agent (Update Story Response Count) is a LotusScript agent, touches every story, allowed to have comments on every run - and this is every five minutes... I think it would be worth to have a look at this agent to avoid a saving of each of this documents on every run - besides, this may improve overall performance of BlogSphere:

replace the following lines:
  While Not doc Is Nothing

          Set doccoll = doc.Responses

          If Not doccoll Is Nothing Then

                  doc.children = doccoll.Count

                  doc.Save True,True

          End If

          Set doc = v.GetNextDocument(doc)

  Wend


with these ones:

  While Not doc Is Nothing

          Set doccoll = doc.Responses

          If Not doccoll Is Nothing Then

                  If doc.hasitem ("Children") Then

                          If DocColl.count <> Clng( doc.children(0) ) Then doSave = True

                  Else

                          doSave = True

                  End If

                  doc.children = DocColl.Count

                  If doSave Then doc.Save True,True

          End If

          Set doc = v.GetNextDocument(doc)

  Wend


Remark:

All over all I would prefer another solution for this agent:
1.        change this agent into a manually triggered agent
2.        create a scheduled simple agent to call the one from point 1 once a day
3.        create an agent running when new docs are created, calling also the agent from point 1

I think this will do the same but will increase the performance and decrease server load (which is surely not high at the moment but maybe high in two years after having thousands of docs in a BlogSphere instance) some more than only changng the code

note to myself: do not(!!!) use BlogSphere with an R5 Client...

Editing BlogSphere documents with R5 will make the contents disappear in a quite strange way - do not do this!

off to Frankfurt

leaving Cologne to attend one of Bob Balabans great Workshops. This time in Frankfurt speaking about WebSphere

see the Agenda

Blogsphere 1.2b1 released

have a look at it, test it, use it, comment it!

there's also an article on LotusGeek

Blogsphere Umlaut Problem-Fix

Messing around with BlogSphere, I recognized German umlauts are not displayed correctly. So I looked into the coding of the form and found a fix for it...

When playing with the current version 1.0.2 of BlogSphere, I saw strange display of German umlauts such as like an ü became an ü. Not really beatiful to me, since most of my articles will be in German unless my English becomes better .-)

So I had a look into the code and played with the LotusScript Debugger to find the reason. Well, I'm not really sure about my solution, since I never played with NotesMimeEntitiy class before, but it works to me now. Here's my solution:

There is a bunch of LotusScript code in the PostSave event of the "ClientStory" form, which creates the HTMLCode automatically. When debugging the objects I saw, some property called encoding and also saw the HTML text representation of my particular RichTextField. Well, that representation was not really beatuiful and had a lot of strange characters in it. So I looked into Designer Help (ey, what an idea .-) ) and found some function notesMimeEntity.Decode(). After putting this line into the code - the artikle was saved in a way, that worked even with German umlauts - simple but working!

Since there are two RichTextFields in the code, you have to add two lines into the PostSave interface code: Simply add a
       If Not mime Is Nothing Then Call mime.DecodeContent()
just after each occurence of:
       Set mime = item.GetMimeEntity
and the HTML-Code will be created with correct umlauts.

Update:

The fix was incomplete. There can be the case to have mor ethan one MimeEntity in one RichtextField, so you have to insert two more lines to the interface:
insert a Call child.DecodeContent() after each occurence of While Not(child Is Nothing), so these types of blog entries will be saved correctly too.

Links:

Notes 5 and 6 living in a harmony?

If you want to have Domino 5 and 6 Server in production, you have to be very careful about your domino directory - sure. Today I learned that a simple replication settings change in the NAB on the R5 Server is not enough.

After upgrading the complete infrastructure of a remote location of a customer to R6, we disabled the replication of forms and design elements for the NAB to prevent replacement of the R5 NAB design. Usually that schould be all to run Domino 5 and 6 in together. But today I learned, that that's not really all: the replication of both locations were including one document which replicated simply all available databases. So we had one replication which replicated even the design templates. After a regular design task run at night - the great Domino 6 template was placed at the R5 NAB.

So be careful and disable replication of the Domino 5 NAB template (pubnames.ntf) after each update or upgrade of your Domino Servers