Hi

I am tryign to connect to UserModule using the JNDI  anme /portal/UserModule. 
Its throwing the excpetion.

I need to connect to userModule from my plain java class. How to go about it.

I have tried the followig
UserModule mod = (UserModule) new 
InitialContext().lookup("java:/portal/UserModule");

It gives the following 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:541)
        at 
org.jboss.portal.identity.db.UserModuleImpl.getCurrentSession(UserModuleImpl.java:327)
        at 
org.jboss.portal.identity.db.UserModuleImpl.getUserCount(UserModuleImpl.java:304)
        at com.reuters.lipper.dwr.UserDAO.countUsers(UserDAO.java:49)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
        at 
uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
        at 
uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81)
        

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

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

Reply via email to