Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrapper error

 
ramjcp kris
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have developed an application in which my servlet invokes Session bean.

I am using OC4j container,i have deployed my ear file in container,every thing is going fine

I have added one more parameters to one of method in my EJB

I have made the necessary changes both in remote and Bean classes

the bean classes have been created sucessfully and I have added the corresponding class files to my ejb.jar file

when i was deploying the update file ,it is giving the following errors

Auto-unpacking C:\OC4J_EXTENDED\j2ee\home\applications\school.ear... done.
Auto-unpacking C:\OC4J_EXTENDED\j2ee\home\applications\school\lowerclasses.war... done.
Auto-deploying school (Assembly had been updated)...
Application default (default) initialized...
Auto-deploying - EJB.jar (ejb-jar.xml had been touched since the previous deployment)...
Auto-deploying - compiling and loading...

BookdeskSession_StatelessSessionBeanWrapper30.java:101: addBooks(com.sample.java.Booking) in com.sample.booking.ejb.sls.BookdeskSessionBean cannot be applied to (com.sample.booking.java.Booking,int)

response = object.addBooks(argument0, argument1);
^


Even though i have added one parameter to my addBooks method ,both in remote and bean implementation classess and also in servlet

then why BookdeskSession_StatelessSessionBeanWrapper is showing only one parameter

can any one suggest me why I am getting the above error.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post your interface and bean class code for the two beans.
 
ramjcp kris
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my interface is



package com.sample.booking.ejb.sls;

import java.rmi.RemoteException;

public interface BookdeskSession extends javax.ejb.EJBObject
{

public java.util.Hashtable addBooks(com.sample.booking.java.Booking booking, int cnt)
throws RemoteException ;

------------some other methods--------


}



my bean is




package com.sample.booking.ejb.sls;

import com.sample.booking.java.Booking;

public class BookdeskSessionBean implements SessionBean

{

public Hashtable addBooking(Booking booking, int count)
{

Hashtable result= new Hashtable(2);

---------I am performing the necessary business logic over here----


return result;
}
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about the code for BookdeskSession_StatelessSessionBeanWrapper.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic