[jira] [Reopened] (OFBIZ-10948) Convert DimensionServices.xml minilang to groovy

2020-03-21 Thread Pierre Smits (Jira)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-10948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Smits reopened OFBIZ-10948:
--

[~jleroux]

Your recent fix in 
https://github.com/apache/ofbiz-plugins/commit/350571deaadef1cecc837ad6688d9cdedd630887#diff-e9cd26f324532e93b4b0dec5717a5350
 did not fix the issue.

Will you take care of this?


{code:java}
2020-03-21 14:03:07,630 |27.0.0.1-8009-exec-2 |ServiceDispatcher |T| [[Sync 
service failed...- total:0.0,since last(Begin):0.0]] - 'bi / 
loadCurrencyDimension'
2020-03-21 14:03:07,630 |27.0.0.1-8009-exec-2 |TransactionUtil |W| Calling 
transaction setRollbackOnly; this stack trace shows where this is happening:
java.lang.Exception: Service [loadCurrencyDimension] threw an unexpected 
exception/error
at 
org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:358)
 [main/:?]
at 
org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:292)
 [main/:?]
at 
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:540) 
[main/:?]
at 
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240) 
[main/:?]
at 
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
 [main/:?]
at org.apache.ofbiz.service.LocalDispatcher$runSync$0.call(Unknown Source) 
[main/:?]
at 
org.apache.ofbiz.service.engine.GroovyBaseScript.runService(GroovyBaseScript.groovy:48)
 [main/:?]
at sun.reflect.GeneratedMethodAccessor492.invoke(Unknown Source) ~[?:?]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_242]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
at 
org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
 [groovy-2.5.8.jar:2.5.8]
at 
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:167)
 [groovy-2.5.8.jar:2.5.8]
at 
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
 [groovy-2.5.8.jar:2.5.8]
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
 [groovy-2.5.8.jar:2.5.8]
at 
org.apache.ofbiz.service.engine.GroovyBaseScript.run(GroovyBaseScript.groovy:56)
 [main/:?]
at org.apache.ofbiz.service.engine.GroovyBaseScript$run$1.callCurrent(Unknown 
Source) [main/:?]
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
 [groovy-2.5.8.jar:2.5.8]
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
 [groovy-2.5.8.jar:2.5.8]
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
 [groovy-2.5.8.jar:2.5.8]
at DimensionServices.quickInitDataWarehouse(DimensionServices.groovy:33) 
[script:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_242]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_242]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101) 
[groovy-2.5.8.jar:2.5.8]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) 
[groovy-2.5.8.jar:2.5.8]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217) 
[groovy-2.5.8.jar:2.5.8]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041) 
[groovy-2.5.8.jar:2.5.8]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:821) 
[groovy-2.5.8.jar:2.5.8]
at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44) 
[groovy-2.5.8.jar:2.5.8]
at groovy.lang.Script.invokeMethod(Script.java:77) [groovy-2.5.8.jar:2.5.8]
at org.apache.ofbiz.service.engine.GroovyEngine.runSync(GroovyEngine.java:110) 
[main/:?]
at 
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:417) 
[main/:?]
at 
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240) 
[main/:?]
at 
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
 [main/:?]
at 
org.apache.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:253)
 [main/:?]
at 
org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:756)
 [main/:?]
at 
org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:477)
 [main/:?]
at 
org.apache.ofbiz.webapp.control.ControlServlet.handle(ControlServlet.java:232) 
[main/:?]
at 
org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:81) 
[main/:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) 
[tomcat-servlet-api-9.0.31.jar:?]
at 

[jira] [Reopened] (OFBIZ-10948) Convert DimensionServices.xml minilang to groovy

2020-03-17 Thread Jacques Le Roux (Jira)


 [ 
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}

{code}

Then the sepcial types defined in BiTypeData:
{code:xml}


{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}





{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)