Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within EJB and other Jakarta /Java EE Technologies
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
EJB and other Jakarta /Java EE Technologies
Error while Deploying BMP bean
Skanda Raman
Ranch Hand
Posts: 205
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I tried to develop a sample BMP of
EJB
. I am getting the below error.
Bean : StudentEJB Method : public abstract Student Create(String, String, String, String) throws C reateException, RemoteException Section: 12.2.9 Warning: Each home method must match a method defined in the entity bean class.
My Home Interface is
package bmpexmp; import javax.ejb.*; import java.rmi.RemoteException; import java.util.*; public interface StudentHome extends EJBHome{ /*Create Method*/ public Student Create(String studentId,String firstName,String lastName,String address) throws CreateException,RemoteException; /*Finder Methods*/ /*Returns Remote Interface Object*/ public Student findByPrimaryKey(String studentId) throws FinderException,RemoteException; public Collection findByLastName(String lastName) throws FinderException,RemoteException; /* Home methods */ public int GetTotalNumberOfStudents() throws RemoteException; }
StudentEJB has following lines of code defining Create method.
public String ejbCreate(String studentId,String firstName,String lastName,String address) throws CreateException{ try{ System.out.println("Student.ejbCreate() called."); StudentDAO dao = getDAO(); dao.create(studentId, firstName, lastName, address); setStudentId(studentId); setFirstName(firstName); setLastName(lastName); setAddress(address); return studentId; }catch(Exception ex) { throw new CreateException("Failed to create student" + studentId + ex.getMessage()); } } public void ejbPostCreate(String studentId, String firstName,String lastName,String address) throws CreateException { System.out.println("Student.ejbPostCreate() called."); }
Please let me know where I am doing wrong.
Skanda
Skanda Raman
Ranch Hand
Posts: 205
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Any Help
Skanda
Skanda Raman
Ranch Hand
Posts: 205
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Problem is resolved.
The issue was that i misspelled the method name as Create, which should be
create
.
Skanda
Where all the women are strong, all the men are good looking and all the tiny ads are above average:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Searching problem
Desperate for Help
problem in bmp deployment
Error: [ ejbFindByPrimaryKey ]
urgent
More...