Re: svn commit: r1791361 - /ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1791361 - /ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml

Deepak Dixit-3
Hi Jacques,

Did you get a chance to test it?

I am getting error while connecting with mysql due to this change.
jdbc-uri pattern should be


*https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html
<https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html>*

 <https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html>
*jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]]
[?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]*

According to this we need to add &amp; to pass characterEncoding in jdbc-uri.

jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz_odbc?autoReconnect=true&amp;characterEncoding=UTF-8"


Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Fri, Apr 14, 2017 at 6:32 PM, <[hidden email]> wrote:

> Author: jleroux
> Date: Fri Apr 14 13:02:33 2017
> New Revision: 1791361
>
> URL: http://svn.apache.org/viewvc?rev=1791361&view=rev
> Log:
> After changing the How+to+migrate+OFBiz+from+Derby+to+MySQL+database page
> in
> wiki following Ingo's suggestion on user ML, adapts also the entityengine
> definition to modern mySQL use
>
> Modified:
>     ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
>
> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/config/
> entityengine.xml
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
> framework/entity/config/entityengine.xml?rev=1791361&
> r1=1791360&r2=1791361&view=diff
> ============================================================
> ==================
> --- ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
> (original)
> +++ ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
> Fri Apr 14 13:02:33 2017
> @@ -321,6 +321,19 @@ access. For a detailed description see t
>                  time-between-eviction-runs-millis="600000"/>
>      </datasource>
>
> +    <!-- Also consider:
> +    mysql.conf
> +    [client]
> +    default-character-set=utf8
> +    [mysql]
> +    default-character-set=utf8
> +    [mysqld]
> +    collation-server = utf8_unicode_ci
> +    init-connect='SET NAMES utf8'
> +    character-set-server = utf8
> +
> +    Mysql Version: > 5.6.4 (supports datetime milliseconds)
> +     -->
>      <datasource name="localmysql"
>              helper-class="org.apache.ofbiz.entity.datasource.
> GenericHelperDAO"
>              field-type-name="mysql"
> @@ -332,8 +345,8 @@ access. For a detailed description see t
>              alias-view-columns="false"
>              drop-fk-use-foreign-key-keyword="true"
>              table-type="InnoDB"
> -            character-set="latin1"
> -            collate="latin1_general_cs">
> +            character-set="utf8"
> +            collate="utf8_general_ci">
>          <read-data reader-name="tenant"/>
>          <read-data reader-name="seed"/>
>          <read-data reader-name="seed-initial"/>
> @@ -343,7 +356,7 @@ access. For a detailed description see t
>          <read-data reader-name="ext-demo"/>
>          <inline-jdbc
>                  jdbc-driver="com.mysql.jdbc.Driver"
> -                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true
> "
> +                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true
> ;characterEncoding=UTF-8"
>                  jdbc-username="ofbiz"
>                  jdbc-password="ofbiz"
>                  isolation-level="ReadCommitted"
> @@ -365,8 +378,8 @@ access. For a detailed description see t
>              alias-view-columns="false"
>              drop-fk-use-foreign-key-keyword="true"
>              table-type="InnoDB"
> -            character-set="latin1"
> -            collate="latin1_general_cs">
> +            character-set="utf8"
> +            collate="utf8_general_ci">
>          <read-data reader-name="tenant"/>
>          <read-data reader-name="seed"/>
>          <read-data reader-name="seed-initial"/>
> @@ -376,7 +389,7 @@ access. For a detailed description see t
>          <read-data reader-name="ext-demo"/>
>          <inline-jdbc
>                  jdbc-driver="com.mysql.jdbc.Driver"
> -                jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?autoReconnect=
> true"
> +                jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?autoReconnect=
> true ;characterEncoding=UTF-8"
>                  jdbc-username="ofbiz"
>                  jdbc-password="ofbiz"
>                  isolation-level="ReadCommitted"
> @@ -398,8 +411,8 @@ access. For a detailed description see t
>              alias-view-columns="false"
>              drop-fk-use-foreign-key-keyword="true"
>              table-type="InnoDB"
> -            character-set="latin1"
> -            collate="latin1_general_cs">
> +            character-set="utf8"
> +            collate="utf8_general_ci">
>          <read-data reader-name="tenant"/>
>          <read-data reader-name="seed"/>
>          <read-data reader-name="seed-initial"/>
> @@ -409,7 +422,7 @@ access. For a detailed description see t
>          <read-data reader-name="ext-demo"/>
>          <inline-jdbc
>                  jdbc-driver="com.mysql.jdbc.Driver"
> -                jdbc-uri="jdbc:mysql://127.0.
> 0.1/ofbiztenant?autoReconnect=true"
> +                jdbc-uri="jdbc:mysql://127.0.
> 0.1/ofbiztenant?autoReconnect=true ;characterEncoding=UTF-8"
>                  jdbc-username="ofbiz"
>                  jdbc-password="ofbiz"
>                  isolation-level="ReadCommitted"
> @@ -431,13 +444,13 @@ access. For a detailed description see t
>              alias-view-columns="false"
>              drop-fk-use-foreign-key-keyword="true"
>              table-type="InnoDB"
> -            character-set="latin1"
> -            collate="latin1_general_cs">
> +            character-set="utf8"
> +            collate="utf8_general_ci">
>          <read-data reader-name="tenant"/>
>          <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-uri="jdbc:mysql://127.0.
> 0.1/ofbiz_odbc?autoReconnect=true ;characterEncoding=UTF-8"
>                  jdbc-username="ofbiz"
>                  jdbc-password="ofbiz"
>                  isolation-level="ReadCommitted"
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1791361 - /ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml

Jacques Le Roux
Administrator
Thanks Deepak,

I copied it from http://markmail.org/message/i4wxc3qpqhv7njmz and I must say I did not test, it was an obvious change to me :/

I though wondered why there was a white space between true and ";".

I now understand what happened, somehow the "&amp;" Ingo wrote got transformed into a simple & and I copied it with a space before because it got also
split at this location by the email channel.

I also updated https://cwiki.apache.org/confluence/display/OFBIZ/How+to+migrate+OFBiz+from+Derby+to+MySQL+database where I did start 1st.

Sorry for that :)

Jacques


Le 01/05/2017 à 08:57, Deepak Dixit a écrit :

> Hi Jacques,
>
> Did you get a chance to test it?
>
> I am getting error while connecting with mysql due to this change.
> jdbc-uri pattern should be
>
>
> *https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html
> <https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html>*
>
>   <https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html>
> *jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]]
> [?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]*
>
> According to this we need to add &amp; to pass characterEncoding in jdbc-uri.
>
> jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz_odbc?autoReconnect=true&amp;characterEncoding=UTF-8"
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Fri, Apr 14, 2017 at 6:32 PM, <[hidden email]> wrote:
>
>> Author: jleroux
>> Date: Fri Apr 14 13:02:33 2017
>> New Revision: 1791361
>>
>> URL: http://svn.apache.org/viewvc?rev=1791361&view=rev
>> Log:
>> After changing the How+to+migrate+OFBiz+from+Derby+to+MySQL+database page
>> in
>> wiki following Ingo's suggestion on user ML, adapts also the entityengine
>> definition to modern mySQL use
>>
>> Modified:
>>      ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
>>
>> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/config/
>> entityengine.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
>> framework/entity/config/entityengine.xml?rev=1791361&
>> r1=1791360&r2=1791361&view=diff
>> ============================================================
>> ==================
>> --- ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
>> (original)
>> +++ ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
>> Fri Apr 14 13:02:33 2017
>> @@ -321,6 +321,19 @@ access. For a detailed description see t
>>                   time-between-eviction-runs-millis="600000"/>
>>       </datasource>
>>
>> +    <!-- Also consider:
>> +    mysql.conf
>> +    [client]
>> +    default-character-set=utf8
>> +    [mysql]
>> +    default-character-set=utf8
>> +    [mysqld]
>> +    collation-server = utf8_unicode_ci
>> +    init-connect='SET NAMES utf8'
>> +    character-set-server = utf8
>> +
>> +    Mysql Version: > 5.6.4 (supports datetime milliseconds)
>> +     -->
>>       <datasource name="localmysql"
>>               helper-class="org.apache.ofbiz.entity.datasource.
>> GenericHelperDAO"
>>               field-type-name="mysql"
>> @@ -332,8 +345,8 @@ access. For a detailed description see t
>>               alias-view-columns="false"
>>               drop-fk-use-foreign-key-keyword="true"
>>               table-type="InnoDB"
>> -            character-set="latin1"
>> -            collate="latin1_general_cs">
>> +            character-set="utf8"
>> +            collate="utf8_general_ci">
>>           <read-data reader-name="tenant"/>
>>           <read-data reader-name="seed"/>
>>           <read-data reader-name="seed-initial"/>
>> @@ -343,7 +356,7 @@ access. For a detailed description see t
>>           <read-data reader-name="ext-demo"/>
>>           <inline-jdbc
>>                   jdbc-driver="com.mysql.jdbc.Driver"
>> -                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true
>> "
>> +                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true
>> ;characterEncoding=UTF-8"
>>                   jdbc-username="ofbiz"
>>                   jdbc-password="ofbiz"
>>                   isolation-level="ReadCommitted"
>> @@ -365,8 +378,8 @@ access. For a detailed description see t
>>               alias-view-columns="false"
>>               drop-fk-use-foreign-key-keyword="true"
>>               table-type="InnoDB"
>> -            character-set="latin1"
>> -            collate="latin1_general_cs">
>> +            character-set="utf8"
>> +            collate="utf8_general_ci">
>>           <read-data reader-name="tenant"/>
>>           <read-data reader-name="seed"/>
>>           <read-data reader-name="seed-initial"/>
>> @@ -376,7 +389,7 @@ access. For a detailed description see t
>>           <read-data reader-name="ext-demo"/>
>>           <inline-jdbc
>>                   jdbc-driver="com.mysql.jdbc.Driver"
>> -                jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?autoReconnect=
>> true"
>> +                jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?autoReconnect=
>> true ;characterEncoding=UTF-8"
>>                   jdbc-username="ofbiz"
>>                   jdbc-password="ofbiz"
>>                   isolation-level="ReadCommitted"
>> @@ -398,8 +411,8 @@ access. For a detailed description see t
>>               alias-view-columns="false"
>>               drop-fk-use-foreign-key-keyword="true"
>>               table-type="InnoDB"
>> -            character-set="latin1"
>> -            collate="latin1_general_cs">
>> +            character-set="utf8"
>> +            collate="utf8_general_ci">
>>           <read-data reader-name="tenant"/>
>>           <read-data reader-name="seed"/>
>>           <read-data reader-name="seed-initial"/>
>> @@ -409,7 +422,7 @@ access. For a detailed description see t
>>           <read-data reader-name="ext-demo"/>
>>           <inline-jdbc
>>                   jdbc-driver="com.mysql.jdbc.Driver"
>> -                jdbc-uri="jdbc:mysql://127.0.
>> 0.1/ofbiztenant?autoReconnect=true"
>> +                jdbc-uri="jdbc:mysql://127.0.
>> 0.1/ofbiztenant?autoReconnect=true ;characterEncoding=UTF-8"
>>                   jdbc-username="ofbiz"
>>                   jdbc-password="ofbiz"
>>                   isolation-level="ReadCommitted"
>> @@ -431,13 +444,13 @@ access. For a detailed description see t
>>               alias-view-columns="false"
>>               drop-fk-use-foreign-key-keyword="true"
>>               table-type="InnoDB"
>> -            character-set="latin1"
>> -            collate="latin1_general_cs">
>> +            character-set="utf8"
>> +            collate="utf8_general_ci">
>>           <read-data reader-name="tenant"/>
>>           <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-uri="jdbc:mysql://127.0.
>> 0.1/ofbiz_odbc?autoReconnect=true ;characterEncoding=UTF-8"
>>                   jdbc-username="ofbiz"
>>                   jdbc-password="ofbiz"
>>                   isolation-level="ReadCommitted"
>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1791361 - /ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml

Deepak Dixit-3
Thanks Jacques,

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Mon, May 1, 2017 at 2:34 PM, Jacques Le Roux <
[hidden email]> wrote:

> Thanks Deepak,
>
> I copied it from http://markmail.org/message/i4wxc3qpqhv7njmz and I must
> say I did not test, it was an obvious change to me :/
>
> I though wondered why there was a white space between true and ";".
>
> I now understand what happened, somehow the "&amp;" Ingo wrote got
> transformed into a simple & and I copied it with a space before because it
> got also split at this location by the email channel.
>
> I also updated https://cwiki.apache.org/confluence/display/OFBIZ/How+to+
> migrate+OFBiz+from+Derby+to+MySQL+database where I did start 1st.
>
> Sorry for that :)
>
> Jacques
>
>
> Le 01/05/2017 à 08:57, Deepak Dixit a écrit :
>
>> Hi Jacques,
>>
>> Did you get a chance to test it?
>>
>> I am getting error while connecting with mysql due to this change.
>> jdbc-uri pattern should be
>>
>>
>> *https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-
>> reference-configuration-properties.html
>> <https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-
>> reference-configuration-properties.html>*
>>
>>   <https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-
>> reference-configuration-properties.html>
>> *jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]]
>> [?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]*
>>
>>
>> According to this we need to add &amp; to pass characterEncoding in
>> jdbc-uri.
>>
>> jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz_odbc?autoReconnect=tr
>> ue&amp;characterEncoding=UTF-8"
>>
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>>
>> On Fri, Apr 14, 2017 at 6:32 PM, <[hidden email]> wrote:
>>
>> Author: jleroux
>>> Date: Fri Apr 14 13:02:33 2017
>>> New Revision: 1791361
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1791361&view=rev
>>> Log:
>>> After changing the How+to+migrate+OFBiz+from+Derby+to+MySQL+database
>>> page
>>> in
>>> wiki following Ingo's suggestion on user ML, adapts also the entityengine
>>> definition to modern mySQL use
>>>
>>> Modified:
>>>      ofbiz/ofbiz-framework/trunk/framework/entity/config/entitye
>>> ngine.xml
>>>
>>> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/config/
>>> entityengine.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
>>> framework/entity/config/entityengine.xml?rev=1791361&
>>> r1=1791360&r2=1791361&view=diff
>>> ============================================================
>>> ==================
>>> --- ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
>>> (original)
>>> +++ ofbiz/ofbiz-framework/trunk/framework/entity/config/entityengine.xml
>>> Fri Apr 14 13:02:33 2017
>>> @@ -321,6 +321,19 @@ access. For a detailed description see t
>>>                   time-between-eviction-runs-millis="600000"/>
>>>       </datasource>
>>>
>>> +    <!-- Also consider:
>>> +    mysql.conf
>>> +    [client]
>>> +    default-character-set=utf8
>>> +    [mysql]
>>> +    default-character-set=utf8
>>> +    [mysqld]
>>> +    collation-server = utf8_unicode_ci
>>> +    init-connect='SET NAMES utf8'
>>> +    character-set-server = utf8
>>> +
>>> +    Mysql Version: > 5.6.4 (supports datetime milliseconds)
>>> +     -->
>>>       <datasource name="localmysql"
>>>               helper-class="org.apache.ofbiz.entity.datasource.
>>> GenericHelperDAO"
>>>               field-type-name="mysql"
>>> @@ -332,8 +345,8 @@ access. For a detailed description see t
>>>               alias-view-columns="false"
>>>               drop-fk-use-foreign-key-keyword="true"
>>>               table-type="InnoDB"
>>> -            character-set="latin1"
>>> -            collate="latin1_general_cs">
>>> +            character-set="utf8"
>>> +            collate="utf8_general_ci">
>>>           <read-data reader-name="tenant"/>
>>>           <read-data reader-name="seed"/>
>>>           <read-data reader-name="seed-initial"/>
>>> @@ -343,7 +356,7 @@ access. For a detailed description see t
>>>           <read-data reader-name="ext-demo"/>
>>>           <inline-jdbc
>>>                   jdbc-driver="com.mysql.jdbc.Driver"
>>> -                jdbc-uri="jdbc:mysql://127.0.0
>>> .1/ofbiz?autoReconnect=true
>>> "
>>> +                jdbc-uri="jdbc:mysql://127.0.0
>>> .1/ofbiz?autoReconnect=true
>>> ;characterEncoding=UTF-8"
>>>                   jdbc-username="ofbiz"
>>>                   jdbc-password="ofbiz"
>>>                   isolation-level="ReadCommitted"
>>> @@ -365,8 +378,8 @@ access. For a detailed description see t
>>>               alias-view-columns="false"
>>>               drop-fk-use-foreign-key-keyword="true"
>>>               table-type="InnoDB"
>>> -            character-set="latin1"
>>> -            collate="latin1_general_cs">
>>> +            character-set="utf8"
>>> +            collate="utf8_general_ci">
>>>           <read-data reader-name="tenant"/>
>>>           <read-data reader-name="seed"/>
>>>           <read-data reader-name="seed-initial"/>
>>> @@ -376,7 +389,7 @@ access. For a detailed description see t
>>>           <read-data reader-name="ext-demo"/>
>>>           <inline-jdbc
>>>                   jdbc-driver="com.mysql.jdbc.Driver"
>>> -                jdbc-uri="jdbc:mysql://127.0.0
>>> .1/ofbizolap?autoReconnect=
>>> true"
>>> +                jdbc-uri="jdbc:mysql://127.0.0
>>> .1/ofbizolap?autoReconnect=
>>> true ;characterEncoding=UTF-8"
>>>                   jdbc-username="ofbiz"
>>>                   jdbc-password="ofbiz"
>>>                   isolation-level="ReadCommitted"
>>> @@ -398,8 +411,8 @@ access. For a detailed description see t
>>>               alias-view-columns="false"
>>>               drop-fk-use-foreign-key-keyword="true"
>>>               table-type="InnoDB"
>>> -            character-set="latin1"
>>> -            collate="latin1_general_cs">
>>> +            character-set="utf8"
>>> +            collate="utf8_general_ci">
>>>           <read-data reader-name="tenant"/>
>>>           <read-data reader-name="seed"/>
>>>           <read-data reader-name="seed-initial"/>
>>> @@ -409,7 +422,7 @@ access. For a detailed description see t
>>>           <read-data reader-name="ext-demo"/>
>>>           <inline-jdbc
>>>                   jdbc-driver="com.mysql.jdbc.Driver"
>>> -                jdbc-uri="jdbc:mysql://127.0.
>>> 0.1/ofbiztenant?autoReconnect=true"
>>> +                jdbc-uri="jdbc:mysql://127.0.
>>> 0.1/ofbiztenant?autoReconnect=true ;characterEncoding=UTF-8"
>>>                   jdbc-username="ofbiz"
>>>                   jdbc-password="ofbiz"
>>>                   isolation-level="ReadCommitted"
>>> @@ -431,13 +444,13 @@ access. For a detailed description see t
>>>               alias-view-columns="false"
>>>               drop-fk-use-foreign-key-keyword="true"
>>>               table-type="InnoDB"
>>> -            character-set="latin1"
>>> -            collate="latin1_general_cs">
>>> +            character-set="utf8"
>>> +            collate="utf8_general_ci">
>>>           <read-data reader-name="tenant"/>
>>>           <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-uri="jdbc:mysql://127.0.
>>> 0.1/ofbiz_odbc?autoReconnect=true ;characterEncoding=UTF-8"
>>>                   jdbc-username="ofbiz"
>>>                   jdbc-password="ofbiz"
>>>                   isolation-level="ReadCommitted"
>>>
>>>
>>>
>>>
>