[OFBiz] Users - Supplemental Delegator Help

Adrian Crum adrianc at hlmksw.com
Wed May 11 19:32:13 EDT 2005


Thanks for the reply David! That suggestion really helped.

Yeah, the second time I read through that page it made sense. I guess I'm a 
little slow. The page is right - having a second delegator would make 
programming more complicated.

Now my entity reference page shows the timestamp fields in the external table 
(which doesn't really have those fields) and when I click on View Data, OFBiz 
seems to get stuck in an intensive endless loop - I have to kill the process to 
get control of my PC back. I'll investigate further.


David E. Jones wrote:
> 
> Instead of creating another delegator tag in entityengine.xml you  need 
> to put both group-map tags under the "default" delegator (or  whichever 
> delegator you are using). If the reason for this is  unclear, I suggest 
> reading the short section in the Entity Engine  Configuration Guide at:
> 
> http://www.ofbiz.org/docs/entityconfig.html
> 
> -David
> 
> 
> On May 11, 2005, at 10:45 AM, Adrian Crum wrote:
> 
>> 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)
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.ofbiz.org
>> http://lists.ofbiz.org/mailman/listinfo/users
>>
> 
> 
> ------------------------------------------------------------------------
> 
>  
> _______________________________________________
> Users mailing list
> Users at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/users


More information about the Users mailing list