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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0024505
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionaryminorhave not tried2013-08-07 13:412013-08-27 15:39
ReportergorkaionView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0MP27
StatusclosedFix in branchFixed in SCM revision63599aca768e
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version1.5.0_15
OS VersionGentooDatabase version11gAnt version1.7.0
Product VersionSCM revision 
Review Assigned Toshankarb
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0024505: testADataAccessLevel fails with datasource based tables

DescriptionThe junit test testADataAccessLevel throws an error when there is an ad_table whose data origin is defined as DataSource.

    [junit] Testcase: testADataAccessLevel took 1.972 sec
    [junit] Caused an ERROR
    [junit] Exception when creating query from ManageVariants where (client = ?) and organization.id in ('0') and client.id in ('0') and active='Y'
    [junit] org.openbravo.base.exception.OBException: Exception when creating query from ManageVariants where (client = ?) and organization.id in ('0') and client.id in ('0') and active='Y'
    [junit] at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:243)
    [junit] at org.openbravo.dal.service.OBQuery.list(OBQuery.java:115)
    [junit] at org.openbravo.test.security.AccessLevelTest.testADataAccessLevel(AccessLevelTest.java:168)
    [junit] at org.openbravo.test.base.BaseTest.runTest(BaseTest.java:306)
    [junit] Caused by: org.hibernate.hql.ast.QuerySyntaxException: ManageVariants is not mapped [from ManageVariants where (client = ?) and organization.id in ('0') and client.id in ('0') and active='Y' ]
    [junit] at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180)
    [junit] at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:111)
    [junit] at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:93)
    [junit] at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:327)
    [junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3441)
    [junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3325)
    [junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:733)
    [junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:584)
    [junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:301)
    [junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:244)
    [junit] at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254)
    [junit] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)
    [junit] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
    [junit] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
    [junit] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
    [junit] at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:124)
    [junit] at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
    [junit] at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
    [junit] at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1770)
    [junit] at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:230)
Steps To ReproduceCreate a table based on a DataSource.

run the testADataAccessLevel test.
Proposed SolutionAttached a possible patch that ignores these entities. It has to be considered if an analogue test needs to be created to support this new type of tables.
TagsNo tags attached.
Attached Filespatch file icon AccessLevelTestFix.patch [^] (703 bytes) 2013-08-07 13:41 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00245143.0MP27 closedalostale Delete Client fails when the AD has Datasource based tables 

-  Notes
(0060529)
hgbot (developer)
2013-08-07 13:46

Repository: erp/devel/pi
Changeset: be6378d2dd4a75927f37cb71fe217045494e57a9
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Aug 07 13:44:37 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/be6378d2dd4a75927f37cb71fe217045494e57a9 [^]

Related to issue 24505.Temporarily disable test.

---
M src-test/org/openbravo/test/security/AccessLevelTest.java
---
(0060631)
hudsonbot (developer)
2013-08-16 20:31

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/59a1180e7f4f [^]

Maturity status: Test
(0060726)
hgbot (developer)
2013-08-22 10:52

Repository: erp/devel/pi
Changeset: efc3e16e81164a55a7f3127d51cc13b933499912
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 22 10:51:09 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/efc3e16e81164a55a7f3127d51cc13b933499912 [^]

Related to issue 24505: Fixes testADataAccessLevel test

The test testADataAccessLevel does not apply to entities based on datasources, because they are not associated with a database table.

---
M src-test/org/openbravo/test/security/AccessLevelTest.java
---
(0060727)
hgbot (developer)
2013-08-22 10:55

Repository: erp/devel/pi
Changeset: 63599aca768e315d6ba83b7811a12452784f3ed5
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 22 10:55:03 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/63599aca768e315d6ba83b7811a12452784f3ed5 [^]

Fixes issue 24505: Enables testADataAccessLevel test

---
M src-test/org/openbravo/test/security/AccessLevelTest.java
---
(0060735)
hudsonbot (developer)
2013-08-22 18:17

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/7535642cd9cf [^]

Maturity status: Test
(0060736)
hudsonbot (developer)
2013-08-22 18:17

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/7535642cd9cf [^]

Maturity status: Test
(0060791)
shankarb (developer)
2013-08-27 15:39

Code reviewed and verified in pi changeset 327ce5aac264

- Issue History
Date Modified Username Field Change
2013-08-07 13:41 gorkaion New Issue
2013-08-07 13:41 gorkaion Assigned To => AugustoMauch
2013-08-07 13:41 gorkaion File Added: AccessLevelTestFix.patch
2013-08-07 13:41 gorkaion Modules => Core
2013-08-07 13:41 gorkaion Triggers an Emergency Pack => No
2013-08-07 13:46 hgbot Checkin
2013-08-07 13:46 hgbot Note Added: 0060529
2013-08-08 14:41 alostale Relationship added related to 0024514
2013-08-16 20:31 hudsonbot Checkin
2013-08-16 20:31 hudsonbot Note Added: 0060631
2013-08-22 10:38 AugustoMauch Issue Monitored: dbaz
2013-08-22 10:39 AugustoMauch Review Assigned To => dbaz
2013-08-22 10:52 hgbot Checkin
2013-08-22 10:52 hgbot Note Added: 0060726
2013-08-22 10:55 hgbot Checkin
2013-08-22 10:55 hgbot Note Added: 0060727
2013-08-22 10:55 hgbot Status new => resolved
2013-08-22 10:55 hgbot Resolution open => fixed
2013-08-22 10:55 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/63599aca768e315d6ba83b7811a12452784f3ed5 [^]
2013-08-22 18:17 hudsonbot Checkin
2013-08-22 18:17 hudsonbot Note Added: 0060735
2013-08-22 18:17 hudsonbot Checkin
2013-08-22 18:17 hudsonbot Note Added: 0060736
2013-08-27 08:46 AugustoMauch Review Assigned To dbaz => shankarb
2013-08-27 15:39 shankarb Note Added: 0060791
2013-08-27 15:39 shankarb Status resolved => closed
2013-08-27 15:39 shankarb Fixed in Version => 3.0MP27


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker