You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Richard Fleming <ri...@thebva.com> on 2007/05/25 20:31:22 UTC

Entity error

Hi all -

I get the following error when I try this:
  <entity-condition entity-name="modelNumber" delegator-name="partslookup" list-name="models">
                    <condition-expr field-name="modelValue" env-name="modelValue"/>
                    <order-by field-name="modelnu"/>
                </entity-condition>

error:
org.ofbiz.base.util.GeneralException: Error rendering screen [component://ecommerce/widget/CatalogScreens.xml#DisplayFoundModels]: java.lang.IllegalArgumentException: Error in Entity Find: could not find entity with name [modelNumber] (Error in Entity Find: could not find entity with name [modelNumber])

entity-def:
<entity-group group="org.ofbiz.lookup" entity="ModelNumber"/>    

delegator-def:
    <delegator name="partslookup" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
        <group-map group-name="org.ofbiz.lookup" datasource-name="lookuppostgres"/>        
    </delegator>

The entity engine does create the table in the remote database using the correct delegator. Do I need to set the delegator someother place?

Rick



Re: Entity error

Posted by Richard Fleming <ri...@thebva.com>.
David, Chris,

Boy do I feel stupid........

entity-name="ModelNumber"

Sorry for wasting your time!

Rick

David E Jones <jo...@hotwaxmedia.com> wrote: 
A couple of thoughts:

1. entity names are case sensitive, check out that first letter in the entity-name and the error message

2. the entity definition you included is actually the entity group mapping; is there also a real entity definition (in an entitymodel*.xml file typically)?

-David


Richard Fleming wrote:
> Hi all -
> 
> I get the following error when I try this:
>   
>                     
>                     
>                 
> 
> error:
> org.ofbiz.base.util.GeneralException: Error rendering screen [component://ecommerce/widget/CatalogScreens.xml#DisplayFoundModels]: java.lang.IllegalArgumentException: Error in Entity Find: could not find entity with name [modelNumber] (Error in Entity Find: could not find entity with name [modelNumber])
> 
> entity-def:
>     
> 
> delegator-def:
>     
>                 
>     
> 
> The entity engine does create the table in the remote database using the correct delegator. Do I need to set the delegator someother place?
> 
> Rick
> 
> 
> 


Re: Entity error

Posted by David E Jones <jo...@hotwaxmedia.com>.
A couple of thoughts:

1. entity names are case sensitive, check out that first letter in the entity-name and the error message

2. the entity definition you included is actually the entity group mapping; is there also a real entity definition (in an entitymodel*.xml file typically)?

-David


Richard Fleming wrote:
> Hi all -
> 
> I get the following error when I try this:
>   <entity-condition entity-name="modelNumber" delegator-name="partslookup" list-name="models">
>                     <condition-expr field-name="modelValue" env-name="modelValue"/>
>                     <order-by field-name="modelnu"/>
>                 </entity-condition>
> 
> error:
> org.ofbiz.base.util.GeneralException: Error rendering screen [component://ecommerce/widget/CatalogScreens.xml#DisplayFoundModels]: java.lang.IllegalArgumentException: Error in Entity Find: could not find entity with name [modelNumber] (Error in Entity Find: could not find entity with name [modelNumber])
> 
> entity-def:
> <entity-group group="org.ofbiz.lookup" entity="ModelNumber"/>    
> 
> delegator-def:
>     <delegator name="partslookup" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
>         <group-map group-name="org.ofbiz.lookup" datasource-name="lookuppostgres"/>        
>     </delegator>
> 
> The entity engine does create the table in the remote database using the correct delegator. Do I need to set the delegator someother place?
> 
> Rick
> 
> 
> 

Re: Entity error

Posted by Chris Howe <cj...@yahoo.com>.
before looking into it closer, is your entity name modelNumber or
ModelNumber?  If it follows other ofbiz convention, entity names are
upper camel case (UpperCamelCase) and not lower camel case
(lowerCamelCase)
--- Richard Fleming <ri...@thebva.com> wrote:

> Hi all -
> 
> I get the following error when I try this:
>   <entity-condition entity-name="modelNumber"
> delegator-name="partslookup" list-name="models">
>                     <condition-expr field-name="modelValue"
> env-name="modelValue"/>
>                     <order-by field-name="modelnu"/>
>                 </entity-condition>
> 
> error:
> org.ofbiz.base.util.GeneralException: Error rendering screen
> [component://ecommerce/widget/CatalogScreens.xml#DisplayFoundModels]:
> java.lang.IllegalArgumentException: Error in Entity Find: could not
> find entity with name [modelNumber] (Error in Entity Find: could not
> find entity with name [modelNumber])
> 
> entity-def:
> <entity-group group="org.ofbiz.lookup" entity="ModelNumber"/>    
> 
> delegator-def:
>     <delegator name="partslookup" entity-model-reader="main"
> entity-group-reader="main" entity-eca-reader="main">
>         <group-map group-name="org.ofbiz.lookup"
> datasource-name="lookuppostgres"/>        
>     </delegator>
> 
> The entity engine does create the table in the remote database using
> the correct delegator. Do I need to set the delegator someother
> place?
> 
> Rick
> 
> 
>