We had the same problem when jndi.properties wasn't on the classpath... Once
we have fixed it, it went away.
Miroslav Halas
Software Architect
Compuware Corp.
15305 Dallas Parkway Suite 900
Addison, TX 75001
phone: 9720-960-0960
fax: 972-960-8489
email: [EMAIL PROTECTED]
-----Original Message-----
From: Philippe Coq [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 8:06 AM
To: G.C. Miller
Cc: [EMAIL PROTECTED]
Subject: Re: Transaction Help
"G.C. Miller" wrote:
>
> I am having trouble using transactions from jakarta-tomcat. I can access
> an EJB from jakarta-tomcat successfully when I am not inside a
> transaction, however if I try to create a User Transaction first I get the
> following stack trace.
>
> java.lang.ClassCastException
> at
>
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemo
teObject.java:296)
> at
> javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
> at com.sharkmail.controller.CTest.doIt(CTest.java:29)
> at
> com.sharkmail.controller.CMainServlet.doGet(CMainServlet.java:64)
> at
> com.sharkmail.controller.CMainServlet.doPost(CMainServlet.java:92)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
It seems that it is possible to get the UserTransaction object
in a servlet via Tomcat.
In the security sample that you can find in the Jonas release
there is the code of the servlet :
$JONAS_ROOT/examples/src/security/ejbSample/WEB-INF/classes/ServletOP.java
in which we do
UserTransaction utx = null;
try {
utx = (UserTransaction)
PortableRemoteObject.narrow(initialContext.lookup("javax.transaction.UserTra
nsaction"),
UserTransaction.class);
} catch (Exception e) {
when we follow instruction that you will find in the
$JONAS_ROOT/examples/src/security/README
we have no problem to run this example that use Tomcat & JOnAS.
Best regards,
--
Philippe
Philippe Coq Evidian Phone: (33) 04 76 29 78 49
Bull S.A - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".