You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Dankme <st...@dankanich.com> on 2010/04/19 17:30:56 UTC

Error when using mysql database instead of derby

Hi All! I am still new to Ofbiz...

Not sure why this is happening but all I did after creating the mysql
database and getting the latest mysql driver, was to go in and change the
entityengine.xml file to point to the mysql database. The entity engine did
its thing recreating new tables in the mysql database but for some reason
the entity engine only created MOST of the tables in the 'ofbiz' mysql
database but not all. I can see that it tried to create about 6 tables but
couldn't find the database 'OFBIZ' in uppercase. Just to see what would
happen, I created another database called 'OFBIZ' and sure enough the entity
engine created the remaining tables there (about 6 of them).

Any ideas why this is happening? Also, not sure if you define the
schema-name 'OFBIZ' in all caps in the entityengine.xml file why it would
even want to use 'ofbiz' in lower case. What am I missing??? Thanks in
advance! 

Here are my changes in the entityengine.xml file:

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

...

<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="latin1" collate="latin1_general_cs">
  <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="myRootPwd"
isolation-level="ReadCommitted" pool-minsize="2" pool-maxsize="250"
time-between-eviction-runs-millis="600000" /> 
<!--  Please note that at least one person has experienced a problem with
this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px
and http://commons.apache.org/dbcp/configuration.html
  --> 
<!--  <jndi-jdbc jndi-server-name="localjndi"
jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> 
  --> 
  </datasource>
<datasource name="localmysqlolap"
helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
schema-name="OFBIZ" field-type-name="mysql" check-on-start="true"
add-missing-on-start="true" use-pk-constraint-names="false"
use-indices-unique="false" alias-view-columns="false">
  <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="myRootPwd"
isolation-level="ReadCommitted" pool-minsize="2" pool-maxsize="250"
time-between-eviction-runs-millis="600000" /> 
<!--   <jndi-jdbc jndi-server-name="localjndi"
jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> 
-->

....

 




-- 
View this message in context: http://n4.nabble.com/Error-when-using-mysql-database-instead-of-derby-tp2016111p2016111.html
Sent from the OFBiz Installation mailing list archive at Nabble.com.