on 09-26-2005 2:26 PM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is your source folder where you put JavaBean? It shuld be "src/packages". I have similar problem when I put java class in another source folder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chris,
Could you run NW IDE in console mode (replace javaw to java in application shortcut)? Then post trace of console here.
Also one guess: try to change existing signature constructor to smth. like public ContactInformationBean(boolena ignore), and add no-op empty public ContactInformationBean(){}. Does import works in this case?
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.