Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  IBM Sametime Forum

IBM Sametime Forum

developerWorks

  

PreviousPrevious NextNext


Javier Kohen 21.Jan.05 08:47 PM a Web browser
Deverloper Toolkits 6.5.1 All Platforms


After upgrading from 3.1 I started getting a NPE in Sametime's code whenever I try to login with an incorrect username/password.

I'm including a slightly modified version of LoginApplet.java (actually not an Applet anymore) to test the issue. You should get the following backtrace:
java.lang.NullPointerException
at com.lotus.sametime.core.util.connection.Connection.sendMessage(Connection.java)
at com.lotus.sametime.core.util.connection.j.a(RC2Sender.java)
at com.lotus.sametime.core.util.connection.j.a(RC2Sender.java)
at com.lotus.sametime.core.util.connection.f.j(Unknown Source)
at com.lotus.sametime.core.util.connection.f.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)

I can reproduce this with both Java 1.4.2_06 and Java 1.5.0_01 on Linux/i386. I haven't tried other combinations. Of course the username and password must be invalid, so make sure the login fails when testing (it fails with the hardcoded username/password in my example as of this moment).

Run from command-line with Sametime's 6.5.1 STComm.jar and CommRes.jar in the class path. Note that it can also be reproduced without loading the GUI components. My computer has a direct Internet connection; in other words, this fails with DirectSocketConnection (as far as I can tell).


import java.awt.*;
import java.util.*;

import com.lotus.sametime.core.comparch.STSession;
import com.lotus.sametime.core.comparch.DuplicateObjectException;
import com.lotus.sametime.community.*;

/**
* Sample applet that logs in to a Sametime server.
*/
public class LoginApplet implements LoginListener
{
public static void main(String[] args) {
new LoginApplet().init();
try {
Thread.sleep(60000);
} catch (InterruptedException e) {
return;
}
}

private STSession m_session;
private CommunityService m_comm;
private String m_currentStatus = "Logged Out";

/**
* Applet initialized. Create the session, load all components,
* start the session and then login.
*/
public void init()
{
try
{
m_session = new STSession("LoginApplet " + this);
m_session.loadAllComponents();
m_session.start();
login();
}
catch(DuplicateObjectException e)
{
e.printStackTrace();
}
}

/**
* Login to the community using the user name and password
* parameters from the html.
*/
private void login()
{
m_comm = (CommunityService)
m_session.getCompApi(CommunityService.COMP_NAME);
m_comm.addLoginListener(this);
m_comm.setLoginType(CommunityService.LT_USER_JAVA_APP);
m_comm.loginByPassword("stdemo3.dfw.ibm.com",
"uaueaou",
"ueoauoeu");
}

/**
* Logged in event. Print logged in msg to console & applet.
*/
public void loggedIn(LoginEvent event)
{
System.out.println("Logged In");
m_currentStatus = "Logged In";
}

/**
* Logged out event. Print logged out msg to console & applet.
* Leave default behavior which will display a dialog box.
*/
public void loggedOut(LoginEvent event)
{
System.out.println("Logged Out");
m_currentStatus = "Logged Out";
}

/**
* Applet destroyed. Logout, stop and unload the session.
*/
public void destroy()
{
m_comm.logout();
m_session.stop();
m_session.unloadSession();
}
}






NullPointerException when login fai... (Javier Kohen 21.Jan.05)
. . RE: NullPointerException when login... (Matt Orsom 29.Dec.05)
. . . . RE: NullPointerException when login... (Javier Kohen 30.Dec.05)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite