[OFBiz] Users - Supplemental Delegator Help

Adrian Crum adrianc at hlmksw.com
Wed May 11 12:45:59 EDT 2005


I'm working on a custom service to update the OFBiz entities from
existing non-OFBiz applications. Our SQL server is capable of accessing
both sets of data, so I am trying to set up another delegator to read
the data from the non-OFBiz applications. I set it up to the best of my
ability, but I have missed something and it doesn't work.

I have searched Wiki and mailing list archives, but I can't find any
guidelines. I see where this question was asked before, but there was no
answer: http://lists.ofbiz.org/mailman/htdig/dev/2004-August/006060.html

If anyone knows of any links that will help guide me, please let me 
know. Once I have it mastered, I'll create a Wiki page describing the 
process.

Here is what I've done so far:

EntityEngine.xml
-----------------
<delegator name="hal-foxpro" entity-model-reader="main"
entity-group-reader="main" entity-eca-reader="main"
distributed-cache-clear-enabled="false">
   <group-map group-name="com.hlmksw.hal" datasource-name="hal-advantage"/>
</delegator>

<datasource name="hal-advantage"
   helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
   field-type-name="foxpro"
   check-on-start="false"
   add-missing-on-start="false"
   check-indices-on-start="false"
   use-foreign-keys="false"
   use-foreign-key-indices="true"
   join-style="ansi-no-parenthesis"
   alias-view-columns="true"
   always-use-constraint-keyword="true">
   <read-data reader-name="seed"/>
   <read-data reader-name="demo"/>
   <read-data reader-name="ext"/>
   <inline-jdbc jdbc-driver="com.extendedsystems.jdbc.advantage.ADSDriver"
 
jdbc-uri="jdbc:extendedsystems:advantage://rocket.hlmksw.com:6262;catalog=//hlmksw_rocket/sys/develop/hal/data;TableType=cdx;LockType=compatible"
     jdbc-username=""
     jdbc-password=""
     isolation-level="ReadCommitted"
     pool-minsize="2"
     pool-maxsize="20"/>
</datasource>

FieldTypeFoxpro.xml
-------------------
(contains modified copy of FieldTypeAdvantage.xml)

EntityGroup.xml
-----------------
<entitygroup>
   <entity-group group="com.hlmksw.hal" entity="sodeal01" />
</entitygroup>

EntityModel.xml
-----------------
<entity entity-name="sodeal01"
         package-name="org.ofbiz.dealer"
         title="HAL Dealer Entity">
   <field name="dealerno" type="id"></field>
   <field name="company" type="id-long"></field>
   <field name="address1" type="id-long"></field>
   <field name="address2" type="id-long"></field>
   <field name="city" type="id-long"></field>
   <field name="state" type="id-long"></field>
   <field name="zip" type="id-long"></field>
</entity>

I noticed that there is a delegator entry in web.xml, but I don't know 
if I'm supposed to do anything with that.

If I go into webtools, the external entity info is displayed, but when I 
click on "View Data" I get the error message:

257200[     ControlServlet.java:191:ERROR]
---- exception report 
----------------------------------------------------------
Error in request handler:
Exception: org.ofbiz.entity.GenericEntityException
Message: Helper name not found for entity sodeal01
---- stack trace 
---------------------------------------------------------------
org.ofbiz.entity.GenericEntityException: Helper name not found for 
entity sodeal01
org.ofbiz.entity.GenericDelegator.getEntityHelper(GenericDelegator.java:432)
org.ofbiz.entity.GenericDelegator.findCountByCondition(GenericDelegator.java:1962)



More information about the Users mailing list