• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

UserTransaction error in 0c4j

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using oc4j(Oracle 9i App Server).
I have a stateful bean and it has been deployed succesfully.
I get javax.transaction.UserTransaction when I try to access it.
Can any one please let me know how to over come this.
I have pasted the exception and the code.
Thanks in advance.
Cheers,
Moin
javax.naming.NameNotFoundException: javax.transaction.UserTransaction not found
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:121)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:182)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:63)
at javax.naming.InitialContext.lookup(Unknown Source)

The code is as follows:
----------------------
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.transaction.UserTransaction;
private SessionContext ctx;
UserTransaction usrTrx = null;
try{
//look up for UserTransaction
usrTrx = (UserTransaction)(new InitialContext()).lookup("javax.transaction.UserTransaction");
System.out.println("ImpMgrBean beginTrans usrTrx==>"+usrTrx);
} catch(javax.naming.NamingException ne){
ne.printStackTrace();
}
[ March 23, 2002: Message edited by: Moin Shariff ]
 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cold you check if the generated classes is there in your class path.That could be the reason.
Let me know if you still face problems.
Thanks,
Sandeep
 
reply
    Bookmark Topic Watch Topic
  • New Topic