Skip to Content
0
Former Member
Sep 26, 2005 at 01:26 PM

Problem Importing JavaBean Model in NetWeaver Developer Studio

15 Views

Hello,

I'm having a problem importing a JavaBean Model in NetWeaver Development Studio. I am running 2.0.11 (SP11).

I have a DC with the with one JavaBean defined:

package com.test.bd;

import java.io.Serializable;

import javax.naming.InitialContext;

import javax.naming.NamingException;

import com.test.entity.ContactInformationLocal;

import com.test.entity.ContactInformationLocalHome;

public class ContactInformationBean implements Serializable {

private ContactInformationLocalHome home;

private String firstName;

private String lastName;

private String email;

public ContactInformationBean() {

try {

InitialContext ctx = new InitialContext();

home =

(ContactInformationLocalHome) ctx.lookup(

"java:comp/test.com/test-ear/ContactInformationBean");

} catch (NamingException e) {

e.printStackTrace();

}

}

/**

  • @return

*/

public String getEmail() {

return email;

}

/**

  • @return

*/

public String getFirstName() {

return firstName;

}

/**

  • @return

*/

public String getLastName() {

return lastName;

}

/**

  • @param string

*/

public void setEmail(String string) {

email = string;

}

/**

  • @param string

*/

public void setFirstName(String string) {

firstName = string;

}

/**

  • @param string

*/

public void setLastName(String string) {

lastName = string;

}

public void executeLoadByEmail(String email) {

try {

ContactInformationLocal bean = home.findByEmail(email);

setFirstName(bean.getFirstName());

setLastName(bean.getLastName());

setEmail(bean.getEmail());

} catch (Exception e) {

e.printStackTrace();

}

}

public void executeStore() {

try {

ContactInformationLocal bean = home.findByEmail(getEmail());

bean.setFirstName(getFirstName());

bean.setLastName(getLastName());

} catch (Exception e) {

e.printStackTrace();

}

}

}

Its used DC references are set to ejb20, and my entity bean DC.

Next, I have a Web Dynpro DC that i'm trying to import my JavaBean into as a model. I have added my JavaBean DC and the ejb20 DC (but not my entity bean DC) to its used DC references.

When I try and import the JavaBean as a model, the IDE freezes up after I click next in the first wizard screen. If I let my IDE wait for about 30 minutes (in the mean time it is completly locked up and will not respond to user input), it will finally come back and say invalid jar file, no JavaBeans available for import.

Can anyone tell me what I'm possibly doing wrong? Is there a problem with my JavaBean itself or the way that I'm referencing it?

Thanks for your help!

Chris