ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BJ Freeman <bjf...@free-man.net>
Subject Re: Urgent! How OFBiz supports multi databases;
Date Thu, 05 Feb 2009 10:55:25 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

this is the problem
Message: Could not find definition for entity name hello3.HelloPerson


Jack Liu sent the following on 2/5/2009 2:23 AM:
> Hi All!
> First, I add a delegator and a datasource in entity-engine.xml:
> 
> 	<delegator name="hello3" entity-model-reader="main"
> entity-group-reader="main" entity-eca-reader="main"
> distributed-cache-clear-enabled="false">
>     		<group-map group-name="com.aicent"
> datasource-name="hello3"/>
>     </delegator>
>     
>     <datasource name="hello3"
>         helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
>         field-type-name="mysql"
>         check-on-start="true"
>         add-missing-on-start="true"
>         check-pks-on-start="false"
>         use-foreign-keys="true"
>         join-style="ansi-no-parenthesis"
>         alias-view-columns="false"
>         drop-fk-use-foreign-key-keyword="true"
>         table-type="InnoDB"
>         character-set="latin1"
>         collate="latin1_general_cs">
>     <read-data reader-name="seed"/>
>     <read-data reader-name="demo"/>
>     <read-data reader-name="ext"/>
>     <inline-jdbc
>             jdbc-driver="com.mysql.jdbc.Driver"
>             jdbc-uri="jdbc:mysql://127.0.0.1/hello"
>             jdbc-username="root"
>             jdbc-password="asdfgh"
>             isolation-level="ReadCommitted"
>             pool-minsize="2"
>             pool-maxsize="20"/>
>     <!-- <jndi-jdbc jndi-server-name="localjndi"
> jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
> </datasource>
> 
> Then,in my demo hello3's file entitygroup.xml:
> 	<entity-group group="com.aicent" entity="HelloPerson" />
>      <entity-group group="com.aicent" entity="HelloHobby" />
>      <entity-group group="com.aicent" entity="HelloPersonHobby" />
> 
> These entities HelloPerson HelloHobby HelloPersonHobby are defined in
> entitymodel.xml
> 
> In services.xml I define a service named createHelloPerson:
> 
> <service name="createHelloPerson" engine="java"
> 		location="org.ofbiz.hello3.Hello3Services"
> invoke="createHelloPerson">
> 		<description>Create a HelloPerson</description>
> 		<auto-attributes mode="IN" entity-name="HelloPerson"
> include="nonpk" optional="true" />
> 		<attribute name="helloPersonId" mode="OUT" type="String"
> optional="false" />
> 	</service>
> 
> All other files were well created.
> 
> Then I am starting OFBiz, A error encountered in console.log
> 
> 	2009-02-05 18:02:59,540 (main) [UtilXml.java:243:DEBUG] XML Read
> 0.0s: D:/projects/ofbiz/hot-deploy/hello3/servicedef/services.xml
> 2009-02-05 18:02:59,555 (main) [   GenericDelegator.java:304:ERROR] 
> ---- exception report
> ----------------------------------------------------------
> Error getting entity definition from model
> Exception: org.ofbiz.entity.GenericModelException
> Message: Could not find definition for entity name hello3.HelloPerson
> ---- stack trace
> ---------------------------------------------------------------
> org.ofbiz.entity.GenericModelException: Could not find definition for
> entity name hello3.HelloPerson
> org.ofbiz.entity.model.ModelReader.getModelEntity(ModelReader.java:456)
> org.ofbiz.entity.GenericDelegator.getModelEntity(GenericDelegator.java:3
> 02)
> org.ofbiz.service.ModelServiceReader.createAutoAttrDef(ModelServiceReade
> r.java:480)
> org.ofbiz.service.ModelServiceReader.createAutoAttrDefs(ModelServiceRead
> er.java:452)
> org.ofbiz.service.ModelServiceReader.createModelService(ModelServiceRead
> er.java:311)
> org.ofbiz.service.ModelServiceReader.getModelServices(ModelServiceReader
> .java:166)
> org.ofbiz.service.ModelServiceReader.<init>(ModelServiceReader.java:100)
> org.ofbiz.service.ModelServiceReader.getModelServiceMap(ModelServiceRead
> er.java:81)
> org.ofbiz.service.DispatchContext.getGlobalServiceMap(DispatchContext.ja
> va:320)
> org.ofbiz.service.DispatchContext.loadReaders(DispatchContext.java:79)
> org.ofbiz.service.GenericDispatcher.init(GenericDispatcher.java:127)
> org.ofbiz.service.GenericDispatcher.<init>(GenericDispatcher.java:115)
> org.ofbiz.service.GenericDispatcher.getLocalDispatcher(GenericDispatcher
> .java:75)
> org.ofbiz.service.GenericDispatcher.getLocalDispatcher(GenericDispatcher
> .java:39)
> org.ofbiz.entityext.EntityServiceFactory.getLocalDispatcher(EntityServic
> eFactory.java:34)
> org.ofbiz.entityext.EntityServiceFactory.getDispatchContext(EntityServic
> eFactory.java:39)
> org.ofbiz.entityext.eca.DelegatorEcaHandler.setDelegator(DelegatorEcaHan
> dler.java:53)
> org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:235)
> org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegator.j
> ava:117)
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.ja
> va:165)
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.j
> ava:141)
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:65)
> org.ofbiz.base.start.Start.initStartLoaders(Start.java:248)
> org.ofbiz.base.start.Start.init(Start.java:87)
> org.ofbiz.base.start.Start.main(Start.java:403)
> 
> 
> How to solve this problem or How OFBiz supports multi databases?
> 
> Thank you!
> 
> 
> Best Regards,
> 
> Jack Liu 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJisWdrP3NbaWWqE4RAo/zAKC0SmNlHrVjIzdJ5LRnTX9/WdY6fACfS3g3
Qbg+wfebFKT4aj+pJ/bTZ38=
=BmRS
-----END PGP SIGNATURE-----

Mime
View raw message