dcsimg
About EntityBean?
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   wu_min
Posted On:   Saturday, August 24, 2002 01:49 AM

I create a EntityBean,and the entitybean use a field (type is byte) as Key,when i compile the entitybean,i can'f find the key class,then i deploy the entitybean,the Ececption
"java.lang.ClassNotFoundException: byte" is occured.Because i use "byte" as key???????

Re: About EntityBean?

Posted By:   Laurent_Mihalkovic  
Posted On:   Saturday, August 24, 2002 10:41 PM

as per the EJB spec, a key should be a serializable object. a 'byte' is not an object, and can therefore NOT be used as a key. However, the java.lang.Byte class is a serializable object, and can therefore be used a key.

cheers

Re: About EntityBean?

Posted By:   Laurent_Mihalkovic  
Posted On:   Saturday, August 24, 2002 10:41 PM

as per the EJB spec, a key should be a serializable object. a 'byte' is not an object, and can therefore NOT be used as a key. However, the java.lang.Byte class is a serializable object, and can therefore be used a key.

cheers

Re: About EntityBean?

Posted By:   yao_yao  
Posted On:   Saturday, August 24, 2002 03:05 AM

What J2EE Server do you use?Weblogic?

You can use java.lang.Byte to resolve this problem.
About | Sitemap | Contact