Hi,everyone
I'm sorry to make you can't read message conveniently. Let me say it again.
At the example,I want to insert two rows into table according to the CD example of
jboss using oracl3 8.0.6 and jboss.
first row 19 White,Tallis,etc./Lamentations
second row 1 Great Organ Works/Bach JS Koopman
classical, organ Incl. Toccata & Fugue in D minor
field 1 field 2 field 3 field 4
field 5
id title artist type
notes
from the log of run_upload.bat:
[JAWS] Exists command executing: SELECT COUNT(*) FROM music_cd WHERE
cd_id=?
[JAWS] Set parameter: idx=1, jdbcType=CHAR, value=1
[CDCollectionBean] Added CD with id=1, title=Great Organ Works/Bach JS,
artist=Koopman, type=classical, organ, notes=Incl. Toccata & Fugue in D minor
[JAWS] Create, id is 1
[JAWS] Exists command executing: SELECT COUNT(*) FROM music_cd WHERE
cd_id=?
[JAWS] Set parameter: idx=1, jdbcType=CHAR, value=1
[JAWS] Create command executing: INSERT INTO music_cd
(cd_artist,cd_notes,cd_type,cd_title,cd_id) VALUES (?,?,?,?,?)
[JAWS] Set parameter: idx=1, jdbcType=VARCHAR, value=NULL
[JAWS] Set parameter: idx=2, jdbcType=VARCHAR, value=NULL
[JAWS] Set parameter: idx=3, jdbcType=VARCHAR, value=NULL
[JAWS] Set parameter: idx=4, jdbcType=VARCHAR, value=NULL
[JAWS] Set parameter: idx=5, jdbcType=CHAR, value=1
[JAWS] Rows affected = 1
[CDCollectionBean] CDBean.ejbStore()
[JAWS] Store command executing: UPDATE music_cd SET
cd_artist=?,cd_notes=?,cd_type=?,cd_title=? WHERE cd_id=?
[JAWS] Set parameter: idx=1, jdbcType=VARCHAR, value=Koopman
[JAWS] Set parameter: idx=2, jdbcType=VARCHAR, value=Incl. Toccata & Fugue
in D minor
[JAWS] Set parameter: idx=3, jdbcType=VARCHAR, value=classical, organ
[JAWS] Set parameter: idx=4, jdbcType=VARCHAR, value=Great Organ
Works/Bach JS
[JAWS] Set parameter: idx=5, jdbcType=CHAR, value=1
[JAWS] Rows affected = 0
It's just corresponding to the codes as follows:
public void addCd(String id, String title, String artist, String type,
String notes) throws CDExistsException, RemoteException {
CDHome home = (CDHome) getHome("MyCD", CDHome.class);
try {
CD oldCd = home.findByPrimaryKey(id);
String dummy = oldCd.getId();
throw new CDExistsException();
}
catch (Exception e) {
System.out.println("Added CD with id=" + id + ", title=" + title
+ ", artist=" + artist + ", type=" + type + ", notes="
+ notes);
try {
CD cd = home.create(id);
cd.setTitle(title);
cd.setArtist(artist);
cd.setType(type);
cd.setNotes(notes);
return;
}
catch (Exception e2) {
throw new RemoteException (e2.toString());};
}
}
"[CDCollectionBean] Added CD with id=1, title=Great Organ Works/Bach JS,
artist=Koopman, type=classical, organ, notes=Incl. Toccata & Fugue in D minor" just
means that the EJB will update the table.
[CDCollectionBean] Added CD with id=19, title=White,Tallis,etc./Lamentations,
artist= , type= , notes=
For the first row.
[CDCollectionBean] Added CD with id=1, title=Great Organ Works/Bach JS,
artist=Koopman, type=classical, organ, notes=Incl. Toccata & Fugue in D minor
For the second row.
But after I run the run_upload.bat,I run the run_list.bat to check the result.
In the table there are just only primary key values,and the other values are all
null.I don't know how to solve the problem.I don't know why the container can't update
the table correctly.Please help me.
Thank you
levelsN�.n�+���n�,�ǫ�yb��(�H��� ��&N�����r��z6�ˬz�~X��
+�)�v�,r����GzZc�|(�H��� ��&