cancel
Showing results for 
Search instead for 
Did you mean: 

Model generation error when using java.util.List in JavaBeans

Former Member
0 Kudos

hi there,

when I try to generate model classes from JavaBeans classes,

packed into a JAR the generation process always stops with erros when the Bean class uses a property of type

java.util.List. See my example:

class MyJavaBean{

...

private java.util.List someMembers;

...

}

The error is:

Inspecting relation "MyJavaBean.SomeMembers" for source class "MyJavaBean"

[Warning]:This relation cannot be added as the TargetModelClass is not specified

[Error]: There are one or more relations unresolved. Importing the model without resolvoing the relations might result in erratic output.

Must I use a workaround or does anybody know something about this problem ? Installed: NW SP12

thx,

sabine

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sabine,

1. You need getter / setter these expose someMembers variable

2. On the latest screen of model import wizard, you have to select concrete JavaBean class for relation (relation will be highlighted with "warning" icon) Note, that this JavaBean class should reside in the same model, i.e. you have to include it in model import

VS

Former Member
0 Kudos

Hey, I have the same problem and already have the getter and setter method. I'm trying to make the new JavaBean class for relation, how do I do this, which type do I have to user??

Former Member
0 Kudos

Hi,

I am facing similar problem.

I have one field of type some wrraper class lets say, Class ABC.

My method returns the object of the type ABC.

But, it doesnot allow me to import as Bean model.

But, i change type from ABC to some builtin data type then it works.

What is the problem behind this?

Regards,

Bhavik

Former Member
0 Kudos

I have the solution, Stop using JavaBean model Importer and call the EJB's in the normal (and easy) way into the code with the context lookup method. There is no enough documentation about how to use the relations and the JavaBean Importer and how to deal with it in the Context.

Answers (3)

Answers (3)

Former Member
0 Kudos

That tutorial doesn't tell you how to mannage with the java.util.List, which is the main problem here.

Regard.

Former Member
0 Kudos

Hi Bhavik,

Can you please explain the error which you are getting while importing the model.

Please have a look at this tutorial.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on using ejbs in web dynpro - 20.html

Hope it helps.

Regards,

Naresh

Former Member
0 Kudos

Using Lists it seems to work. but the same question again with java.util.Map when I'm not using a special Bean class from the model inside.

Former Member
0 Kudos

Model import wizard in unable to create relation over Map. If you need a relation use other container + JavaBean for target. If you simply want to by-pass Map property simple uncheck it in wizard.

VS