guys, problem solved. 

the NULL Pointer is because in my eclipse project, i have included the 
hibernate3.jar and it's seems its crashed with the hibernate3.jar inside the 
JBoss app server. 

after i have removed the hibernate in my project (as i will use the JBoss), 
everything is working fine means i can pull the information from the portal 
user. 

Below is the complete code.

SessionFactory identitySessionFactory = null;
                Session session = null;
                Transaction transaction = 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");
                        User temp_user = 
userModule.findUserByUserName(username);
                        authenticateUser = temp_user.validatePassword(password);
                        session.clear();

                }
                catch (Exception e)
                {
                        e.printStackTrace();
                }
                finally
                {
                        if (transaction != null)
                                transaction.commit();
                        if (session != null)
                                session.close();
                }

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138422
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to