What's wrong with this code?

package moves.ejb;

// Java core packages

import java.text.ParseException;

import java.util.*;

import java.text.DateFormat;

import java.rmi.RemoteException;

// Java extension packages

import javax.ejb.*;

import javax.naming.*;

import javax.rmi.PortableRemoteObject;

// Moves.com packages

import moves.model.*;

/**

* This is the bean class for the OrdersEJB enterprise bean.

* Created Aug 3, 2006 11:26:24 AM

*

* @author Sawamura

*/

publicabstractclass OrdersEJBimplements EntityBean, OrdersLocalBusiness{

private EntityContext context;

private DateFormat dateFormat;

publicvoid setEntityContext(EntityContext aContext){

context = aContext;

dateFormat = DateFormat.getDateTimeInstance(

DateFormat.FULL, DateFormat.SHORT, Locale.US );

}

publicvoid ejbActivate(){

setOrderID(( Integer ) context.getPrimaryKey());

}

publicvoid ejbPassivate(){

setOrderID(null);

}

publicvoid ejbRemove(){

}

publicvoid unsetEntityContext(){

context =null;

}

publicvoid ejbLoad(){

}

publicvoid ejbStore(){

}

// set shipped flag

publicvoid setFlag(boolean flag){

setSent(flag);

}

// get sent flag

publicboolean isSent(){

return getSent();

}

publicabstract Integer getCustomerID();

publicabstractvoid setCustomerID(Integer customerID);

publicabstract String getOrderDate();

publicabstractvoid setOrderDate(String orderDate);

publicabstract Integer getOrderID();

publicabstractvoid setOrderID(Integer orderID);

publicabstract String getTrxId();

publicabstractvoid setTrxId(String trxId);

publicabstract String getTrxDate();

publicabstractvoid setTrxDate(String trxDate);

publicabstractboolean getSent();

publicabstractvoid setSent(boolean sent);

publicabstract String getMsisdn();

publicabstractvoid setMsisdn(String msisdn);

// create new Order EJB using given OrderModel and msisdn

public Integer ejbCreate( OrderModel order, String msisdn )

throws CreateException, FinderException{

// retrieve unique value for primary key of this

// Order using SequenceFactory EJB

// find sequence for CustomerOrder table

SequencefactoryLocalHome sequencefactoryLocalHome =

lookupSequencefactoryLocal();

SequencefactoryLocal sequencefactoryLocal =

sequencefactoryLocalHome.findByPrimaryKey("CustomerOrders" );

// get next unique orderID

setOrderID(sequencefactoryLocal.getNextMoreID());

// get date, sent flag and list of

// OrderProduct from provided OrderModel

setOrderDate(dateFormat.format( order.getOrderDate() ));

setSent(order.getSent());

setTrxId(order.getTrx_id());

setTrxDate(order.getTrx_date());

setMsisdn(order.getMsisdn());

// get OrderProductModels that comprise OrderModel

Collection orderProductModels = order.getOrderProductModels();

// create OrderProduct EJBs for each Product in

// Order to keep track of quantity

OrderproductLocalHome orderproductLocalHome =

lookupOrderproductLocal();

Iterator iterator = orderProductModels.iterator();

// create an OrderProduct EJB with Product's

// MovieID, quantity and orderID for this Order

while ( iterator.hasNext() ){

OrderProductModel orderProductModel = ( OrderProductModel )

iterator.next();

// set orderID for OrderProduct record

orderProductModel.setOrderID( getOrderID() );

// create OrderProduct EJB instance

orderproductLocalHome.create( orderProductModel );

}

CustomerLocalHome customerLocalHome = lookupCustomerLocal();

// use provided msisdn to find Customer

CustomerLocal customerLocal =

customerLocalHome.findByMsisdn(getMsisdn());

setCustomerID(( Integer ) customerLocal.getPrimaryKey());

returnnull;

}

publicvoid ejbPostCreate(OrderModel order, String msisdn){

}

// get Order details as OrderModel

public OrderModel getOrderModel()throws EJBException, FinderException{

// construct new OrderModel

OrderModel orderModel =new OrderModel();

// look up OrderProduct EJB to retrieve list

// of Products contained in the Order

// populate OrderModel data members with data from Order

orderModel.setOrderID( getOrderID() );

try{

orderModel.setOrderDate( dateFormat.parse( getOrderDate() ) );

}catch (ParseException ex){

ex.printStackTrace();

}

orderModel.setSent( getSent() );

orderModel.setTrx_id( getTrxId() );

orderModel.setTrx_date( getTrxDate() );

// get OrderProduct records for Order

OrderproductHome orderproductHome = lookupOrderproduct();

try{

Collection orderproducts =

orderproductHome.findByOrderID(getOrderID());

Iterator iterator = orderproducts.iterator();

// OrderProductModels to place in OrderModel

Collection orderProductModels =new ArrayList();

// get OrderProductModel for each Product in Order

while ( iterator.hasNext() ){

Orderproduct orderproduct = ( Orderproduct )

PortableRemoteObject.narrow( iterator.next(), Orderproduct.class

);

// get OrderProductModel for OrderProduct record

OrderProductModel orderProductModel =

orderproduct.getOrderProductModel();

// add OrderProductModel to list of

// OrderProductModels in the Order

orderProductModels.add( orderProductModel );

}

// add Collection of OrderProductModels to OrderModel

orderModel.setOrderProductModels( orderProductModels );

}catch (RemoteException ex){

ex.printStackTrace();

}

return orderModel;

}

private SequencefactoryLocalHome lookupSequencefactoryLocal(){

try{

Context c =new InitialContext();

SequencefactoryLocalHome rv = (SequencefactoryLocalHome) c.lookup(

"java:comp/env/ejb/SequencefactoryLocal");

return rv;

}

catch(NamingException ne){

java.util.logging.Logger.getLogger(getClass().getName()).log(

java.util.logging.Level.SEVERE,"exception caught" ,ne);

thrownew RuntimeException(ne);

}

}

private OrderproductLocalHome lookupOrderproductLocal(){

try{

Context c =new InitialContext();

OrderproductLocalHome rv = (OrderproductLocalHome) c.lookup(

"java:comp/env/ejb/OrderproductLocal");

return rv;

}

catch(NamingException ne){

java.util.logging.Logger.getLogger(getClass().getName()).log(

java.util.logging.Level.SEVERE,"exception caught" ,ne);

thrownew RuntimeException(ne);

}

}

private CustomerLocalHome lookupCustomerLocal(){

try{

Context c =new InitialContext();

CustomerLocalHome rv = (CustomerLocalHome) c.lookup(

"java:comp/env/ejb/CustomerLocal");

return rv;

}

catch(NamingException ne){

java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);

thrownew RuntimeException(ne);

}

}

private OrderproductHome lookupOrderproduct(){

try{

Context c =new InitialContext();

Object remote = c.lookup("java:comp/env/ejb/Orderproduct");

OrderproductHome rv = (OrderproductHome)

PortableRemoteObject.narrow(remote, OrderproductHome.class);

return rv;

}

catch(NamingException ne){

java.util.logging.Logger.getLogger(getClass().getName()).log(

java.util.logging.Level.SEVERE,"exception caught" ,ne);

thrownew RuntimeException(ne);

}

}

}

i use netbeans to write this code. I try to run-deploy this code, & it results an error like this :

Deploying application in domain failed; Fatal Error from EJB Compiler -- Compilation failed: Native compiler returned an error: 1

Error messages are: D:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-apps\moves\moves\ejb\OrdersEJB_1712868730_ConcreteImpl.java:10: moves.ejb.OrdersEJB_1712868730_ConcreteImpl is not abstract and does not override abstract method setMsisdn(java.lang.String) in moves.ejb.OrdersEJB

public class OrdersEJB_1712868730_ConcreteImpl

^

1 error

What should i do?

[15369 byte] By [kalinggaa] at [2007-10-3 3:00:42]
# 1
It looks like the concrete implementation of the class you have listed below doesn't override setMsisdn(java.lang.String). What does it look like to you?
jennyFromTheBronxa at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 2

> It looks like the concrete implementation of the

> class you have listed below doesn't override

> setMsisdn(java.lang.String). What does it look like

> to you?

If only the error was reported in some way that gave out that information instead of us relying on jenny's remarkable psychic insight.

ScarletPimpernela at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 3
Hav u seen the code clearly....!!!?
kalinggaa at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 4
I hav overridden the setMsisdn....
kalinggaa at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 5
> I hav overridden the setMsisdn....> public abstract void setMsisdn(String msisdn);Where?
CeciNEstPasUnProgrammeura at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 6
> I hav overridden the setMsisdn....public abstract void setMsisdn(String msisdn);So you have
ScarletPimpernela at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 7
> So you haveHi Jos! You're looking strange today, do you feel well? :p
CeciNEstPasUnProgrammeura at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 8
I think it was just a ploy of kalingga's to get in touch with Jenny. ;)
CeciNEstPasUnProgrammeura at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 9
> > So you have> > Hi Jos! You're looking strange today, do you feel> well? :pSir, you seem to have confused me with some old tulip farmer.
ScarletPimpernela at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 10
> I think it was just a ploy of kalingga's to get in> touch with Jenny. ;)touch jenny?
ScarletPimpernela at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 11
> Sir, you seem to have confused me with some old tulip> farmer.Sorry. I just saw some old slow guy... thought you were him. ;)(I assume you're not that young. You knew about delay line storage.)
CeciNEstPasUnProgrammeura at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 12
> > I think it was just a ploy of kalingga's to get in> > touch with Jenny. ;)> > touch jenny?Eh? I meant just like "excuse me, do you have a cigarette lighter?"... Touching Jenny might be the ultimate goal, but not at this stage. ;)
CeciNEstPasUnProgrammeura at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 13
Ah, Happy Friday, kids. I get married next Friday, so no one's touching anyone until then.
jennyFromTheBronxa at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 14
> Ah, Happy Friday, kids. I get married next Friday,> so no one's touching anyone until then.Hey, cool! Congratulations, and my best wishes for your future life! :)("Until"? Or "after"?)
CeciNEstPasUnProgrammeura at 2007-7-14 20:50:19 > top of Java-index,Java Essentials,Java Programming...
# 15

> > Ah, Happy Friday, kids. I get married next

> Friday,

> > so no one's touching anyone until then.

>

> Hey, cool! Congratulations, and my best wishes for

> your future life! :)

>

Hey, thanks! This is just the pre-wedding wedding to start green card applications to get the Brit over to America next year when I go back to school. The white dress, high-stress wedding comes next February in Mexico.

> ("Until"? Or "after"?)

Yes.

jennyFromTheBronxa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 16

> Hey, thanks! This is just the pre-wedding wedding to

> start green card applications to get the Brit over to

> America next year when I go back to school. The

> white dress, high-stress wedding comes next February

> in Mexico.

Pre-wedding wedding? As in "by law, not by church"? Still best of luck. :)

A friend of mine went the other direction: gave up US citizenship to become a Brit. Then he moved here, and tried to get his American citizenship back a while a go, just so he'd be allowed to vote against Bush. :)

> > ("Until"? Or "after"?)

> Yes.

:p I didn't expect you to be a nerd. ;)

CeciNEstPasUnProgrammeura at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 17

> It looks like the concrete implementation of the

> class you have listed below doesn't override

> setMsisdn(java.lang.String). What does it look like

> to you?

jenny B., I haven't seen your nic in a while. What's up? How are things? Good to see you here.

%

duffymoa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 18
> Ah, Happy Friday, kids. I get married next Friday,> so no one's touching anyone until then.Wow! Great news! Congratulations! Sincerely, %
duffymoa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 19
> > ("Until"? Or "after"?)> Yes.LOL! I guess the poor man'd better take advantage all he can at the reception. It's a narrow window of opportunity.%
duffymoa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 20

> > Ah, Happy Friday, kids. I get married next

> Friday,

> > so no one's touching anyone until then.

>

> Wow! Great news! Congratulations! Sincerely, %

Hey, thanks. I'm pretty pleased myself. :D I took the summer off of work to recover from doing the 100% travel thing for three years straight. Plus, every time I posted, the scourge of the forum posts racist filth directed at me.

>LOL! I guess the poor man'd better take advantage all he can at the > reception. It's a narrow window of opportunity.

;)

jennyFromTheBronxa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 21
> > > ("Until"? Or "after"?)> > Yes.> > :p I didn't expect you to be a nerd. ;)I'm hurt. :)
jennyFromTheBronxa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 22
> I'm hurt. :) And I'm disappointed. You seemed to be such a nice person. ;)"Racist posts"? Are you referreing to Goldie's carwash blabber (can you give them more than a chuckle? I can't) or did I miss something?
CeciNEstPasUnProgrammeura at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 23
> "Racist posts"? Are you referreing to Goldie's> carwash blabber (can you give them more than a> chuckle? I can't) or did I miss something?Yes, him. I don't take his spewings seriously, but nor do I want any of his direct attention, the freak.
jennyFromTheBronxa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 24
> Yes, him. I don't take his spewings seriously, but> nor do I want any of his direct attention, the freak.Well, I can understand that. :) Thankfully, he just announced to be gone for good. (Again.) :p
CeciNEstPasUnProgrammeura at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 25
setMsisdn(order.getMsisdn());see......i hav overridden the setMsisdn in ejbCreate method, havnt i?if not yet, how can i do that?or where do i do that?is it overridden means that i hav 2 write the method setMsisdn again in the code?thx b4....
kalinggaa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 26
> is it overridden means that i hav 2 write the method> setMsisdn again in the code?I suggest that you would find it instructive to learn the meaning of the abstract keyword.
dcmintera at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...
# 27

The EJB compiler is failing to create an implementation of the abstract method setMsisdn. I assume this is a CMP field, so your public abstract method declaration is correct. Check your sun-cmp-mappings.xml and ejb-jar.xml files to make sure the field is mapped. Also make sure your local references are declared in ejb-jar.xml. From experience, I can tell you Netbeans 5.0 does not make mapping beans as easy as it could/should be.

stemarcoa at 2007-7-21 10:04:47 > top of Java-index,Java Essentials,Java Programming...