Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0033515 | Openbravo ERP | A. Platform | public | 2016-07-20 16:44 | 2016-07-26 09:29 |
Reporter | Sanjota | ||||
Assigned To | alostale | ||||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 3.0PR16Q4 | |||
Merge Request Status | |||||
Review Assigned To | caristu | ||||
OBNetwork customer | No | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0033515: NPE in AdvancedQueryBuilder with joinAssociatedEntities if entity has computed columns | ||||
Description | AdvancedQueryBuilder has a joinAssociatedEntities which creates the query including joins for all many-to-one properties. If the entity being queried includes computed columns, a NPE is thrown. Note this does not affect standard behavior, as the default value for joinAssociatedEntities is always null when invoked from UI. | ||||
Steps To Reproduce | Whenever we use advanced query builder for retrieving records from the table, if the table has computed column(as property) then property.getTargetEntity() is null and KernelUtils.hasNullableIdentifierProperties(property.getTargetEntity()) will through null pointer exception. Example Scenario : Following are steps for one of the scenario faced 1) Install module org.openbravo.authorize.net to pi environment. 2) Test IssuesTest.java i.e Run as Junit. 3) Test - test20733() present in IssuesTest.java fails Giving details of the stack trace for Null pointer exception as java.lang.NullPointerException at org.openbravo.client.kernel.KernelUtils.hasNullableIdentifierProperties(KernelUtils.java:520) at org.openbravo.service.json.AdvancedQueryBuilder$JoinDefinition.getJoinStatement(AdvancedQueryBuilder.java:1838) at org.openbravo.service.json.AdvancedQueryBuilder.getJoinClause(AdvancedQueryBuilder.java:1349) at org.openbravo.service.json.DataEntityQueryService.getWhereClause(DataEntityQueryService.java:120) at org.openbravo.service.json.DataEntityQueryService.buildOBQuery(DataEntityQueryService.java:127) at org.openbravo.service.json.DataEntityQueryService.list(DataEntityQueryService.java:106) at org.openbravo.test.dal.IssuesTest.test20733(IssuesTest.java:818) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=9639&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-07-20 16:44 | Sanjota | New Issue | |||
2016-07-20 16:44 | Sanjota | Assigned To | => platform | ||
2016-07-20 16:44 | Sanjota | OBNetwork customer | => No | ||
2016-07-20 16:44 | Sanjota | Modules | => Core | ||
2016-07-20 16:44 | Sanjota | Triggers an Emergency Pack | => No | ||
2016-07-20 16:45 | Sanjota | Severity | major => minor | ||
2016-07-20 16:52 | aferraz | File Added: 33515.diff | |||
2016-07-21 09:08 | alostale | Summary | Nullpointer exception in KernelUtils.hasNullableIdentifierProperties() present in KernelUtils.java => NPE in AdvancedQueryBuilder with joinAssociatedEntities if entity has computed columns | ||
2016-07-21 09:08 | alostale | Description Updated | bug_revision_view_page.php?rev_id=12717#r12717 | ||
2016-07-21 09:12 | alostale | Review Assigned To | => caristu | ||
2016-07-21 09:12 | alostale | Assigned To | platform => alostale | ||
2016-07-21 09:13 | hgbot | Checkin | |||
2016-07-21 09:13 | hgbot | Note Added: 0088607 | |||
2016-07-21 09:13 | hgbot | Status | new => resolved | ||
2016-07-21 09:13 | hgbot | Resolution | open => fixed | ||
2016-07-21 09:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/b7bce66ab19202bc3cad0ca6070c6d5d21c6fed8 [^] | ||
2016-07-26 09:29 | caristu | Note Added: 0088657 | |||
2016-07-26 09:29 | caristu | Status | resolved => closed | ||
2016-07-26 09:29 | caristu | Fixed in Version | => 3.0PR16Q4 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|