The server must allow database browsing. It is not required for native Java/LotusScript calls, but DIIOP calls must have it. It's not a very good idea to enable database browsing on Internet-accessible sites, as web users will be able to see what databases exist on the server (or so it was at least in version 4). Not sure if releases 5/6/7/8 has modified the behaviour for this property.
Search for "getFirstDatabase" on page: http://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/