Okay, that looks like a client side report of an exception that
happened on the server - see how it refers to a ServerException?  If you
look on the server side, you may be able to produce the exception on the
server that produced this.  Again, from the look of it, it's a
ClassCastException in your bean code.  If you can find a stack trace for
that, we're in business.
        So, if there's a stack trace on the server side, let's look at
it.  If not, try to figure out exactly what method is generating this
exception (based on what the client is calling - perhaps ejbCreate,
ejbPostCreate, a business method, etc.), and put a try/catch around it to
dump the real exception.

Aaron

On Mon, 2 Oct 2000, Eoin Lane wrote:
> Here is a fuller version of the stack trace 'm getting
> 
> 
> C:\apache\projects\bootcamp\classes>run
> 
> C:\apache\projects\bootcamp\classes>java -classpath
> ..\lib\ejb.jar;..\lib\jboss-
> client.jar;..\lib\jndi.jar;..\lib\jnp-client.jar;..\lib\jta-spec1_0_1.jar;..
> \lib
> \junit.jar;. test.valtech.bootcamp.carRental.service.reservationAgent.Test
> Test Errorjava.rmi.ServerException: RemoteException occurred in server
> thread; n
> ested exception is:
>         java.rmi.ServerException: Exception
> occurred:com.valtech.bootcamp.carRen
> tal.business.reservation.ReservationHome
> java.rmi.ServerException: Exception
> occurred:com.valtech.bootcamp.carRental.busi
> ness.reservation.ReservationHome
>         at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
> n Source)
>         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
>         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
>         at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Un
> known Source)
>         at
> org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(St
> atelessSessionProxy.java:164)
>         at $Proxy1.setReservation(Unknown Source)
>         at
> test.valtech.bootcamp.carRental.service.reservationAgent.Test.main(Te
> st.java:44)
> 
> C:\apache\projects\bootcamp\classes>
> 
> 
> 
> 
> -----Original Message-----
> From: Aaron Mulder [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 02, 2000 5:46 PM
> To: jBoss
> Cc: All@jaba
> Subject: Re: [jBoss-User] Problems with session beans calling entity
> beans
> 
> 
>       First, I'm afraid we're going to need much more of the server
> output than you provided.  It would be simplest to dump it all, but
> certainly the entire stack trace for any exceptions would be helpful.
>       Also, as for MalformedURLExceptions, we see things like that
> when you deploy on Windows into a directory with spaces in the name.  Have
> you done that here?  If so, please try again in a directory without
> spaces.  We're working on the problem now.
>       The exception you do quote looks like a ClassCastException (that's
> usually the kind that prints a class name to the console).  Did you
> perhaps try to look up a CustomerBean with the JNDI name of the
> ReservationBean instead?  Could you provide the exact source code that
> corresponds to the exceptions you're seeing?
> 
> Thanks,
>       Aaron
> 
> On Mon, 2 Oct 2000, Eoin Lane wrote:
> > Hello all,
> > 
> > I have been manging a group of bootcamp people here, where I work, in a
> > effort to produce a 
> > open sourse project showing how EJBs can be intergrated with an XML
> > publishing framework.
> >  We decided to use Jboss to deploy 
> > our EJB (it also invloves intergrating Tomcat and Cocoon and will be
> > deployed on a Linux machine (mandrake 7.1). 
> > It involves one stateless session (ReservationBean) ejb
> >  and two entity beans CustomerBean and ReservationBean EJBs (both of them
> > CMPs)
> > We tested each bean from a a dos client using 1.1 complient calling
> > mechanism and each bean passed the test. However
> > when we deployed the beans together in a container with a session bean
> > calling a entity beans we ran in difficulty.
> > Below find a detailed description of the problem.
> > 
> > We will to release this code to both jBoss and Apache in a open source
> > project. I will be working 
> > on this project persoanlly 
> > for the next three week and would appricate anyones invlovement. It will
> > eventually be published 
> > as a paper and presented 
> > at the XML One conference here in London on the 19th of this Month
> > 
> > The sourse code can be downloaded from freedrive
> >
> http://www.freedrive.com/FDhome.htm?username=eoinlane&LoginText=Your%20FreeD
> > rive%20Account%20has%20already%20been%20activated!%20%20PPlease%20Login.
> > using the 
> > usename: eoinlane
> > and password: bishop 
> > 
> > The file is call bootcamp.zip.
> >  We will soon setup a CVS directory here on our developmant machine.
> > Also find attached the error we where getting.
> > 
> > The dos test can be found in the classes directory it is called run.bat.
> > The entire project can be built with ant using the build file in the src
> > directory. Run "ant jar" if you want it to build the jar files as well, 
> > these jars will be put in the the corrosponding directory under dep-jboss
> > 
> > Eoin.
> > 
> > 
> > Project Description
> > -------------------
> > 
> > This project required that we create two Container Managed Entity Beans
> > that were deployed into JBoss and a Stateless Session Bean to deal with
> the
> > Use Cases.
> > 
> > The two Entity Beans were deployed in a single JAR file and the Session
> Bean
> > deployed in
> > a different JAR file.  The two beans were deployed into the same JBoss
> > container.  The
> > idea behind the different JAR files was that they may be moved to
> containers
> > on different
> > machines in the future.
> > 
> > Test classes were developed to act as the client.
> > 
> > The Problem
> > -----------
> > 
> > The first test case was to to talk directly to the Entity Beans in a JBoss
> > container
> > running on the local machine.  All of these tests were completed
> > successfully.
> > 
> > The second test case was to talk to the Session Bean in a JBoss container
> > running
> > on the local machine.  This test failed, the functionality of the Session
> > bean is derived from
> > the Entity beans as it calls the methods on them. It fails with the 'No
> > protocol' and 'MalformedURL'
> > exception.
> > 
> > The third test was to deploy the Entity Beans and the Session Bean into
> the
> > same JBoss
> > container in different JAR files.  Then talk to the Session Bean and have
> it
> > deal with
> > the communication with the Entity Beans.  This is where the problems
> started
> > ...
> > 
> > The method that we used for lookups was originally 1.1 compliant
> > (PortableRemoteObject etc.),
> > this was fine for calls from the client to the container, however we were
> > not able to
> > connect from the Session Bean to the Entity Bean in this manner.  The
> errors
> > reported
> > were 'MalformedURL' and 'NullPointer' exceptions.
> > 
> > Example of Lookup:
> > 
> >     CustomerHome custHome =
> > (CustomerHome)PortableRemoteObject.narrow(initial.lookup(
> >                             "CustomerBean"), CustomerHome.class);   
> > 
> > 
> > We then used 1.0 lookups (JRMP stlye) for all calls originating from
> inside
> > the container.  We
> > did not feel we needed to change the calls from the client as these had
> been
> > unit tested and worked.
> > 
> > This made no difference and we continued to get the 'MalformedURL' and
> > 'NullPointer' exceptions.
> > 
> > Example of new Lookup:
> > 
> >     CustomerHome custHome =
> > (CustomerHome)initial.lookup("CustomerBean"); 
> >     
> > Our final option was to bundle the Entity Beans and the Session Bean into
> > the same
> > JAR file.  Again we tried this with 1.0 and 1.1 lookups, the problem
> > continued ....
> > 
> > 
> > 
> > 
> > 
> > Error Msg:
> > 
> > [Container factory] Loading ejb-jar.xml :
> > jar:file:/C:/apache/jBoss-2.0_BETA_PRO
> > D_01/tmp/deploy/tmpejbjar36988.jar!/META-INF/ejb-jar.xml
> > [Container factory] Loading standardjboss.xml :
> > jar:file:/C:/apache/jBoss-2.0_BE
> > TA_PROD_01/lib/ext/jboss.jar!/org/jboss/metadata/standardjboss.xml
> > [Verifier] Verifying
> > file:/C:/apache/jBoss-2.0_BETA_PROD_01/tmp/deploy/tmpejbjar
> > 36988.jar
> > [Verifier] CustomerBean: Verified.
> > [Verifier] ReservationBean: Verified.
> > [Container factory] Deploying CustomerBean
> > [Container factory] Container Invoker Optimize='false'
> > [Container factory] Deploying ReservationBean
> > [Container factory] Container Invoker Optimize='false'
> > [JAWS] Initializing JAWS plugin for CustomerBean
> > [JAWS] Loading standardjaws.xml :
> > jar:file:/C:/apache/jBoss-2.0_BETA_PROD_01/lib
> > /ext/jboss.jar!/org/jboss/ejb/plugins/jaws/metadata/standardjaws.xml
> > [JAWS]
> > jar:file:/C:/apache/jBoss-2.0_BETA_PROD_01/tmp/deploy/tmpejbjar36988.jar!
> > /META-INF/jaws.xml found. Overriding defaults
> > [JAWS] Table CustomerBean created
> > [JAWS] Initializing JAWS plugin for ReservationBean
> > [JAWS] Table ReservationBean created
> > [Container factory] Bound CustomerBean to CustomerBean
> > [Container factory] Bound ReservationBean to ReservationBean
> > [Container factory] Deployed application:
> > file:/C:/apache/jBoss-2.0_BETA_PROD_01
> > /deploy/business.jar
> > [Default] JRMPCI:invokeHome create
> > [Default] Tx is null
> > [ReservationAgentBean] TX_REQUIRED for create
> > [ReservationAgentBean] begin tx
> > [ReservationAgentBean] commit tx 0
> > [ReservationAgentBean] TX_REQUIRED for setReservation
> > [ReservationAgentBean] begin tx
> > [ReservationAgentBean] rollback tx 1
> > [ReservationAgentBean] Exception
> > occurred:com.valtech.bootcamp.carRental.busines
> > s.reservation.ReservationHome
> > 
> > 
> > DISCLAIMER: This e-mail contains proprietary information some or all of
> > which may be legally privileged. It is for the intended recipient only. If
> > an addressing or transmission error has misdirected this e-mail, please
> > notify the author by replying to this e-mail. If you are not the intended
> > recipient you must not disclose, distribute, copy, print, or rely on this
> > e-mail.
> > All information contained within this e-mail is subject to the Terms &
> > Conditions of Valtech Ltd. which are available upon request.
> > 
> > 
> > 
> > 
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
> > 
> 
> 
> DISCLAIMER: This e-mail contains proprietary information some or all of
> which may be legally privileged. It is for the intended recipient only. If
> an addressing or transmission error has misdirected this e-mail, please
> notify the author by replying to this e-mail. If you are not the intended
> recipient you must not disclose, distribute, copy, print, or rely on this
> e-mail.
> All information contained within this e-mail is subject to the Terms &
> Conditions of Valtech Ltd. which are available upon request.
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to