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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040670
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajorhave not tried2019-04-24 13:062019-05-21 15:16
ReporterSandrahuguetView Statuspublic 
Assigned ToSandrahuguet 
PrioritynormalResolutionfixedFixed in Version3.0PR19Q3
StatusclosedFix in branchFixed in SCM revision0435d6d78784
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version7.x
OS VersionOpenbravo Appliance 14.04Database version9.3.xAnt version1.9.x
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2018-07-24
Regression introduced in release3.0PR18Q4
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/95dcfa93d706654e1fbddfc3966bec7280081ac1 [^]
Triggers an Emergency PackNo
Summary

0040670: Generate Aggregated Data Background process fail

DescriptionGenerate Aggregated Data Background process fail:

2019-04-24 13:04:31,985 [DefaultQuartzScheduler_Worker-4] ERROR org.openbravo.materialmgmt.GenerateAggregatedDataBackground - org.openbravo.model.common.enterprise.Organization cannot be cast to java.lang.String
java.lang.ClassCastException: org.openbravo.model.common.enterprise.Organization cannot be cast to java.lang.String
    at org.hibernate.type.descriptor.java.StringTypeDescriptor.unwrap(StringTypeDescriptor.java:22) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.type.descriptor.sql.VarcharTypeDescriptor$1.doBind(VarcharTypeDescriptor.java:46) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:74) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:280) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:275) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:53) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:645) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:2000) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1914) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1892) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.doQuery(Loader.java:937) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:340) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.doList(Loader.java:2689) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.doList(Loader.java:2672) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2506) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.Loader.list(Loader.java:2501) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:504) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:395) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1508) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1537) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1505) ~[hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.openbravo.dal.service.OBQuery.list(OBQuery.java:123) ~[classes/:?]
    at org.openbravo.materialmgmt.ResetValuedStockAggregated.costingRuleDefindedForPeriod(ResetValuedStockAggregated.java:245) ~[classes/:?]
    at org.openbravo.materialmgmt.GenerateAggregatedDataBackground.doExecute(GenerateAggregatedDataBackground.java:105) [classes/:?]
    at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:85) [classes/:?]
    at org.openbravo.scheduling.DefaultJob.execute(DefaultJob.java:65) [classes/:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.2.jar:1.6.2]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.2.jar:1.6.2]

The failure is caused by:
http://wiki.openbravo.com/wiki/Hibernate_5.3_Migration_Guide#Comparing_Business_Objects_and_IDs_with_Query_Parameters [^]
Steps To ReproduceGo to process request and create new record:
 -Client: F&B International Group
 -Organization: F&B España, S.A
 -Process: Generate Aggregated Data Background
 -Timing: Run Immediately
Schedule Process, notice that the process fail
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00406713.0PR19Q2 closedSandrahuguet Generate Aggregated Data Background process fail 
depends on backport 00406723.0PR19Q1.1 closedSandrahuguet Generate Aggregated Data Background process fail 
depends on backport 00406733.0PR18Q4.4 closedSandrahuguet Generate Aggregated Data Background process fail 
caused by feature request 0037064 closedcaristu upgrade hibernate to 5.3.2 
related to defect 0040623 closednonofrancisco Valued Stock Report with aggregated data not working when filtering by old data 
related to defect 0040676 closeddmiguelez Valued Stock Report not properly working when movementDate has more precision than days and aggregated data 

-  Notes
(0111277)
Sandrahuguet (developer)
2019-04-24 13:30
edited on: 2019-04-24 13:31

Test Plan:
Go to process request and create new record:
 -Client: F&B International Group
 -Organization: F&B España, S.A
 -Process: Generate Aggregated Data Background
 -Timing: Run Immediately
Schedule Process, notice that the process finish successfully

(0111281)
hgbot (developer)
2019-04-24 15:24

Repository: erp/devel/pi
Changeset: 0435d6d78784d1bb62043a95ce0ff0054737f8c5
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Apr 24 13:20:11 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0435d6d78784d1bb62043a95ce0ff0054737f8c5 [^]

Fixed issue 40670 Fix query to compare organization with corresponding id.

Fix query to compare organization with corresponding id instead of the
business object.

Fix wrong filter date, period.getEndingDate() is used and the correct
one is period.getStartingDate().

---
M src/org/openbravo/materialmgmt/ResetValuedStockAggregated.java
---
(0111349)
dmiguelez (developer)
2019-04-26 10:14

Code Review + Testing Ok
(0111995)
hudsonbot (developer)
2019-05-21 15:16

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/9b8f37d9d85e [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2019-04-24 13:06 Sandrahuguet New Issue
2019-04-24 13:06 Sandrahuguet Assigned To => Sandrahuguet
2019-04-24 13:06 Sandrahuguet Modules => Core
2019-04-24 13:06 Sandrahuguet Regression level => Production - Confirmed Stable
2019-04-24 13:06 Sandrahuguet Regression date => 2018-07-24
2019-04-24 13:06 Sandrahuguet Regression introduced in release => 3.0PR18Q4
2019-04-24 13:06 Sandrahuguet Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/95dcfa93d706654e1fbddfc3966bec7280081ac1 [^]
2019-04-24 13:06 Sandrahuguet Triggers an Emergency Pack => No
2019-04-24 13:06 Sandrahuguet Relationship added related to 0040623
2019-04-24 13:07 Sandrahuguet Relationship added caused by 0037064
2019-04-24 13:26 Sandrahuguet Status new => scheduled
2019-04-24 13:30 Sandrahuguet Note Added: 0111277
2019-04-24 13:31 Sandrahuguet Review Assigned To => dmiguelez
2019-04-24 13:31 Sandrahuguet Note Edited: 0111277 View Revisions
2019-04-24 15:24 hgbot Checkin
2019-04-24 15:24 hgbot Note Added: 0111281
2019-04-24 15:24 hgbot Status scheduled => resolved
2019-04-24 15:24 hgbot Resolution open => fixed
2019-04-24 15:24 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0435d6d78784d1bb62043a95ce0ff0054737f8c5 [^]
2019-04-26 10:14 dmiguelez Note Added: 0111349
2019-04-26 10:14 dmiguelez Status resolved => closed
2019-04-26 10:14 dmiguelez Fixed in Version => 3.0PR19Q3
2019-04-26 10:14 dmiguelez Relationship added related to 0040676
2019-05-21 15:16 hudsonbot Checkin
2019-05-21 15:16 hudsonbot Note Added: 0111995


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker