Hey John,
I see that you're using jdk 1.2.2 invokers (and I think you're using jdk
1.2.2); I think that PortableRemoteObject has been moved to core JDK only
with 1.3, so your problem seems that you cannot find the
PortableRemoteObject class. Is this your case ? If so, you'll maybe need to
add javax.rmi package for jdk 1.2.2 to your classpath.
The rollback is a natural consequence of an application exception thrown:
you don't want to commit what you have only partially done before the
exception throw. So the container rollbacks the transaction.
HTH,
Simon
> BTW: It appears to break on the line....
>
> EmployerHome employerHome = (EmployerHome)
> PortableRemoteObject.narrow(ref,
> EmployerHome.class);
>
> What would cause the transaction to roll back????
>
> -John
>
> -----Original Message-----
> From: John Pericos [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 14 December 2000 9:21 a.m.
> To: 'jBoss Developer'
> Subject: [jBoss-Dev] Transaction rolled
> back:javax/rmi/PortableRemoteObject ?!!?!?
>
>
> Hi,
>
> I have a prob with Jboss. I'm executing a session bean from a
> servlet in
> Resin. The
> session bean itself fetchs a entity bean like so:
>
>
>
> public String fetchEmployer(String id)
> {
> System.out.println ("Someone called `fetchEmployer!'");
> String employerDetails = "";
> int employerID = new Integer(id.trim()).intValue();
> System.setProperty("java.naming.factory.initial",
> "org.jnp.interfaces.NamingContextFactory");
> System.setProperty("java.naming.provider.url",
> "localhost:1099");
> try {
> // Get context from EJBserver
> InitialContext jndiContext = new InitialContext();
> // Get the home interface
> Object ref = jndiContext.lookup("Employer");
> EmployerHome employerHome = (EmployerHome)
> PortableRemoteObject.narrow(ref, EmployerHome.class);
> System.out.println ("Got home of Employer...");
> EmployerRemote employer = employerHome.findByPrimaryKey( new
> EmployerPK( employerID ) );
> System.out.println ("Got remote of Employer...");
> employerDetails = employer.getDetails();
>
> } catch(Exception e) {
> System.out.println(e.toString());
> }
> System.out.println ("Returning string...");
> return employerDetails;
> }
>
> And i get this sort of error....
>
>
> java.rmi.ServerException: RemoteException occurred in server
> thread; nested
> exception is:
> java.rmi.ServerException: Transaction rolled
> back:javax/rmi/PortableRemoteObject
> java.rmi.ServerException: Transaction rolled
> back:javax/rmi/PortableRemoteObject
> at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer
> (StreamRemoteC
> all.java:245)
> at
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCal
> l.java:220)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
> at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.in
> voke(Unknown
> Source)
> at
> org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.in
> voke(Stateless
> SessionProxy.java:175)
> at
> org.jboss.proxy.ProxyCompiler$Runtime.invoke(ProxyCompiler.java:74)
> at
> org.adv.test.EmployerLibraryRemote$Proxy.fetchEmployer(Unknown
> Source)
> at JBossServlet.doGet(JBossServlet.java:59)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:102)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:83)
> at
> com.caucho.server.http.AbstractRequest.service(AbstractRequest
> .java:452)
> at
> com.caucho.server.http.AbstractRequest.service(AbstractRequest
> .java:395)
> at
> com.caucho.server.http.PageCache$Entry.service(PageCache.java:256)
> at
> com.caucho.server.http.PageCache.service(PageCache.java:105)
> at
> com.caucho.server.http.VirtualHost.service(VirtualHost.java:424)
> at com.caucho.server.http.Request.dispatch(Request.java:212)
> at
> com.caucho.server.http.RunnerRequest.handleRequest(RunnerReque
> st.java:313)
> at
> com.caucho.server.http.RunnerRequest.handleConnection(RunnerRe
> quest.java:260
> )
> at com.caucho.server.TcpConnection.run(TcpConnection.java:142)
> at java.lang.Thread.run(Thread.java:475)
>
>
> Any ideas or suggestions????
>
> Thanks
>
> -John
>