-
1. Re: "Must Implement Entity Bean Interface", Error
aloubyansky Oct 2, 2002 3:19 AM (in response to roger01)Are you really sure the bean's class does implement javax.ejb.EntityBean?
Does it implement it directly or indirectly?
The code seems to be clear for it:
/**
* Finds java.ejb.EntityBean interface from the class
*/
public boolean hasEntityBeanInterface( Class c )
{
return javax.ejb.EntityBean.class.isAssignableFrom(c);
} -
2. Re: "Must Implement Entity Bean Interface", Error
roger01 Oct 2, 2002 5:25 PM (in response to roger01)Thank you for your reply.
The classes implement the interface directly.
I will have another look at the classes. If I understand the code you included, the deployment descriptors are irrelevant to this problem. So I should concentrate on the classes themselves. Is this correct?
Regards,
Roger -
3. Re: "Must Implement Entity Bean Interface", Error
aloubyansky Oct 3, 2002 2:37 AM (in response to roger01)Not at all. DDs do matter. The classes that specified in ejb-jar.xml are read, loaded and assigned to the bean. And then the check for needed interfaces implementation is made. i.e. the classes you specified in ejb-jar.xml are verified.
-
4. Re: "Must Implement Entity Bean Interface", Error
roger01 Oct 24, 2002 7:34 PM (in response to roger01)I have checked and re-checked the class files and deployment descriptors and I can see no problem with them.
I think this problem is more subtle than not having the classes or descriptors defined correctly. In fact I believe that they are defined correctly, but that for some reason the link between the bean and the interface it implements is being broken. I think it is related to serialisation because when I start up JBoss with the EAR file deployed prior to start up, no error messages appear and the program runs correctly. However, when the program is undeployed and deployed again, keeping JBoss running the whole time the above error occurs when the EAR file is redeployed. This occurs even if the application is not run at all after it was deployed for the first time. I have removed all the explicit serializations and while this does have some effect on the nature of the problem, it does not cure it. Can any one give me any suggestions please?
Thanks
Roger -
5. Re: "Must Implement Entity Bean Interface", Error
roger01 Nov 3, 2002 7:41 PM (in response to roger01)The basic problem was that the javax package was included in the same JAR file as the EJBs that produced the warning messages. When the javax package was removed from the JAR file the problem disappeared.
Can anyone explain why this should be, please? Is it due to some class loading function? The aspect that is most difficult to understand, is why the warning message should appear only when the EAR was redeployed?
Thanks
Roger