Hi Michael,
You find a bug in JOnAS.
There is effectively a problem when the ejbCreate() method bean
throw an CreateException (idem with an application exception).
To follow....
Kind regards.
H�l�ne.
Michael Fuchs wrote:
>
> Hello,
>
> after downloading Jonas 2.1 I have trouble throwing CreateExceptions out
> of CMP Beans.
> The result is always a NullPointerException in the ejbStore method of
> the corresponding JOnAS*Bean class, because the variable pk is null.
> The ejbStore method is called from The JOnAS*Home create method. The
> Problem seems to be the postinvoke method in the finally clause.
>
> public com.dts.global.language.Language create(java.lang.String p1,
> java.util.HashMap p2) throws javax.ejb.CreateException,
> java.rmi.RemoteException {
> Trace.outln(Trace.DB_15,
> "JOnAScom_dts_global_language_LanguageHome.create(java.lang.String,
> java.util.HashMap)");
> JOnAScom_dts_global_language_LanguageRemote ejbobj = null;
>
> com.dts.global.language.JOnAScom_dts_global_language_LanguageBean eb =
> null;
> String methodSignature = "null" ;
> RequestCtx rctx = preinvoke(2, methodSignature) ;
> EntityContextImpl ctx = null;
> com.dts.global.language.LanguagePK pk;
> try {
> ejbobj = new
> JOnAScom_dts_global_language_LanguageRemote(this);
> ctx = ejbobj.getNewContext();
> rctx.setEJBContext(ctx);
> eb =
> (com.dts.global.language.JOnAScom_dts_global_language_LanguageBean)ctx.getInstance();
>
> // Here the CreateException is thrown. So pk is null
> -> pk = (com.dts.global.language.LanguagePK)eb.ejbCreate(p1,
> p2);
> ejbobj.setPrimaryKey(pk);
> putEJBObject(ejbobj);
> eb.ejbPostCreate(p1, p2);
> } catch (RuntimeException e) {
> rctx.setSysExc(e);
> throw new RemoteException("RuntimeException thrown by an
> enterprise Bean", e);
> } catch (Error e) {
> rctx.setSysExc(e);
> throw new RemoteException("Error thrown by an enterprise
> Bean", e);
> } catch (RemoteException e) {
> rctx.setSysExc(e);
> throw e;
> } finally {
>
> // In this Method pk is used and I get a NullPointerException
> -> postinvoke(rctx);
> }
> return(ejbobj);
> }
>
> Thanks a lot for making JOnAS
>
> Bye
>
> --
> ______________________________________________________________________
>
> Michael Fuchs
> EMail: [EMAIL PROTECTED]
> Telefon: 089/54754471
> Mobil: 0171/5620706
>
> ----
> 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".