Hello,
   In quite few screens the sql error is displayed in the UI if an entity 
operation results in error (esp. foreign key violation. One example, I created 
an organization through Ofbiz Setup, and tried to create an invoice. It shows a 
long exception message in the user screen (which is useful, but more useful for 
a technical person. In that sense, it is available in the log files). The 
reason could be easily seen in the log file.

---- stack trace ---------------------------------------------------------------
ERROR 23503: INSERT on table 'INVOICE' caused a violation of foreign key 
constraint 'INVOICE_CUOM' for key (defaultCurrencyUomId).  The statement has 
been rolled back.
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
org.apache.derby.impl.sql.execute.ForeignKeyRIChecker.doCheck(Unknown Source)

After a bit of debugging, I found the Party Accounting Preference needs to be 
available (in UI, through Accounting --> ORG GL Settings --> setup). Do you 
think it would be more useful for the user to have a text "The accounting setup 
needs to be completed before ...." in the UI than the exception message. I hope 
the end user also create parties etc. 
Thanks,
Babu.


      

Reply via email to