A couple of things I noticed.  When I used mysql (I don't anymore, I
use PG) I had this:

    <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="localmysql"/>
    </delegator>

I used "localmysql" for both (even olap).  Maybe this is wrong, but it
seemed to work for me.  For my localmysql, it looked like this (I
noticed you used UTF8, which is good).


    <datasource name="localmysql"
            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="utf8"
            collate="utf8_general_ci">
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <inline-jdbc
                jdbc-driver="com.mysql.jdbc.Driver"

jdbc-uri="jdbc:mysql://10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
                jdbc-username="ofbiz"
                jdbc-password="ofbizpass"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"/>
    </datasource>

"10.2.10.101" is my DB server.  Yours may be 127.0.0.1

I believe you need the "characterEncoding=UTF-8" to the URI.

On another note, I noticed that you are using "root" as your login to
mysql.  This is not considered a good practice.  In the above example,
you should create a user login for mysql for the user "ofbiz" and
assign a password to it.  The user "ofbiz" has to have sufficient
credentials (i.e. "grant all") as to allow creation of a database.  If
your mysql database is on a separate machine, then you need to make
sure you are able to login remotely, which is what ofbiz does.

Example(s):
mysql> grant all on *.* to 'ofbiz'@'host_where_ofbiz_runs' identified
by 'ofbizpass';
mysql> drop database ofbiz;
mysql> create database ofbiz;

You can test whether you can login remotely by doing something like this:

# mysql -u ofbiz -h dbhost -pofbizpass -A -D ofbiz -e "show databases"
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| ofbiz              |
+--------------------+

There are a lot of examples on the web on how to configure mysql for
this.  To restart, you probably have to drop the "ofbiz" database to
restart the whole process.

Also, ofbiz has over 800 tables, so you must optimize mysql.  If you
don't, it will be dog-slow.  The table_cache is real important.  This
is what I used to use (probably overkill).

bind-address            = 0.0.0.0
#
# * Fine Tuning
#
key_buffer              = 64M
max_allowed_packet      = 640M
thread_stack            = 192K
thread_cache_size       = 8
max_connections        = 50
table_cache            = 2400
table_definition_cache  = 2400
max_heap_table_size     = 512M
tmp_table_size          = 512M
join_buffer_size        = 5M
query_cache_limit       = 64M
query_cache_size        = 128M

Good luck.

On Mon, Jun 27, 2011 at 12:33 AM, Rakesh_Ists <rake...@istsinc.com> wrote:
> Hi,
>
> It started proper with derby.
>
> my entityEngine.xml look likes as folows
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <entity-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-config.xsd";>
>    <resource-loader name="fieldfile"
> class="org.ofbiz.base.config.FileLoader"
>            prepend-env="ofbiz.home" prefix="/framework/entity/fieldtype/"/>
>
>
>
>    <transaction-factory
> class="org.ofbiz.geronimo.GeronimoTransactionFactory"/>
>
>
>
>
>
>
>    <connection-factory
> class="org.ofbiz.entity.connection.DBCPConnectionFactory"/>
>
>    <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="odbcmysql"/>
>
>    </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="odbcmysql"/>
>  </delegator>
>
>
>    <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="odbcmysql"/>
>    </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>
>
>
>    <entity-model-reader name="main"/>
>
>
>    <entity-group-reader name="main"/>
>
>
>    <entity-eca-reader name="main"/>
>
>
>
>    <entity-data-reader name="seed"/>
>    <entity-data-reader name="seed-initial"/>
>    <entity-data-reader name="demo"/>
>    <entity-data-reader name="ext"/>
>    <entity-data-reader name="ext-test"/>
>    <entity-data-reader name="ext-demo"/>
>
>    <field-type name="hsql" loader="fieldfile"
> location="fieldtypehsql.xml"/>
>    <field-type name="derby" loader="fieldfile"
> location="fieldtypederby.xml"/>
>    <field-type name="cloudscape" loader="fieldfile"
> location="fieldtypecloudscape.xml"/>
>    <field-type name="daffodil" loader="fieldfile"
> location="fieldtypedaffodil.xml"/>
>    <field-type name="axion" loader="fieldfile"
> location="fieldtypeaxion.xml"/>
>    <field-type name="mysql" loader="fieldfile"
> location="fieldtypemysql.xml"/>
>    <field-type name="postgres" loader="fieldfile"
> location="fieldtypepostgres.xml"/>
>    <field-type name="postnew" loader="fieldfile"
> location="fieldtypepostnew.xml"/>
>    <field-type name="oracle" loader="fieldfile"
> location="fieldtypeoracle.xml"/>
>    <field-type name="sapdb" loader="fieldfile"
> location="fieldtypesapdb.xml"/>
>    <field-type name="sybase" loader="fieldfile"
> location="fieldtypesybase.xml"/>
>    <field-type name="firebird" loader="fieldfile"
> location="fieldtypefirebird.xml"/>
>    <field-type name="mssql" loader="fieldfile"
> location="fieldtypemssql.xml"/>
>    <field-type name="advantage" loader="fieldfile"
> location="fieldtypeadvantage.xml"/>
>
>
>
>
>    <datasource name="localmysql"
>            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="utf8"
>            collate="utf8_general_ci">
>        <read-data reader-name="seed"/>
>        <read-data reader-name="seed-initial"/>
>        <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/ofbiz?autoReconnect=true"
>                jdbc-username="root"
>                jdbc-password="abc"
>                isolation-level="ReadCommitted"
>                pool-minsize="2"
>                pool-maxsize="250"/>
>
>    </datasource>
>    <datasource name="odbcmysql"
>            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="utf8"
>            collate="utf8_general_ci">
>        <read-data reader-name="seed"/>
>        <inline-jdbc
>                jdbc-driver="com.mysql.jdbc.Driver"
>
> jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz_odbc?autoReconnect=true"
>                jdbc-username="root"
>                jdbc-password="abc"
>                isolation-level="ReadCommitted"
>                pool-minsize="2"
>                pool-maxsize="250"/>
>        </datasource>
>
> </entity-config>
>
>
> --
> View this message in context: 
> http://ofbiz.135035.n4.nabble.com/Problem-mysql-with-ofbiz-10-4-tp3616546p3627126.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Reply via email to