Got problems with sun server version 8
Hi guys. Currently I work on JSF project. I use tomcat web server and everything works fine. When I deploy my project to sun java system application server version 8, in one page, my save button doesn't work. Can anybody help me.Below is the code for button may be somebody can help me. I try to trace the error using that log method.
public String btnModify_action(){
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
stFail1.setText("Hiiiiiiii!");
String cargoDim ="";
String formStat ="";
log("hiiiiiiiii");
if(tfDimension.getText()!=null){
cargoDim = tfDimension.getText().toString();
log(tfDimension.getText().toString());
}
if(!(cargoDim.equals(""))){
formStat = checkDimension(cargoDim);
log(formStat);
}
if(formStat.equals("error")){
stSuccess1.setVisible(false);
stFail1.setVisible(true);
stFail1.setText("Wrong format for Cargo Dimension (00.00x00.00x00.00)");
}else{
try{
BigDecimal bgWeight =null;
BigDecimal bgQuantity =null;
BigDecimal bgCargoval =null;
int status=0;
log("ddCargo" + ddCargoType.getSelected().toString());
if(ddCargoType.getSelected()!=null){
cargo_detailsRowSetUpdate.setString(1,ddCargoType.getSelected().toString());
log("ddCargo" + ddCargoType.getSelected().toString());
}else{
cargo_detailsRowSetUpdate.setNull(1,Types.CHAR);
log("ddCargo null");
}
if(taDesc.getText() !=null){
cargo_detailsRowSetUpdate.setString(2,taDesc.getText().toString());
log("taDesc" + taDesc.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(2,Types.VARCHAR);
log("taDesc null");
}
if(txtWeight.getText()!=null){
bgWeight=new BigDecimal(txtWeight.getText().toString());
cargo_detailsRowSetUpdate.setBigDecimal(3,bgWeight);
log("bgweight" + bgWeight);
}else{
cargo_detailsRowSetUpdate.setNull(3,Types.DECIMAL);
log("bgweight null");
}
if(ddUom_weight.getSelected() !=null){
cargo_detailsRowSetUpdate.setString(4,ddUom_weight.getSelected().toString());
log("ddUom" + ddUom_weight.getSelected().toString());
}else{
cargo_detailsRowSetUpdate.setNull(4,Types.CHAR);
log("ddUom null");
}
if(tfDimension.getText() !=null){
cargo_detailsRowSetUpdate.setString(5,tfDimension.getText().toString());
log("tfDimension" + tfDimension.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(5,Types.VARCHAR);
log("tfDimension null");
}
if((ddDimension_UOM.getSelected() !=null) && (tfDimension.getText()!=null)){
cargo_detailsRowSetUpdate.setString(6,ddDimension_UOM.getSelected().toString());
log("ddDimension" +ddDimension_UOM.getSelected().toString() );
}else{
cargo_detailsRowSetUpdate.setNull(6,Types.CHAR);
}
if(txtQuantity.getText()!=null){
bgQuantity=new BigDecimal(txtQuantity.getText().toString());
cargo_detailsRowSetUpdate.setBigDecimal(7,bgQuantity);
log("bgQuantity" +bgQuantity );
}else{
cargo_detailsRowSetUpdate.setNull(7,Types.DECIMAL);
log("bgQuantity null");
}
if(txtCargo_Value.getText()!=null){
bgCargoval=new BigDecimal(txtCargo_Value.getText().toString());
cargo_detailsRowSetUpdate.setBigDecimal(8,bgCargoval);
log("bgCargoval" + bgCargoval);
}else{
cargo_detailsRowSetUpdate.setNull(8,Types.DECIMAL);
log("bgCargoval null");
}
if(ddCargo_Value_Uom.getSelected() !=null){
cargo_detailsRowSetUpdate.setString(9,ddCargo_Value_Uom.getSelected().toString());
log("ddCargo_Value_Uom.getSelected().toString()" + ddCargo_Value_Uom.getSelected().toString());
}else{
cargo_detailsRowSetUpdate.setNull(9,Types.CHAR);
log("ddCargo_Value_Uom.getSelected().toString() null");
}
if(taNote.getText() !=null){
cargo_detailsRowSetUpdate.setString(10,taNote.getText().toString());
log("taNote.getText().toString()" +taNote.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(10,Types.VARCHAR);
log("taNote.getText().toString() null");
}
if(ddPackingType.getSelected()!=null){
cargo_detailsRowSetUpdate.setString(11,ddPackingType.getSelected().toString());
log("ddPackingType.getSelected().toString()" + ddPackingType.getSelected().toString());
}else{
cargo_detailsRowSetUpdate.setNull(11,Types.CHAR);
log("ddPackingType.getSelected().toString() null");
}
if(ddPackageType.getSelected()!=null){
cargo_detailsRowSetUpdate.setString(12,ddPackageType.getSelected().toString());
log("ddPackageType.getSelected().toString()" + ddPackageType.getSelected().toString());
}else{
cargo_detailsRowSetUpdate.setNull(12,Types.CHAR);
log("ddPackageType.getSelected().toString() null");
}
if(tfSuppName.getText()!=null){
cargo_detailsRowSetUpdate.setString(13,tfSuppName.getText().toString());
log("tfSuppName.getText().toString()" + tfSuppName.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(13,Types.VARCHAR);
log("tfSuppName.getText().toString() null");
}
if(tfDoorNo.getText()!=null){
cargo_detailsRowSetUpdate.setString(14,tfDoorNo.getText().toString());
log("tfDoorNo" + tfDoorNo.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(14,Types.VARCHAR);
log("tfDoorNo null");
}
if(tfState.getText()!=null){
cargo_detailsRowSetUpdate.setString(15,tfState.getText().toString());
log("tfState.getText()" +tfState.getText().toString() );
}else{
cargo_detailsRowSetUpdate.setNull(15,Types.VARCHAR);
log("tfState.getText() null");
}
if(tfEmail.getText()!=null){
cargo_detailsRowSetUpdate.setString(16,tfEmail.getText().toString());
log("tfEmail.getText()" +tfEmail.getText().toString() );
}else{
cargo_detailsRowSetUpdate.setNull(16,Types.VARCHAR);
log("tfEmail.getText() null");
}
if(tfStreet.getText()!=null){
cargo_detailsRowSetUpdate.setString(17,tfStreet.getText().toString());
log("tfStreet.getText()" + tfStreet.getText().toString() );
}else{
cargo_detailsRowSetUpdate.setNull(17,Types.VARCHAR);
log("tfStreet.getText() null");
}
if(ddCountry.getSelected()!=null){
cargo_detailsRowSetUpdate.setString(18,ddCountry.getSelected().toString());
log("ddCountry" + ddCountry.getSelected().toString());
}else{
cargo_detailsRowSetUpdate.setNull(18,Types.VARCHAR);
log("ddCountry null");
}
if(tfPhone.getText()!=null){
cargo_detailsRowSetUpdate.setString(19,tfPhone.getText().toString());
log("tfPhone" + tfPhone.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(19,Types.VARCHAR);
log("tfPhone null");
}
if(tfConPerson.getText()!=null){
cargo_detailsRowSetUpdate.setString(20,tfConPerson.getText().toString());
log("tfConPerson" + tfConPerson.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(20,Types.VARCHAR);
log("tfConPerson null");
}
if(tfCity.getText()!=null){
cargo_detailsRowSetUpdate.setString(21,tfCity.getText().toString());
log("tfCity" + tfCity.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(21,Types.VARCHAR);
log("tfCity null");
}
if(tfPoscode.getText()!=null ){
cargo_detailsRowSetUpdate.setString(22,tfPoscode.getText().toString());
log("tfPoscode" + tfPoscode.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(22,Types.VARCHAR);
log("tfPoscode null");
}
if(tfFax.getText()!=null ){
cargo_detailsRowSetUpdate.setString(23,tfFax.getText().toString());
log("tfFax" + tfFax.getText().toString());
}else{
cargo_detailsRowSetUpdate.setNull(23,Types.VARCHAR);
log("tfFax null");
}
cargo_detailsRowSetUpdate.setString(24,getSessionBean1().getUserName().toString());
log("getSessionBean1().getUserName().toString()" + getSessionBean1().getUserName().toString() );
if(ddHandling.getSelected()!=null ){
cargo_detailsRowSetUpdate.setString(25,ddHandling.getSelected().toString());
log("ddHandling.getSelected().toString()" + ddHandling.getSelected().toString() );
}else{
cargo_detailsRowSetUpdate.setNull(25,Types.CHAR);
log("ddHandling.getSelected().toString() null");
}
if(ddMOF.getSelected()!=null ){
cargo_detailsRowSetUpdate.setString(26,ddMOF.getSelected().toString());
log("ddMOF.getSelected.toString()" + ddMOF.getSelected().toString());
}else{
cargo_detailsRowSetUpdate.setNull(26,Types.CHAR);
log("ddMOF.getSelected.toString() null");
}
cargo_detailsRowSetUpdate.setBigDecimal(27,getSessionBean1().getCargoid());
log("getSessionBean1.getCargoID" + getSessionBean1().getCargoid());
cargo_detailsDataProviderUpdate.refresh();
log("im here");
/*rsAudit.setString(1,"Update");
rsAudit.setString(2,"RFSCARGO");
rsAudit.setString(3,getSessionBean1().getUserName());
rsAudit.setString(4,"CargoID " + getSessionBean1().getCargoid());
rsAuditDataProvider.refresh();*/
stFail1.setVisible(false);
stSuccess1.setVisible(true);
stSuccess1.setText("Cargo Details Updated Successfully");
}catch (SQLException ex){
//staticText2.setText(ex.getMessage());
log(ex.getMessage());
ex.printStackTrace();
stSuccess1.setVisible(false);
stFail1.setVisible(true);
stFail1.setText("Updation Failed!");
log("exception"+ ex.getMessage());
}
}
returnnull;
}

