Showing results for 
Search instead for 
Did you mean: 

Dictionary and Entity Beans

Former Member
0 Kudos

Hello all,

I'm quite new to NetWeaver J2EE development and maybe I didn't read enough or I just expect too much, but anyway, let me explain my problem to you:

I want to maintain - let's say - emergency vehicles in a database using cmp entity beans. My vehicles can have a special status that is one of: "Ready", "OnMisson", "Returning".

For that I created a simple type in my NW dictionary project. It's based on the built in type string and is basically an enumeration. I ticked the "Generate a class representation of the enumeration" checkbox, that I'll need later on.

I created a database table vehicles (in my dictionary project) as well, which has - among license plate, model, manufacturer, etc. - a field called status. I chose my created SimpleType from step one for that column. I created the archive and deployed the dict proj. Fine.

Then I created a cmp entity bean. Fields are the same as in my table. I set the type of the status field to the class that NW IDE created according to my simpletype before (that's why i ticked the checkbox).

The column matching in persistent.xml works like a charm, no errors or anything.

Anyways, when I want to deploy my EAR, I get an error saying that the class VehicleType (which was generated by NW IDE!) doesn't implement Serializable. Just because I was curious about it, i added "implements Serializable" to the generated class and tried to deploy again. Now it's complaining that the field cannot be mapped to VARCHAR - it expects BLOB. Well, I'm using MaxDB which doesn't support BLOB. I got stuck.

I think that after all serializing the object and storing it as a blob is not the right way as we do know the possible values and the base type (string) such that a simple mapping to a varchar would be an easy thing to do for the bean container.

Am I missing something?

Do you agree that it should be working as I did it (just from a functional point of view)?

Is there a better way to do that kind of stuff?

Thank you for any input. Best regards.


Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos


After reading your detailed q, I don't see any technical problem in your approach.Tell me one thing are you storing your object persistently some where?Normally the data type BLOB is used for storing huge images.Did you tried debugging mode in NW studio?



Former Member
0 Kudos

Hi Guru,

thanks for your answer. The purpose of the things I described in my post is to have Objects of the SimpleType as attributes for entity bean instances. And yes of course, I want these entity beans (cmp!) to get stored in my DB, when i do an ejbCreate.

As far as debugging is concerned: I'm not even able to run anything. The errors I get, appear when I try to deploy.

I hope, I made myself somehow clear If you have further questions, don't hesitate. I appreciate your help!