Search This Blog

Showing posts with label Workaround. Show all posts
Showing posts with label Workaround. Show all posts

Tuesday, July 5, 2022

Failed to create database, can not create multiple databases that differ only in case.

 Hi

A funny thing happened today.

I needed to work while I was on vacation and my Internet was bad: I needed to create a mail-database on the server.

Initially I tried to do it directly from Notes client installed on my laptop.

I started the creation process (everything was standard: Ctrl+N, chose server, mail template etc) but then I quickly realized that it would take ages. So I break the process by clicking Ctrl+Pause but I kept the creation dialog opened in Notes on my laptop to let me copy filename and database title from it later.

I connected to server via RDP, ran Notes client there, issued "dbcache flush" in Domino console and deleted the incomplete database created by my local Notes client. 

No issues so far.

Then I tried to create mail database from the Notes client on the server by using the same filepath and title which I copied from the still opened creation dialog window in my local Notes client. 

However, I got an error saying "Failed to create database, cannot create multiple databases that differ only in case." I quickly googled it and most of the articles I found suggested to issue "dbcache flush" and "sh nlcache reset" which didn't help me at all. 

I tried to create this mail-database on another server in the cluster - it worked. Then I tried to replicate it to the initial server and got the same error. All these things I made from Notes client installed on the server.

I was very confused.

You know what eventually resolved the problem? 

The trick was to close db creation dialog window in my local Notes client - after that the error had gone.

Tuesday, May 8, 2018

FP9 failed to install because certificate expired since Fri Apr 20

Hi

Today I wasted some time on issue with installation of FP9.

I reinstalled Windows on my laptop, installed IBM Notes client 9.0.1 and then tried to install FP9 using setup file I used many times before. However this time installation failed. At first I thought it was caused by my Windows because I like to disable in Windows everything I can. However when I tried to install FP9 on another VM I had got the same issue:



I read logs provided by FP9 installation but didn't find anything helpful there, just

CustomAction PreRunProvisioning.5F3129E8_3AD4_4346_AEE6_A314E2DE64D9 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 18:51:01: InstallFinalize. Return value 3.

Then I checked logs in IBM\Notes\Data\workspace\logs and found there a following line:

CWPST1015W: Plugin com.ibm.rcp.provisioning.feature_9.0.1.20170629-1747 failed to install.   
The reason provided is CWPST1002W: Signature has expired


Then I googled this post and used workaround by adding setting com.ibm.rcp.security.update/EXPIRED_SIGNATURE_POLICY=ALLOW to plugin_customization.ini - worked OK for me.

Monday, June 12, 2017

Strange decision within IBM Verse update for June of 2017 on Android devices


Hi

IBM released a new update for IBM Verse in June 2017 - here is a link to "what's new".
There is a new feature for Android about:

Verse for Android: Certificate-based authentication

However I don't think the way it works is correct.
See my story below...

Wednesday, May 24, 2017

Unable to build Xpages as the following library: com.ibm.xsp.extlibx.library, is not installed

Hi

I want to share one strange thing that happened to me today.

I have reinstalled IBM Notes 9.01 but did it a bit unusually:

1) I uninstalled IBM Notes and cleaned up all files and folders which usually stay after uninstallation.
2) Then I installed IBM Notes 9.01 and FP7 but when I wanted to install Extension Library from openntf.org I realized that I forgot to enable Domino Designer and Domino Administrator options during setup. So I run installer again, chose option "Modify", enabled Domino Designer and Domino Administrator and got my Designer and Administrator back.
3) Then I run FP7 again just because I wasn't sure if it was needed or not to do it again after installation of Designer and Administrator.
4) All was OK and finally I installed Extension Library - this is something I did many times so I couldn't do it somehow differently then before.

However when I opened one of my Xpages-based applications in Designer I saw the error "Unable to build Xpages as the following library: com.ibm.xsp.extlibx.library, is not installed."

Two more strange things in addition:

1) Designer didn't show "IBM Bluemix Manifest" under "Application Configuration"

2) When I checked Xsp Properties I saw such picture:
I compared files in Notes\Data\workspace\applications\eclipse\plugins with working properly IBM Notes client on another computer and list of jar-files was the same. Googling didn't help either because all posts I found were about issues with previewing of Xpages in browser - that was not my case.

Eventually I uninstalled everything again, cleaned up files and folder and then installed all three clients with the first setup, installed Extension Library and this time all was OK.


Wednesday, October 26, 2016

How to set Workspace as default homepage in IBM Notes client

Hi

Recently I've got the task to set up Workspace as default homepage in IBM Notes client for about 400 users.

Googling didn't really help - suggestion from IBM I found looked crazy and I didn't want to mess with it. My hope on Domino policies didn't work either - not sure, may be I missed something.

However I found another interesting thing that can be very helpful for resolving this task.
Database Bookmark.nsf (where Workspace is actually located) contains form "WPDiscoverChange"


with a button "Set Workspace as Home"

with @formula: @URLOpen("notes:///ClientBookmark?OpenWorkspace&SetAsHome")

This option opens many possibilities about how to programmatically set Workspace as Homepage:

1) Use any third party tool for a single mass-opening of mentioned URL for all users
2) Put NotesUiWorkspace.URLOpen() into PostOpen of Database Script of mail template with some additional logic to run it at once per each user
3) Send Notes-email with Notes-button "Click me" in body which would open the URL 
4) Send Notes-email with saved form that would open URL on email PostOpen event

The only one disadvantage of using this approach that I currently see is that Workspace will get active and gets in front of all windows in your Lotus Notes so if you put URL opening on mail database PostOpen even (Database Script) then user may be confused because Workspace window will cover Mail database window. However it should happen only once so I think I go with this approach than with the one suggested by IBM.

If you know better way - please share.




Friday, September 11, 2015

How to implement "Totals" with Data View control

Hi

Earlier I posted a question about how to implement totals with Data View control.
Thank's everyone for help.
Eventually I managed to do it.

So, let me show you how I did it

1) Let's imagine we have a "Test" form with three fields "a", "b" and "c".

2) Then we create a simple Notes View with three categorized columns, which categorized columns for "a", "b" and "c" correspondingly. Important condition: each nested category column should contain a value of a parent category via some specific separator. I chose "###" as a separator.
You can use also this trick to make it working faster.
So, eventually we get something like this:
(just for clarification: the first document in the view has fields [a]="aaa", [b]="bbb" and [c]="ccc")

The first column with totals serves just for making the demo easier - I do not use it with Xpages so you may not create it.

Sunday, May 24, 2015

How to save date in a document item without time part on back-end

Hi

This is not something really tricky but it's nice to know.

Let's imagine you need to save a single date or an array of dates without time part in a NotesDocument item. F.x. you need to do this from an agent so you don't have a form opened in UI with a date-field on it which property "Display time" is disable.

You could write something like

Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim singleDate As Variant
Dim arrayOfDates(1) As Variant

Set db = s.currentdatabase
Set doc = db.createdocument

singleDate = DateNumber(2015, 5, 22)

arrayOfDates(0) = DateNumber(2015, 5, 12)
arrayOfDates(1) = DateNumber(2015, 6, 8)

Call doc.replaceitemvalue("singleDate", arrayOfDates)
Call doc.replaceitemvalue("arrayOfDates", arrayOfDates)
Call doc.save(True, False)

However if you check the item value you will see that there is a time part near each date value



Saturday, May 23, 2015

How to force UNK table to "see" required type of a field (to use it in FTSearch, for example)

Hi

If you work with Full-Text search a lot you could get into situation when your database considers field type incorrectly, f.x. it may recognize some field as a number when it is actually a text on a Form so you can't use FT-query like [FieldName]=*partOfText*. Usually it happens when you change field type on a form but your database already contains documents with items based on old-type-fields.

Though IBM knowledge base provides suggestions how to fix such issues it's rather tricky thing to fix. At least the steps suggested by IBM had never worked for me - I mean deleting FT-index and then copy-style compacting. However I found my own. Here is the magic formula...


Thursday, May 21, 2015

How to export Outlook email to Notes mail database

Hi

Here is a working example of my solution which let you export Outlook email to Notes document.

You might see many other similar examples in Internet but my solution handles inline images and attachments. I remember when I was looking for such solution, everything I could find was partly done, so here you probably have the best working example :-)

ypastov.Outlook2Notes.nsf

Few things:
1) Database contains only one agent that does the magic.
2) The agent saves Notes document created from Outlook item in the current database. However the best thing would be to save it into Mail database because it would automatically do some tricks with inline pictures.
3) I didn't implement smart switching between Notes/Outlook windows so if you run solution and see nothing try to switch between Notes/Outlook - probably there is some dialog window waiting for your decision.

Enjoy.

Btw, as you can see this solution start working from Notes client. However recently I developed Outlook Add-in that provided Outlook users with a new button on existing ribbon and let them save email in the Notes Mail database - the same business case but implemented in more native way for Outlook users than clicking some button in some Notes-database.

26.10.2016
Short update.
For months of using my Add-in in production we experienced different issues with fetching SMTPAddress of recipients, senders. I found the way how to fix all issues but decided to not open that code in public since I put there much efforts and time. So, in case you really need to resolve similar issues please contact me privately.

Wednesday, December 17, 2014

How to focus Lotus Notes window (standard version)

Hi guys

Currently I am working on VB.Net Add-in for MS Outlook 2010 that allows to copy Outlook mail item to Lotus Notes mail database. I am almost completed it and though I met many interesting challenges on my way one of the most interesting was about focusing of Lotus Notes window.

Solution architecture was following: Outlook Add-in (a button in Outlook explorer/inspector ribbon) gets ID of selected/opened Mail item, creates OLE object of Lotus Notes, passes that ID to notes.ini and finally calls a NotesAgent that does the rest of a job using lotusscript.

The NotesAgent asked user several questions during its work so I had to switch focus to Lotus Notes window at some point. Native ActivateApp() function didn't work neither in Add-in VB.Net nor in NotesAgent lotusscript. After Googling a little I found a couple of suggestions based on Windows API:

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdSHow As Long) As Long


hWin = FindWindow("NOTES", &H0) 'I used lpClassName = "NOTES" because it looked logically and
                                                             ' because all examples in Google did the same.
Call ShowWindow(hWin, 3)

I utilized this workaround in my NotesAgent and on first sight it worked well.

Saturday, November 22, 2014

How to find out if PIRC is enabled programmatically

Hi

Need to find out if PIRC is enabled programmatically?
I didn't find any other way as through Domino console output.
At least C API toolkit does not have anything.


You can do something like this:
response = session.Sendconsolecommand(servername, {show dir -pirconly"})
If response <> "" then
If InStr(1, response, targetDb.filepath) > 0  Then
IsPIRCEnabled = "1"
Else
IsPIRCEnabled = "0"
End If
Else
IsPIRCEnabled = "-1"
End if

Wednesday, October 29, 2014

NotesDatabase.Server - returns server name in any format

Hello

Though I work with Lotus Notes as long as I remember myself as a human being I still can be surprised by things which I thought I knew at the level of reflexes.

Did you know that NotesDatabase.Server property may return server name in ANY format?

I didn't. Today I discovered that and after quick research I found this article.

In my case I got NotesDatabase server as a NotesDocument.ParentDatabase property.

So, from this day I will always use explicit name casting, like NotesSession.CreateName(name).Canonical

Wednesday, September 10, 2014

If you can't remove lotus notes database icon from workspace

Hi

Here is a case.
I had a server based database and its local replica in "Test" folder on my computer.
I had both database icons stacked together.

Then I moved local replica to another folder using Windows file system.
Let's imagine it is "NewFolder" folder.

I added database icon of that relocated local replica to Lotus Notes workspace so I've got three icons eventually.

I did not need all of them since the middle one (in Test folder) did not exist any more.
However when I tried to remove it using "Manage List..." option I received a message that it couldn't be done.

I tried manually to remove all three icons and then add only two relevant icons - it didn't work, I still got three of them. 

However after I removed all three icons manually from workspace, closed Notes client, compacted desktop8.ndk, opened Notes again and added icons of server and local replica to workspace back I've got only two icons as I wanted to get.






Tuesday, August 26, 2014

"None of the authentication methods supported by this client are supported by your server" - error when sending by Domino IMAP - RESOLVED!

Hi guys

Probably you can help me.
I am trying to let user work with Domino mail by IMAP.
This is not something new for me and I have resolved this task many times before but now I can't :-(

I have a Domino server 8.5.3 FP5 x64 on Windows Server 2008 R2.
I have enabled IMAP task on Domino server, I have converted all mail databases to support IMAP using convert utility. I checked with telnet that 143 (IMAP) and 25(SMTP) ports are opened and reachable. We do not use any encryption currently.

I configured my Outlook 2013 to connect to Domino mail by IMAP and I do receive inbound emails but I can't send anything - I get the error "None of the authentication methods supported by this client are supported by your server".

Let me show you several screen shots.

Saturday, July 26, 2014

Toolbar button "Go up for parent view"

Hi

Several days ago my friend, who is also a Lotus Notes developer asked me a question about one task he was worked on: it was required to provide users with functionality to find open in UI document in a view.

His company users complained that they received some automatic notifications with Notes-links inside but they needed to see those documents in the Notes views also and it took time to open documents by Notes-links, then copy to clipboard information from specific fields and then run search in a view to find them there.

My friend told me that he developed an agent, that he incorporated into each important application on Domino server and it was possible to run it from opened in UI document to get focused on the same document in the Notes View.

He was very frustrated when I told him that there is a native toolbar button for this purpose :-)
So I share this knowledge with you, probably it will prevent you from developing something similar



NotesItem.Type = 256 causes "Variant does not contain a container"

Hi

Today I had to convert a collection of NotesDocuments for some external system.
For one particular document I received an error "Variant does not contain a container".
When I checked it in Domino Debugger I saw that error happened at the line contained following code:

......
if cstr(doc.getitemvalue("itemname")(0)) <> "" then '<---error here
       .....
end if
.....

Code looked pretty simple and completely correct and though this error message was familiar for me I couldn't get why it happened there. I understood what was wrong only after I found that particular document and checked what was in that item.

FTSearch "show results" field - cool thing

Hi

You could notice that FTSearch results can be displayed in different ways.
Sometimes with relevance line on the left, sometimes with document selection, sometimes without it.



Thursday, July 17, 2014

Corrupted unread list in Mail database caused "This database cannot be read due to an invalid on disk structure"

Hi

I believe every IBM Domino administrator worked on issues related to invalid structure of Notes database.
Sooner or later it happened.

There are many reasons, why it may happen:
- issues with Antivirus/Anti-spam/Backup software
- different issues with Richtext/MIME items
- issues with DXL export/import
- issues with missing NLO-files
- ....other reasons .....

Today I resolved such issue for a mail database.
It was caused by corrupted note with unread list.
I performed following steps:

Thursday, May 29, 2014

You can't have an empty item 'SecretEncryptionKeys' in NotesDocument if there is no encryption enabled field on form

Hello

Probably you know, that item "SecretEncryptionKeys" is used for keeping a list of secret keys which are used for document fields encryption. IBM Lotus Notes creates this item automatically if you enable encryption for any field and select secret key on the last tab of form properties window.


Recently I had to remove such encryption for one application that used it before.

IBM Lotus Notes and Ctrl+Break on new laptops without button "Pause/Break" on keyboard. Is it familiar to you? :-)

Hi guys.

Insane.
Couldn't stop lotusscript execution because I hadn't "Pause/Break" button on my HP Pavilion dv7 so I couldn't use Ctrl+Break. Shut downing of Notes processes all the time is also not the best option, especially in case if your script writes to database - all those consistency check afterwards, you know :-)

So, just to save your time, my solution is 'On-Screen Keyboard' inbuilt into Windows 8 (not sure about other Windows versions).

Just run cmd-command 'osk' and you should get it.

I love you