Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2005 at 09:19 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2005 at 09:19 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 10:02 AM

    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/tutorial on using ejbs in web dynpro - 20.html

    Hope it helps.

    Regards,

    Naresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 02:17 PM

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

    Regard.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.