Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment error

 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my ejb combiler gives the following error ( I am using Local Home and Local interface for the Entity bean )

Fatal Error from EJB Compiler -- Compilation failed: Native compiler returned an error: 1
Error messages are: C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-apps\StockListLocalApp\beans\StockBean2117374328_ConcreteImpl.java:174: ejbCreate(java.lang.String,java.lang.String) in beans.StockBean2117374328_ConcreteImpl cannot override ejbCreate(java.lang.String,java.lang.String) in beans.StockBean; attempting to use incompatible return type
found : java.lang.Object
required: java.lang.String
public java.lang.Object ejbCreate (java.lang.String param0,
^
1 error

...................and this is my code.........
public String ejbCreate(String ticker, String name)
throws CreateException {

setTickerSymbol(ticker);
setName(name);
return null;
}

 
Rohit Suman
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi try this
change the return type of ejbCreate from String to RemoteComponentInterface name it will work.
any query do mail me at sumanrohit@hotmail.com
 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where is the RemoteComponentInterface?
javax.ejb.RemoteComponentInterface??

thnx
 
Rohit Suman
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its the name of ComponentInterface of Entity bean.
 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont want to use RemoteComponent...
 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I am using LocalHomeInterface, I will set the return to type to LocalHome and see..
 
Rohit Suman
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The return type must be Remote Component Interface Name as per mine knowledge
 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ive tried what you told me... it says that the return type of ejbCreate() should be that of the PrimaryKey type (which in my case is the String type)

However, I think you are referring to the create() function in the EJBHome Interface which returns a BeanInterface.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic