Hi,
First af all, thank you for this bug report.
You can work around this bug by not listed the javax.ejb.EJBException
in the throws clauses of the methods (interface and bean).
Notice that the Enterprise JavaBeans Specification v.1.1 (& 12.2.2 p.
189)
and the Enterprise JavaBEans Specification (& 18.2.2 p. 374) say:
"Note that the javax.ejb.EJBException is a subclass of the
java.lang.RuntimeException, and therefore it does not have to be
listed
in the throws clauses of the bussiness method."
Kind regards.
H�l�ne.
Mike Friesen wrote:
>
> I found what the problem was, it was the order of catching exceptions.
> The catching of the java.lang.RuntimeException must be after the
> javax.ejb.EJBException, because EJBException extends RuntimeException. I
> fixed the problem by modifying
> org.objectweb.jeremie.tools.jrmic.OptStubCompiler.java in Jonathan_2_0_1.
> I moved the catching of the RuntimeException, after EJBException (line
> 265,266 to 291,292).
>
> Mike
>
> On Thu, 31 May 2001, [iso-8859-1] H�l�ne JOANIN wrote:
>
> >
> >
> > Hi Mike,
> >
> > Could you, please, send us
> > - the home interface
> > - the remote interface
> > - the class
> > of your enterprise bean, and
> > - the sources of the classes generated by GenIC
> > (use -keepgenerated option of GenIC)
> > to help us to understand the problem.
> >
> > Kind regards.
> > H�l�ne.
> >
> > Mike Friesen wrote:
> > >
> > > I have several beans that compile fine with RMI_jonas.jar, however when I
> > > try to use JEREMIE_jonas.jar I get the following error.
> > >
> > > com/ods/server/ejb/dataview/JOnASDataViewHome_Stub.java:57: exception
> > > javax.ejb.EJBException has already been caught
> > > } catch (javax.ejb.EJBException f) {
> > > ^
> > > 1 error
> > > GenIC ERROR: Failed when compiling the implementation classes via 'java
> > > org.objectweb.jeremie.tools.jrmic.JRMICompiler -opt '
> > >
> > > The GenIC line that is fails on is marked below. Anyone have any
> > > ideas/suggestions?
> > >
> > > Mike
> > >
> > > public com.ods.server.ejb.dataview.DataView create()
> > > throws javax.ejb.CreateException, javax.ejb.EJBException,
> > > java.rmi.RemoteException {
> > > try {
> > > JRMIOptRef optref = (JRMIOptRef) ref;
> > > Marshaller marshaller = optref.request();
> > > ReplyInterface reply =
> > > optref.prepareInvocation(marshaller);
> > > marshaller.writeInt(0);
> > > optref.invoke(marshaller);
> > > UnMarshaller unmarshaller = reply.listen();
> > > com.ods.server.ejb.dataview.DataView result =
> > > (com.ods.server.ejb.dataview.DataView)
> > > unmarshaller.readReference();
> > > unmarshaller.close();
> > > return result;
> > > } catch
> > > (org.objectweb.jonathan.apis.protocols.ServerException e) {
> > > UnMarshaller unmarshaller = e.unmarshaller;
> > > Exception excep;
> > > try {
> > > excep = (Exception)
> > > unmarshaller.readReference();
> > > unmarshaller.close();
> > > throw excep;
> > > } catch
> > > (org.objectweb.jonathan.apis.kernel.JonathanException f) {
> > > throw new java.rmi.MarshalException
> > > ("error during exception
> > > unmarshalling by stub", f);
> > > } catch (java.lang.RuntimeException f) {
> > > throw f;
> > > } catch (javax.ejb.CreateException f) {
> > > throw f;
> > > FAILS HERE --> } catch (javax.ejb.EJBException f) {
> > > throw f;
> > > } catch (java.rmi.RemoteException f) {
> > > throw f;
> > > } catch (java.lang.Exception f) {
> > > throw new java.rmi.UnexpectedException
> > > ("undeclared checked exception",
> > > f);
> > > }
> > > } catch (java.lang.Exception e) {
> > > throw new java.rmi.MarshalException
> > > ("error during marshalling/unmarshalling
> > > by stub", e);
> > > }
> > > } A
> > >
> > > ----
> > > 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".
> >
> > --
> > -=- H�l�ne JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> > mailto:[EMAIL PROTECTED] http://www.evidian.com
> > Phone: 33.4.76.29.73.53 Fax: 33.4.76.29.76.00
> > Download our EJB Server JOnAS 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".
> >
--
-=- H�l�ne JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
mailto:[EMAIL PROTECTED] http://www.evidian.com
Phone: 33.4.76.29.73.53 Fax: 33.4.76.29.76.00
Download our EJB Server JOnAS 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".