Is there a better solution to this? By the way can you give the URL
prashant?

 -----Original Message-----
From:   A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]  On Behalf Of umesh sonavane
Sent:   Monday, December 04, 2000 2:10 PM
To:     [EMAIL PROTECTED]
Subject:        Re: Database Triggers & EJB

prashant
you can use counter Entity Bean provided by the Orion which is available on
Orion site
you can use counter Entity Bean for generating primary key and then pass
this value in your create statement



----- Original Message -----
From: Prashant Atgur <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 02, 2000 9:12 AM
Subject: Database Triggers & EJB


> Hi all
>   We are using the CMP for our beans & we need to create a unique ID
> (primary key ) for each row in a table. We have written a trigger in the
> database ( Oracle 8i ) which creates this unique ID before inserting a new
> record in the database.
>
> I am not assigning a value to the primary key in the ejbCreate method.
>
> When I try to call a create method on my entity bean through client code I
> am getting following error
>
> Sat Jul 01 18:19:39 GMT+05:30 2000:<I> <ServletContext-General>
> ProductClient: init
> Error occured java.rmi.UnexpectedException: Unexpected exception in
> examples.market.ProductBean.create():
> java.lang.NullPointerException   at
> examples.market.ProductPK.hashCode(ProductPK.java:30)
>         at com.sun.java.util.collections.HashMap.get(HashMap.java,
Compiled
> Code)
>         at
>
com.sun.java.util.collections.Collections$SynchronizedMap.get(Collections.ja
> va, Compiled Code)
>
>
>
> We are using Weblogic 5.1 app server & Oracle 8i
> ProductBean is the name of our bean
> ProductPK is the primary key
>
> Has anybody has done this before ? Can anybody pls help me finding the
> solution ? What are other possible ways ?
>
> Thanks in advance.
> -Prashant Atgur
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  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 "signoff EJB-INTEREST".  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 "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to