Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0025016
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2013-10-25 00:182014-08-26 17:14
ReportershuehnerView Statuspublic 
Assigned Toinigosanchez 
PrioritynormalResolutionfixedFixed in Version3.0PR14Q4
StatusclosedFix in branchFixed in SCM revisionedc2a785a7a3
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0025016: NPE when calling Process via toolbar button and the process is not putting a message into its ProcessBundle

DescriptionWhen you have a class implementing a process and calling that Process from a toolbar button.

And the class does not put an instance of OBError into the message of its processbundle to show result

Then the WAD-generated servlet code fails with a NPE.

Additionally the try/catch present in that wad-code is missing to print a stacktrace making if very hard to diagnose the error.
Steps To Reproduce- See description.
Proposed Solution1.) Fix wad-generated code of button to have 2 changes
1.a) Do not fail if pb.getResult() is null.
1.b) Change log4j.errror of that catch to be 'log4j.error("Error calling process", ex)' so its logs a stacktrace.

Relevant code in the wad-generatd servlet is:


        OBError myMessage = null;
        try {
          new ProcessRunner(pb).execute(this);
          myMessage = (OBError) pb.getResult();
          myMessage.setMessage(Utility.parseTranslation(this, vars, vars.getLanguage(), myMessage.getMessage()));
          myMessage.setTitle(Utility.parseTranslation(this, vars, vars.getLanguage(), myMessage.getTitle()));
        } catch (Exception ex) {
          myMessage = Utility.translateError(this, vars, vars.getLanguage(), ex.getMessage());
          log4j.error(ex);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0069725)
hgbot (developer)
2014-08-26 00:38

Repository: erp/devel/pi
Changeset: edc2a785a7a3abc57c88698e2331d24fc5fa749d
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Aug 26 00:36:56 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/edc2a785a7a3abc57c88698e2331d24fc5fa749d [^]

Fixes issue 25016: NPE when calling process via toolbar button.

This issue fix 2 things:
1a) Do not fail if ph.getResult() is null.
2a) Change message in log4j.error.

---
M src-wad/src/org/openbravo/wad/ActionButtonJava_Responser.javaxml
---
(0069745)
AugustoMauch (manager)
2014-08-26 09:42

Code reviewed and verified in pi@edc2a785a7a3
(0069766)
hudsonbot (developer)
2014-08-26 17:14

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/52ea34dbb55d [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-10-25 00:18 shuehner New Issue
2013-10-25 00:18 shuehner Assigned To => AugustoMauch
2013-10-25 00:18 shuehner Modules => Core
2013-10-25 00:18 shuehner Triggers an Emergency Pack => No
2014-06-30 12:47 alostale Assigned To AugustoMauch => inigosanchez
2014-08-26 00:38 hgbot Checkin
2014-08-26 00:38 hgbot Note Added: 0069725
2014-08-26 00:38 hgbot Status new => resolved
2014-08-26 00:38 hgbot Resolution open => fixed
2014-08-26 00:38 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/edc2a785a7a3abc57c88698e2331d24fc5fa749d [^]
2014-08-26 09:42 AugustoMauch Review Assigned To => AugustoMauch
2014-08-26 09:42 AugustoMauch Note Added: 0069745
2014-08-26 09:42 AugustoMauch Status resolved => closed
2014-08-26 09:42 AugustoMauch Fixed in Version => 3.0PR14Q4
2014-08-26 17:14 hudsonbot Checkin
2014-08-26 17:14 hudsonbot Note Added: 0069766


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker