Title: Anyone encouter this error?

Hi,

I encountered the following error when I am writing entity beans:

javaURLContext: No context for this component
        JContextEntity.storeIfModified raised EJBException
java.rmi.RemoteException: Exception while storing data; nested exception is:
        javax.naming.NameNotFoundException: No context for this component

The client code I am using is:

  EnvPrefHome prefHome = (EnvPrefHome) PortableRemoteObject.narrow(home, EnvPrefHome.class);
  int i =0;
    for (i=0; i < 100; i++)
    {
    EnvPref envEJB = prefHome.create(new EnvPrefVO (), new EnvPrefPK ("1231" + i, "ejb3"));
    EnvPrefPK pk =(EnvPrefPK) envEJB.getPrimaryKey();
     EnvPrefVO vo = new EnvPrefVO ();
    envEJB.setEnvPrefValueObject(vo);
    EnvPrefIF prefIF = envEJB.getEnvPrefValueObject();
 //    envEJB.remove();
}

The wierd thing is that this error doesn't error if I UNcomment the envEJB.remove () function.  Any ideas what the problem could be?

Thanks,

Will

Reply via email to