[jboss-user] [JBoss Portal] - Re: Servlet calling java:portal/UserModule

foongkim do-not-reply at jboss.com
Fri Mar 21 04:43:53 EDT 2008


yes, i got what you mean. this is my latest code change after i have also search the forum in here. BUt then another problem occur...

	Transaction transaction = null;
			Session session = null;
			SessionFactory identitySessionFactory = null;
			try
			{
				identitySessionFactory = (SessionFactory) new InitialContext().lookup("java:/portal/IdentitySessionFactory");
				session = identitySessionFactory.openSession();
				transaction = session.beginTransaction();

				UserModule userModule = (UserModule) new InitialContext().lookup("java:portal/UserModule");

				System.out.println("$$$$$$$$ " + userModule.findUserByUserName("admin"));
				//				User temp_user = userModule.findUserByUserName("foongkim");
				//				authenticateUser = temp_user.validatePassword(password);
			}
			catch (Exception e)

The NullPointerException throw to me. pointing to 
>> session = identitySessionFactory.openSession();

in my project,i have included the portlet-indentity-lib.jar which is from [JBOSS_HOME]/deploy/Jboss-portal.sar/lib

what else i missed out?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138248#4138248

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138248



More information about the jboss-user mailing list