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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034027
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2016-09-20 09:282016-09-27 18:50
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q4
StatusclosedFix in branchFixed in SCM revision1c1111f45555
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034027: NPE in build process if db.queryTimeout.* is set

DescriptionWhen setting in Openbravo.properties any profile for db.queryTimeout, a NPE is thrown in build process.
Steps To Reproduce* Edit Openbravo.properties and add db.queryTimeout.grid=1
* Run ant smartbuild -Dlocal=no
  -> Check logs:
apply.module:
     [java] 1 [main] ERROR org.openbravo.base.provider.OBProviderException - Exception when instantiating class org.openbravo.service.db.QueryTimeOutUtil for registration org.openbravo.service.db.QueryTimeOutUtil
     [java] java.lang.NullPointerException
     [java] at org.openbravo.service.db.QueryTimeOutUtil.testQueryTimeOut(QueryTimeOutUtil.java:119)
     [java] at org.openbravo.service.db.QueryTimeOutUtil.<init>(QueryTimeOutUtil.java:73)
     [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     [java] at java.lang.Class.newInstance(Class.java:383)
     [java] at org.openbravo.base.provider.OBProvider$Registration.getInstance(OBProvider.java:244)
     [java] at org.openbravo.base.provider.OBProvider.get(OBProvider.java:170)
     [java] at org.openbravo.service.db.QueryTimeOutUtil.getInstance(QueryTimeOutUtil.java:66)
     [java] at org.openbravo.erpCommon.modules.ApplyModuleData.selectClientReferenceModules(ApplyModuleData.java:197)
     [java] at org.openbravo.erpCommon.modules.ApplyModuleData.selectClientReferenceModules(ApplyModuleData.java:178)
     [java] at org.openbravo.erpCommon.modules.ApplyModuleTask.execute(ApplyModuleTask.java:73)
     [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
     [java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java] at java.lang.reflect.Method.invoke(Method.java:606)
     [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] at org.apache.tools.ant.Target.execute(Target.java:435)
     [java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
     [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
     [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
     [java] at org.openbravo.base.AntExecutor.runTask(AntExecutor.java:133)
     [java] at org.openbravo.erpCommon.modules.ApplyModuleTask.main(ApplyModuleTask.java:56)
     [java] 31 [main] ERROR org.openbravo.erpCommon.modules.ApplyModuleData - Exception in query: SELECT M.JAVAPACKAGE, M.NAME, M.AD_MODULE_ID, D.NAME as DS_NAME FROM AD_MODULE M, AD_DATASET D WHERE (M.STATUS = 'I' OR M.STATUS = 'P') AND M.HASREFERENCEDATA = 'Y' AND D.AD_MODULE_ID = M.AD_MODULE_ID AND D.ACCESSLEVEL = '4'Exception:org.openbravo.base.provider.OBProviderException: Exception when instantiating class org.openbravo.service.db.QueryTimeOutUtil for registration org.openbravo.service.db.QueryTimeOutUtil
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0090101)
hgbot (developer)
2016-09-20 09:39

Repository: erp/devel/pi
Changeset: 1c1111f455556d267130911900a37bdc6c4a364b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Sep 20 09:37:30 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1c1111f455556d267130911900a37bdc6c4a364b [^]

fixed bug 34027: NPE in build process if db.queryTimeout.* is set

  This NPE was thrown because in build process a connection was tried to be
  obtained from DAL which is not available this throws an expection that is
  not logged but left a statement with null value that later was tried to be
  closed, throwing the NPE.

  Fixed by guarding null value of the statement before closing it.

---
M src/org/openbravo/service/db/QueryTimeOutUtil.java
---
(0090123)
hudsonbot (developer)
2016-09-20 22:23

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/c5edc648de35 [^]
Maturity status: Test
(0090311)
caristu (developer)
2016-09-27 18:49

Code review + testing OK: build process ends successfully having db.queryTimeout set in Openbravo.properties.

- Issue History
Date Modified Username Field Change
2016-09-20 09:28 alostale New Issue
2016-09-20 09:28 alostale Assigned To => platform
2016-09-20 09:28 alostale Modules => Core
2016-09-20 09:28 alostale Triggers an Emergency Pack => No
2016-09-20 09:33 alostale Review Assigned To => caristu
2016-09-20 09:39 hgbot Checkin
2016-09-20 09:39 hgbot Note Added: 0090101
2016-09-20 09:39 hgbot Status new => resolved
2016-09-20 09:39 hgbot Resolution open => fixed
2016-09-20 09:39 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1c1111f455556d267130911900a37bdc6c4a364b [^]
2016-09-20 22:23 hudsonbot Checkin
2016-09-20 22:23 hudsonbot Note Added: 0090123
2016-09-27 18:49 caristu Note Added: 0090311
2016-09-27 18:49 caristu Status resolved => closed
2016-09-27 18:49 caristu Fixed in Version => 3.0PR16Q4
2016-09-27 18:50 caristu Assigned To platform => alostale


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker