(URGENT)Passing a JavaBean as parameter to Session Bean
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   stanley_ten
Posted On:   Friday, October 19, 2001 09:54 AM

I'm having an error when trying to pass a JavaBean as parameter to call a method in Session bean.
The error is something like this :
"violates loader constraints".
Have anybody encounter this problem b4?
Kindly help me .... thank you

(URGENT)Code examples...

Posted By:   stanley_ten  
Posted On:   Monday, October 22, 2001 12:19 AM

Bozidar Dangubic, can u kindly show me some code examples? thank you...

Below are the codes for JavaBean class and session bean...

Posted By:   stanley_ten  
Posted On:   Sunday, October 21, 2001 06:29 PM


/**
* This is a JavaBean class
*/

public class ContactNomBean implements java.io.Serializable {



private String customerUID = "";

private String contactUID = "";




public ContactNomBean() {

super();

}



public java.lang.String getCustomerUID() {

return customerUID;

}



public void setCustomerUID(java.lang.String newCustomerUID) {

customerUID = newCustomerUID;

}


}




/**
* This is a Session Bean Class
*/

import com.vo.ContactNomBean;

import java.rmi.RemoteException;

import java.security.Identity;

import java.util.Properties;

import javax.ejb.*;

import javax.naming.*;




public class ContactsManagerBean implements SessionBean {



private static final LogHelper LOG = new LogHelper(ContactsManagerBean.class);

private javax.ejb.SessionContext mySessionCtx = null;

private final static long serialVersionUID = 3206093459760846163L;


// Constants

private static final String CONTACTS_HOME = "ejb/Contacts";




public ContactNomBean createUser(ContactNomBean[] arrayRecord ){

ContactNomBean contactNomBean = null;

Contacts contact = null;


try {


getContactsHome().create(arrayRecord );


}

catch (NamingException e) {

throw new EJBException(e);

}

catch (CreateException e) {

throw new EJBException(e);

}

catch (RemoteException e) {

throw new EJBException(e);

}


return contactNomBean


}



private ContactsHome getContactsHome() throws NamingException {


return (ContactsHome) HomeHelper.getHome(CONTACTS_HOME, ContactsHome.class);

}



}

Here are the exception...

Posted By:   stanley_ten  
Posted On:   Sunday, October 21, 2001 06:24 PM


ServletInstan X SRVE0068E: Did not realize service() exception thrown by servlet ControllerServlet: javax.servlet.ServletException: Class [Lcom/ContactNomBean; violates loader constraints

at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:733)

at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)

at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)

at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:10

Re: (URGENT)Passing a JavaBean as parameter to Session Bean

Posted By:   Bozidar_Dangubic  
Posted On:   Friday, October 19, 2001 10:15 AM

i pass java beans to session ejbs all the time. put the code here and exact exception trace so that we can see exactly what is going on...
About | Sitemap | Contact