Skip to Content
avatar image
Former Member

What makes a Java Bean invaild for a model import?

I'm busy prototyping some functionality that will expose some MDM 5.5 data through a WebDynpro application. I'm having a problem creating a java bean that will sit in front of an EJB, in that the Bean importer will refuse to import a bean if a certain line of code in a method is visible. Here's the offending code from the method:

try {

A2iResultSet rs = cat.GetRecordsByValue(ary, rsd, Schema.MyTable.NAME);

setEventLocation(rs.GetValueAt(0, Schema.MyTable.EVENT_LOCATION).GetStringValue());

} catch (StringException e) {

setEventLocation("failed to find record");


Note that I have a class instance variable called 'eventLocation', which has get/set methods defined for it, thereby satisfying the Javabean requirement.

The first two lines of the 'try' block are the problem. If I comment them out and assemble the DC, I can import the Bean into a model with no issues. If I uncomment them, I cannot import the bean - I get a message that says 'Invalid Jar - no beans to import'.

Can someone explain why this is happening? Does it have something to do with the StringException? As far as I can tell from the Java bean model import documentation, I think I'm doing everything correctly, but something must be amiss.


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 24, 2005 at 06:28 PM

    I'm having the same issue you are within my code when I try to import the javabean model. It works when I basically create a skeloton javabean but then when i actually try to add code to some of the methods the class can no longer be imported. If someone responds to my message I'll pass on the info.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 25, 2005 at 08:32 AM

    Ken & Dora,

    If you have such problems with JavaBean model importer why not try to:

    1. Extract interfaces from your beans.

    2. Create JavaBean model over interfaces.

    Or update your IDE: JavaBean model importer is much more stable since SP11.


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      Now I understand your question in comments to my blog better 😉

      You have to add "ejb20" classes to your WebDynpro project as well, and import model afterwards.

      In WebDynpro DC expand path (<project> -> DC MetData -> DC Definition -> Used DC) and invoke "Add Used DC..." in contextual menu. In dialog select "<dev. config> -> SAP-J2EE -> ejb20 -> DC MetaData -> Public Parts -> default". Set dependencies Built-time (probably Design-time as well). Click OK. Try to import model. If fails, restart IDE and try to import again.

      Valery Silaev

      EPAM Systems

  • avatar image
    Former Member
    Dec 31, 2006 at 03:08 PM

    Hi Ken,

    Are you still having problems with this? If so, reply here and I will try to help.


    Add comment
    10|10000 characters needed characters exceeded