You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (Jira)" <ji...@apache.org> on 2020/03/17 07:44:00 UTC
[jira] [Reopened] (OFBIZ-10948) Convert DimensionServices.xml
minilang to groovy
[ https://issues.apache.org/jira/browse/OFBIZ-10948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux reopened OFBIZ-10948:
-------------------------------------
Reopening, there is a bug with loadCurrencyDimension in DimensionServices.groovy. It shows when running quickInitDataWarehouse.
{noformat}
2020-03-16 11:24:48,265 |jsse-nio-8443-exec-6 |TransactionUtil |W| Calling transaction setRollbackOnly; this stack trace shows where this is happening:
java.lang.Exception: rollback called in Entity Engine SQLProcessor
at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:358) [main/:?]
at org.apache.ofbiz.entity.jdbc.SQLProcessor.rollback(SQLProcessor.java:185) [main/:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:112) [main/:?]
at org.apache.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:67) [main/:?]
at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:855) [main/:?]
at org.apache.ofbiz.entity.GenericValue.create(GenericValue.java:76) [main/:?]
at org.apache.ofbiz.entity.GenericValue$create$0.call(Unknown Source) [main/:?]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) [groovy-2.5.8.jar:2.5.8]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) [groovy-2.5.8.jar:2.5.8]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119) [groovy-2.5.8.jar:2.5.8]
at DimensionServices.loadCurrencyDimension(DimensionServices.groovy:93) [script:?]
[...]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
2020-03-16 11:24:48,274 |jsse-nio-8443-exec-6 |GenericDelegator |E| Failure in create operation for entity [CurrencyDimension]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:CurrencyDi
mension][createdStamp,2020-03-16 11:24:48.255(java.sql.Timestamp)][createdTxStamp,2020-03-16 11:24:42.085(java.sql.Timestamp)][currencyId,CRC(java.lang.String)][description,Costa Rica Colon(java.lang.String)][lastUpdatedStamp,2020-03-16
11:24:48.255(java.sql.Timestamp)][lastUpdatedTxStamp,2020-03-16 11:24:42.085(java.sql.Timestamp)] (SQL Exception while executing the following:INSERT INTO OFBIZ.CURRENCY_DIMENSION (DIMENSION_ID, CURRENCY_ID, DESCRIPTION, LAST_UPDATED_STA
MP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?) (Column 'DIMENSION_ID' cannot accept a NULL value.)). Rolling back transaction.
{noformat}
The problem is this Minilang expression is missing in DimensionServices.groovy:
{code:xml}
<sequenced-id sequence-name="CurrencyDimension" field="currencyDim.dimensionId"/>
{code}
Then the sepcial types defined in BiTypeData:
{code:xml}
<CurrencyDimension dimensionId="_NF_" description="Currency Not Found."/>
<CurrencyDimension dimensionId="_NA_" description="Currency Not Set."/>
{code}
are an issue.
Adding
{code:java}
delegator.setNextSeqId(currencyDim)
{code}
Is enough. The issue does not exist for the other special types:
{code:xml}
<DateDimension dimensionId="_NF_" description="Date Not Found."/>
<DateDimension dimensionId="_NA_" description="Date Not Set."/>
<ProductDimension dimensionId="_NF_"/>
<ProductDimension dimensionId="_NA_"/>
{code}
> Convert DimensionServices.xml minilang to groovy
> ------------------------------------------------
>
> Key: OFBIZ-10948
> URL: https://issues.apache.org/jira/browse/OFBIZ-10948
> Project: OFBiz
> Issue Type: Sub-task
> Components: bi
> Affects Versions: Trunk
> Reporter: Pierre Smits
> Assignee: Priya Sharma
> Priority: Major
> Labels: Minilang, dimension, dwh, groovy,, services
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-10948-updated.patch, OFBIZ-10948.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> With the purpose to deprecate mini-lang OFBIZ-9350, convert DimensionServices.xml
--
This message was sent by Atlassian Jira
(v8.3.4#803005)