Java servlet does not authenticate using user's LTPA token after R6 upgrade

Please repost of this document (07/20/05) for additional information.

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/9f419823633bfacd85257044004e04cf?OpenDocument

After upgrading a server to R6.5.4 and setting up Internet Site documents instead of Virtual Server docs, our servlet no longer functions as it had for years. I am having trouble finding any documentation mentioning a scenario like this.

Does anyone know what could be causing this issue? I have found a couple of docs in this forum mentioning problems like this, but no one ever responded with assistance, and the posting authors never returned to mention any resolutions they may have found…

The servlet creates a session using server = null, and the LTPA token the user is using.

In the past, this would work fine and the correct username would be printed on the console (as seen in code sample below). Currently, no errors are raised in the creation of the session, but when the username is printed to the console, it is returned as “anonymous”. This would explain why the servlet cannot see the documents that the user has access to, so I’m confident that this is the problem… but I cannot determine what has been done wrong.

Web Site documents exist.

Web SSO Configuration doc exists.

IIOP Site doc exists (for another process using a servlet that works fine - doesn’t use Ltpatoken).

SSO works fine for the user.

What could I be missing in the server setup or internet site documents that would differ from R5.0.x?

Has the ability to use a token in this fashion been altered?

Just for the heck of it, the relevant Java code is below.

Thanks to everyone bothering to read this!

Session s = createSession(server, token);

// CREATESESSION IS SHOWN INLINE (IN ITALICS) HERE FOR READABILITY

	private Session createSession(String server, String token) throws PEException {

		Session newSession = null;



		if ( server == null || server.equals( "" ) )

			server = null;

	

		if ( token == null || token.equals( "" ) )

			throw new PEException( "No user authentication supplied" );

	

		try {

			newSession = NotesFactory.createSession(server, token);

		}

		catch (NotesException e ) {

			System.out.println( "Error creating session: " + e.getMessage() );

		}

		catch (Exception e ) {

			System.out.println( "Error creating session: " + e.getMessage() );

		}

		return newSession;

	}

//END OF CREATESESSION

if ( s == null )

throw new PEException( "Null session returned (A)" );

userName = s.getUserName();

System.out.println( "Username: " + userName );

// Bring up the desired database

Database d = getDatabase(s, server, dbName);

if (d == null)

throw new PEException("Error opening database - database is null");

System.out.println("Database name: " + d.getFileName());

System.out.println("Is Database open: " + d.isOpen() );

// Get Project Setup and Suite Setup documents for current project

View vwProjects = d.getView( “(Initial Information\Projects)” );

//THE SERVLET CAN SEE THE DATABASE, AND DESIGN ELEMENTS IN THE DB JUST FINE.

System.out.println("View Aliases: " + vwProjects.getAliases() );

suiteSetupDoc = vwProjects.getDocumentByKey( “All”, true );

if ( projID == null || projID.equals( “” ) ) {

System.out.println( "No project id specified." );

projectSetupDoc = suiteSetupDoc;

}

else {

projectSetupDoc = vwProjects.getDocumentByKey( projID, true );

}

System.out.println("projID: " + projID); // KVF ADDITION 071505

// Check to make sure that both setup docs have been found

if ( suiteSetupDoc == null || projectSetupDoc == null )

//ERROR OCCURS HERE - NO DOCUMENTS ARE VISIBLE TO THE SERVLET

throw new PEException( "Project information not found." );

// Get Prefs document (either default or customized)

View vwPrefs = d.getView( “(PrefsLookup)” );

prefsDoc = vwPrefs.getDocumentByKey( “Prefs?” + projID, true );

// Check to make sure that Prefs document was found

if ( prefsDoc == null )

prefsDoc = projectSetupDoc;

System.out.println( "Project note id: " + projectSetupDoc.getNoteID() );

System.out.println( "Prefs note id: " + prefsDoc.getNoteID() );