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

foongkim do-not-reply at jboss.com
Fri Mar 21 03:23:57 EDT 2008

Hi there, i have one portal running on Jboss and one is the servlet. In my servlet, i will required to call the usertable in JBP_USer to verify the user registered already or not?

Thus, below is part of the coding...

					UserModule userModule = (UserModule) new InitialContext().lookup("java:portal/UserModule");
					User temp_user = userModule.findUserByUserName(username);
					authenticateUser = temp_user.validatePassword(password);

				catch (Exception e)

I have not problem on loading the JNDI UserModule. But once i call the findUserByUseName(), i was thrown an error:
org.hibernate.HibernateException: Unable to locate current JTA transaction
	at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
	at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
	at org.jboss.portal.identity.db.HibernateUserModuleImpl.getCurrentSession(HibernateUserModuleImpl.java:298)
	at org.jboss.portal.identity.db.HibernateUserModuleImpl.findUserByUserName(HibernateUserModuleImpl.java:90)
	at my.mimos.servlet.ProfileSendServlet.doGet(ProfileSendServlet.java:96)

SO, basically if i understand correctly, it's pointing to me can not load the user transaction. Can you help  me or suggest any solution to me?

thank you

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

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

More information about the jboss-user mailing list