You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Shereen <sh...@hotmail.com> on 2010/10/09 13:14:32 UTC

Re: Can't install to MySQL 5 database

Would anyone please tell me the right to steps to use mysql database instead
of derby?
I know that I should change the entityengine.xml as exmply did what else
should i do?
also I have another question can I use external mysql server instead of
localmysql?


exmbly wrote:
> 
> Hi, Mridul,
> 
> I only made changes to the delegator and localmysql
> datasource/inline-jdbc.
> 
> Here's my delegators. I set things to localmysql datasourc and commented
> out the olap stuff. I wasn't sure about the default-no-eca so I changed
> that to localmysql datasource as well. Same for test.
> 
> <delegator name="default" entity-model-reader="main"
> entity-group-reader="main" entity-eca-reader="main"
> distributed-cache-clear-enabled="false">
>         <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
>         <!-- <group-map group-name="org.ofbiz.olap"
> datasource-name="localderbyolap"/>-->
>     </delegator>
>     <delegator name="default-no-eca" entity-model-reader="main"
> entity-group-reader="main" entity-eca-reader="main"
> entity-eca-enabled="false" distributed-cache-clear-enabled="false">
>         <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
>         <!-- <group-map group-name="org.ofbiz.olap"
> datasource-name="localderbyolap"/>-->
>     </delegator>
> 
>     <!-- be sure that your default delegator (or the one you use) uses the
> same datasource for test. You must run "ant run-install" before running
> "ant run-tests" -->
>     <delegator name="test" entity-model-reader="main"
> entity-group-reader="main" entity-eca-reader="main">
>         <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
>         <!-- <group-map group-name="org.ofbiz.olap"
> datasource-name="localderbyolap"/>-->
>     </delegator>
>     <delegator name="other" entity-model-reader="main"
> entity-group-reader="main" entity-eca-reader="main">
>         <group-map group-name="org.ofbiz"
> datasource-name="localpostgres"/>
>     </delegator>
> 
> The only other change I made was to the localmysql datasource inline-jdbc
> element to point to my instance of MySQL with my username and password. I
> created the ofbiz schema in MySQL as well.
> 
> <inline-jdbc
>                 jdbc-driver="com.mysql.jdbc.Driver"
>                 jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
>                 jdbc-username="<myusername>"
>                 jdbc-password="<mypassword>"
>                 isolation-level="ReadCommitted"
>                 pool-minsize="2"
>                 pool-maxsize="250"/>
> 
> Do you think I did something wrong here?
> 
> Thanks for your help.
> 
> Glenn... 
> 
> Mridul Pathak-2 wrote:
>> 
>> Can you please share your entityengine.xml file, there might be some
>> problem
>> in the configurations you have done.
>> -- 
>> Thanks & Regards
>> Mridul Pathak
>> Hotwax Media
>> http://www.hotwaxmedia.com
>> mridul.pathak@hotwaxmedia.com
>> 
>> On Wed, Sep 2, 2009 at 10:49 PM, exmbly <gl...@exmbly.com> wrote:
>> 
>>>
>>> I get the following error running ant run-install after changing to a
>>> MySQL
>>> 5
>>> database ( installing the jdbc driver and modifying entityengine.xml):
>>>
>>> [java] 2009-09-02 10:03:59,809 (main) [ ModelEntityChecker.java:501:INFO
>>> ]
>>> [initReservedWords] array length=1023
>>>     [java] Exception in thread "main" java.lang.NullPointerException
>>>     [java]     at
>>> org.ofbiz.entity.DelegatorImpl.getEntityFieldType(DelegatorImpl.java:1480)
>>>     [java]     at
>>>
>>> org.ofbiz.entity.model.ModelEntityChecker.checkEntities(ModelEntityChecker.java:101)
>>>     [java]     at
>>> org.ofbiz.entity.DelegatorImpl.<init>(DelegatorImpl.java:171)
>>>     [java]     at
>>>
>>> org.ofbiz.entity.DelegatorFactory.getGenericDelegator(DelegatorFactory.java:40)
>>>     [java]     at
>>>
>>> org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoadContainer.java:228)
>>>     [java]     at
>>> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
>>>     [java]     at
>>> org.ofbiz.base.start.Start.startStartLoaders(Start.java:272)
>>>     [java]     at org.ofbiz.base.start.Start.startServer(Start.java:322)
>>>     [java]     at org.ofbiz.base.start.Start.start(Start.java:326)
>>>     [java]     at org.ofbiz.base.start.Start.main(Start.java:409)
>>>     [java] 2009-09-02 10:03:59,856 (OFBiz_Shutdown_Hook) [
>>> ContainerLoader.java:114:INFO ] Shutting down containers
>>>     [java] Java Result: 1
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Can%27t-install-to-MySQL-5-database-tp25261762p25261762.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://ofbiz.135035.n4.nabble.com/Can-t-install-to-MySQL-5-database-tp163486p2969472.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Can't install to MySQL 5 database

Posted by Bilgin Ibryam <bi...@gmail.com>.
On Sat, Oct 9, 2010 at 12:14 PM, Shereen <sh...@hotmail.com> wrote:

>
> Would anyone please tell me the right to steps to use mysql database
> instead
> of derby?
> I know that I should change the entityengine.xml as exmply did what else
> should i do?
>

add the jdbc library to framework/entity/lib/jdbc


> also I have another question can I use external mysql server instead of
> localmysql?
>

Yes

Bilgin

>
>
> exmbly wrote:
> >
> > Hi, Mridul,
> >
> > I only made changes to the delegator and localmysql
> > datasource/inline-jdbc.
> >
> > Here's my delegators. I set things to localmysql datasourc and commented
> > out the olap stuff. I wasn't sure about the default-no-eca so I changed
> > that to localmysql datasource as well. Same for test.
> >
> > <delegator name="default" entity-model-reader="main"
> > entity-group-reader="main" entity-eca-reader="main"
> > distributed-cache-clear-enabled="false">
> >         <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
> >         <!-- <group-map group-name="org.ofbiz.olap"
> > datasource-name="localderbyolap"/>-->
> >     </delegator>
> >     <delegator name="default-no-eca" entity-model-reader="main"
> > entity-group-reader="main" entity-eca-reader="main"
> > entity-eca-enabled="false" distributed-cache-clear-enabled="false">
> >         <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
> >         <!-- <group-map group-name="org.ofbiz.olap"
> > datasource-name="localderbyolap"/>-->
> >     </delegator>
> >
> >     <!-- be sure that your default delegator (or the one you use) uses
> the
> > same datasource for test. You must run "ant run-install" before running
> > "ant run-tests" -->
> >     <delegator name="test" entity-model-reader="main"
> > entity-group-reader="main" entity-eca-reader="main">
> >         <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
> >         <!-- <group-map group-name="org.ofbiz.olap"
> > datasource-name="localderbyolap"/>-->
> >     </delegator>
> >     <delegator name="other" entity-model-reader="main"
> > entity-group-reader="main" entity-eca-reader="main">
> >         <group-map group-name="org.ofbiz"
> > datasource-name="localpostgres"/>
> >     </delegator>
> >
> > The only other change I made was to the localmysql datasource inline-jdbc
> > element to point to my instance of MySQL with my username and password. I
> > created the ofbiz schema in MySQL as well.
> >
> > <inline-jdbc
> >                 jdbc-driver="com.mysql.jdbc.Driver"
> >                 jdbc-uri="jdbc:mysql://
> 127.0.0.1/ofbiz?autoReconnect=true"
> >                 jdbc-username="<myusername>"
> >                 jdbc-password="<mypassword>"
> >                 isolation-level="ReadCommitted"
> >                 pool-minsize="2"
> >                 pool-maxsize="250"/>
> >
> > Do you think I did something wrong here?
> >
> > Thanks for your help.
> >
> > Glenn...
> >
> > Mridul Pathak-2 wrote:
> >>
> >> Can you please share your entityengine.xml file, there might be some
> >> problem
> >> in the configurations you have done.
> >> --
> >> Thanks & Regards
> >> Mridul Pathak
> >> Hotwax Media
> >> http://www.hotwaxmedia.com
> >> mridul.pathak@hotwaxmedia.com
> >>
> >> On Wed, Sep 2, 2009 at 10:49 PM, exmbly <gl...@exmbly.com> wrote:
> >>
> >>>
> >>> I get the following error running ant run-install after changing to a
> >>> MySQL
> >>> 5
> >>> database ( installing the jdbc driver and modifying entityengine.xml):
> >>>
> >>> [java] 2009-09-02 10:03:59,809 (main) [
> ModelEntityChecker.java:501:INFO
> >>> ]
> >>> [initReservedWords] array length=1023
> >>>     [java] Exception in thread "main" java.lang.NullPointerException
> >>>     [java]     at
> >>>
> org.ofbiz.entity.DelegatorImpl.getEntityFieldType(DelegatorImpl.java:1480)
> >>>     [java]     at
> >>>
> >>>
> org.ofbiz.entity.model.ModelEntityChecker.checkEntities(ModelEntityChecker.java:101)
> >>>     [java]     at
> >>> org.ofbiz.entity.DelegatorImpl.<init>(DelegatorImpl.java:171)
> >>>     [java]     at
> >>>
> >>>
> org.ofbiz.entity.DelegatorFactory.getGenericDelegator(DelegatorFactory.java:40)
> >>>     [java]     at
> >>>
> >>>
> org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoadContainer.java:228)
> >>>     [java]     at
> >>>
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> >>>     [java]     at
> >>> org.ofbiz.base.start.Start.startStartLoaders(Start.java:272)
> >>>     [java]     at
> org.ofbiz.base.start.Start.startServer(Start.java:322)
> >>>     [java]     at org.ofbiz.base.start.Start.start(Start.java:326)
> >>>     [java]     at org.ofbiz.base.start.Start.main(Start.java:409)
> >>>     [java] 2009-09-02 10:03:59,856 (OFBiz_Shutdown_Hook) [
> >>> ContainerLoader.java:114:INFO ] Shutting down containers
> >>>     [java] Java Result: 1
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://www.nabble.com/Can%27t-install-to-MySQL-5-database-tp25261762p25261762.html
> >>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Can-t-install-to-MySQL-5-database-tp163486p2969472.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>