You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2015/06/25 19:27:04 UTC

[jira] [Closed] (OFBIZ-6532) Adding a new entity-group but no corresponding delegator/group-map is hard to debug

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

Jacques Le Roux closed OFBIZ-6532.
----------------------------------
    Resolution: Implemented

Done at revision: 1687589  

> Adding a new entity-group but no corresponding delegator/group-map is hard to debug
> -----------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6532
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6532
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>             Fix For: Upcoming Branch
>
>
> When you add a new entity-group in an entitygroup.xml, eg
> {code}
> <entity-group group="new.group.name"
> {code}
> but forget to set the corresponding delegator/group-map in entityengine.xml
> {code}
> <group-map group-name="new.group.name"
> {code}
> You get an error stack like
> {code}
> [java] 2015-06-25 16:56:25,036 |delegator-startup-1  |ModelEntityChecker  |INFO| [initReservedWords] array length = 1025
> [java] 2015-06-25 16:56:25,105 |main                 |ExecutionPool       |ERROR| null
> [java] java.util.concurrent.ExecutionException: java.lang.NullPointerException
> [java]     at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_45]
> [java]     at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_45]
> [java]     at org.ofbiz.base.concurrent.ExecutionPool.getAllFutures(ExecutionPool.java:83) [ofbiz-base.jar:?]
> [java]     at org.ofbiz.entity.DelegatorContainer.start(DelegatorContainer.java:55) [ofbiz-entity.jar:?]
> [java]     at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) [ofbiz-base.jar:?]
> [java]     at org.ofbiz.base.start.Start.startStartLoaders(Start.java:343) [ofbiz.jar:?]
> [java]     at org.ofbiz.base.start.Start.start(Start.java:369) [ofbiz.jar:?]
> [java]     at org.ofbiz.base.start.Start.main(Start.java:136) [ofbiz.jar:?]
> [java] Caused by: java.lang.NullPointerException
> [java]     at org.ofbiz.entity.GenericDelegator.getEntityFieldType(GenericDelegator.java:561) ~[ofbiz-entity.jar:?]
> [java]     at org.ofbiz.entity.model.ModelEntityChecker.checkEntities(ModelEntityChecker.java:111) ~[ofbiz-entity.jar:?]
> [java]     at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:224) ~[ofbiz-entity.jar:?]
> [java]     at org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:33) ~[ofbiz-entity.jar:?]
> [java]     at org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:25) ~[ofbiz-entity.jar:?]
> [java]     at org.ofbiz.base.util.UtilObject.getObjectFromFactory(UtilObject.java:200) ~[ofbiz-base.jar:?]
> [java]     at org.ofbiz.entity.DelegatorFactory$DelegatorConfigurable.call(DelegatorFactory.java:83) ~[ofbiz-entity.jar:?]
> [java]     at org.ofbiz.entity.DelegatorFactory$DelegatorConfigurable.call(DelegatorFactory.java:74) ~[ofbiz-entity.jar:?]
> [java]     at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_45]
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_45]
> [java]     at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_45]
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) ~[?:1.7.0_45]
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) ~[?:1.7.0_45]
> [java]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[?:1.7.0_45]
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[?:1.7.0_45]
> [java]     at java.lang.Thread.run(Thread.java:744) ~[?:1.7.0_45]
> [....]
> {code}
> and that's hard to debug. So we need to put a warning somewhere in the log...
> This can happen when several teams or developers work together and forget to communicate their entitygroup changes...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)