Solved. I mistakenly changed the entityDelegatorName in hot-deploy/legacydb/webapp/legacydb/WEB-INF/web.xml to "legacydb" when it needed to stay set to "default" so that it is aware of the web-related entities required to load the page.

On 01/15/2014 07:23 AM, Christian Carlow wrote:
Now I'm getting this error when visiting https://localhost:8443/legacydb/control/main:

HTTP Status 500 - [GenericDelegator.makePK] could not find entity for entityName: Visitor

The problem is that the legacydb delegator is not aware of the default delegator Visitor entity.

I tried adding this to my legacydb delegator to resolve the problem but it still occurs:
<group-map group-name="org.ofbiz" datasource-name="localpostgres"/>

Anyone have any idea what I'm missing?

On 01/14/2014 09:03 PM, Christian Carlow wrote:
On 01/14/2014 03:46 PM, Christian Carlow wrote:
I forgot to create separate reader and loader in entityentgine.xml for the legacydb delegator.

After changing changing the reader-name and loader attributes of <entity-resource> elements in hot-deploy/legacydb/ofbiz-component.xml, start no longer failed.

It might be worth mentioning of this step in https://cwiki.apache.org/confluence/display/OFBIZ/Handling+of+External+data

I've been trying to add the legacydb delegator instructed in https://cwiki.apache.org/confluence/display/OFBIZ/Handling+of+External+data but keep getting a nullPointerException error when this.getModelFieldTypeReader(entity) is called at line 539 of GenericDelegator.java. The exeption occurs for the fields that are supposed to be used for the legacydb delegator. The problem seems to be that the default delegator knows about the entities that are supposed to be handled by the legacydb delegator.

Can anyone tell me what I might be missing?

I created this delegator in entityengine.xml:
<delegator name="legacydb" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false"> <group-map group-name="org.legacydb" datasource-name="localmssql"/>
    </delegator>

I also created the entitygroup_olap.xml file with records for each entity as follows:
    <entity-group group="org.legacydb" entity="ApprovedsuppliersV2" />

I have these entity resources in the hot-deploy/legacydb/ofbiz-component.xml file: <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/> <entity-resource type="group" reader-name="main" loader="main" location="entitydef/entitygroup_olap.xml"/>






Reply via email to