File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes deployment error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "deployment error" Watch "deployment error" New topic
Author

deployment error

Ashimashi Kabashi
Ranch Hand

Joined: Sep 11, 2006
Posts: 84
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

Joined: Sep 09, 2006
Posts: 37
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

Joined: Sep 11, 2006
Posts: 84
where is the RemoteComponentInterface?
javax.ejb.RemoteComponentInterface??

thnx
Rohit Suman
Ranch Hand

Joined: Sep 09, 2006
Posts: 37
Its the name of ComponentInterface of Entity bean.
Ashimashi Kabashi
Ranch Hand

Joined: Sep 11, 2006
Posts: 84
I dont want to use RemoteComponent...
Ashimashi Kabashi
Ranch Hand

Joined: Sep 11, 2006
Posts: 84
Actually I am using LocalHomeInterface, I will set the return to type to LocalHome and see..
Rohit Suman
Ranch Hand

Joined: Sep 09, 2006
Posts: 37
The return type must be Remote Component Interface Name as per mine knowledge
Ashimashi Kabashi
Ranch Hand

Joined: Sep 11, 2006
Posts: 84
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deployment error