[jboss-user] [JBoss Portal] - Re: UserModule via JNDI

thanvi do-not-reply at jboss.com
Mon Dec 18 05:07:36 EST 2006


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=3994588#3994588

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



More information about the jboss-user mailing list