Hello,
I'm looking to change from a derby database to Oracle 11g. I have tried the step outlined in the documentation and the application server fails to load-demo data and start. I have placed the ojdbc6.jar file in the lib\jdbc directory. When I go back to the original derby configuration, everything works fine, but I need this running on oracle. Thanks. Here is a sample of my entityengine.xml file: <!-- - This file configures the Entity Engine JDBC (or other DataSource) and JTA access. For a detailed description see the core/docs/entityconfig.html file. --> <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/"/> <!-- the transaction factory class to use, one is needed for each way of getting JTA interfaces --> <!-- Use this one for Geronimo --> <transaction-factory class="org.ofbiz.geronimo.GeronimoTransactionFactory"/> <!-- Use this one for getting the JTA objects from JNDI --> <!-- NOTE: to use the JndiFactory you must specify the necessary JNDI properties <transaction-factory class="org.ofbiz.entity.transaction.JNDIFactory"> <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/> <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/> </transaction-factory> --> <!-- It is common to use UserTransaction for the TransactionManager, but if that doesn't work, try this: <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/TransactionManager"/> Common UserTransaction locations: java:comp/UserTransaction (most servers: Resin, Orion, OC4J, etc) UserTransaction (RexIP) JBoss uses two different objects for the UserTransaction and TransactionManager interfaces; they are located in JNDI at: "java:comp/UserTransaction" and "java:/TransactionManager" respectively --> <!-- the connection factory class to use, one is needed for obtaining connections/pools for defined resources --> <connection-factory class="org.ofbiz.entity.connection.DBCPConnectionFactory"/> <debug-xa-resources value="false" /> <!-- see https://issues.apache.org/jira/browse/OFBIZ-4282 for more --> <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="remoteoracle"/> </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="remoteoracle"/> </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="remoteoracle"/> </delegator> <!-- need to at least define a name for each component to use --> <entity-model-reader name="main"/> <!-- need to at least define a name for each component to use --> <entity-group-reader name="main"/> <!-- need to at least define a name for each component to use --> <entity-eca-reader name="main"/> enant = OFBiz and External Tenant Data seed = OFBiz and External Seed Data - to be maintained along with source and updated whenever a system deployment is updated seed-initial = OFBiz and External Seed Data - to be maintained along with source like other seed data, but only loaded initially and not updated when a system is updated except manually reviewing each line demo = OFBiz Only Demo Data ext = External General Data (custom) ext-test = External Test Data (custom) ext-demo = External Demo Data (custom) --> <entity-data-reader name="tenant"/> <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="oracle" loader="fieldfile" location="fieldtypeoracle.xml"/> <!-- For DAO/JDBC Helper: Tries: 1. JNDI Datasource IF jdbc.jndi.name, context.provider, etc are specified 2. Embedded (JOTM) if available (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password, isolation.level) 3. Direct to manually laoded JDBC driver (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password) Transaction Isolation Levels - (<helperName>.isolation.level) can be as follows: * None * ReadCommitted (Recommended) * ReadUncommitted * RepeatableRead * Serializable (NOT Recommended) * Not set uses database default --> <datasource name="remoteoracle" helper-class="org.ofbiz.entity.datasource.GenericHelperDAO" schema-name="OFBIZ" field-type-name="oracle" check-on-start="true" add-missing-on-start="true" alias-view-columns="false" join-style="ansi" use-order-by-nulls="true"> <read-data reader-name="tenant"/> <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="oracle.jdbc.driver.OracleDriver" jdbc-uri="jdbc:oracle:thin:@//10.1.114.43:1521/ofbiz" (tried the old syntax and new syntax with same results) jdbc-username="ofbiz" jdbc-password="ofbiz" pool-minsize="2" pool-maxsize="250" time-between-eviction-runs-millis="600000"/> </datasource> </entity-config> |
Hi Joe,
At first sight nothing seems wrong with the excerpt of your entityengine.xml file. But, I only did see the group-maps for org.ofbiz, but not for org.ofbiz.olap and org.ofbiz.tenant. Did you set these to? Were you able to connect to the database in Oracle with a remote client other than OFBiz? Did you create the OFBiz databases prior to connecting to it with OFBiz. Not all external rdbms do create the database like Derby does.. Regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com On Tue, Jan 21, 2014 at 11:09 PM, Joe Bologna <[hidden email] > wrote: > Hello, > > I'm looking to change from a derby database to Oracle 11g. I have tried > the step outlined in the documentation and the application server fails to > load-demo data and start. I have placed the ojdbc6.jar file in the lib\jdbc > directory. When I go back to the original derby configuration, everything > works fine, but I need this running on oracle. Thanks. > > Here is a sample of my entityengine.xml file: > > > <!-- > - This file configures the Entity Engine JDBC (or other DataSource) and JTA > access. For a detailed description see the core/docs/entityconfig.html > file. > --> > <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/"/> > > <!-- the transaction factory class to use, one is needed for each way > of getting JTA interfaces --> > <!-- Use this one for Geronimo --> > <transaction-factory > class="org.ofbiz.geronimo.GeronimoTransactionFactory"/> > > <!-- Use this one for getting the JTA objects from JNDI --> > <!-- NOTE: to use the JndiFactory you must specify the necessary JNDI > properties > <transaction-factory class="org.ofbiz.entity.transaction.JNDIFactory"> > <user-transaction-jndi jndi-server-name="default" > jndi-name="java:comp/UserTransaction"/> > <transaction-manager-jndi jndi-server-name="default" > jndi-name="java:comp/UserTransaction"/> > </transaction-factory> > --> > <!-- > It is common to use UserTransaction for the TransactionManager, > but if that doesn't work, try this: <transaction-manager-jndi > jndi-server-name="default" jndi-name="java:comp/TransactionManager"/> > Common UserTransaction locations: > java:comp/UserTransaction (most servers: Resin, Orion, OC4J, > etc) > UserTransaction (RexIP) > JBoss uses two different objects for the UserTransaction and > TransactionManager interfaces; > they are located in JNDI at: "java:comp/UserTransaction" and > "java:/TransactionManager" respectively > --> > > <!-- the connection factory class to use, one is needed for obtaining > connections/pools for defined resources --> > <connection-factory > class="org.ofbiz.entity.connection.DBCPConnectionFactory"/> > > <debug-xa-resources value="false" /> <!-- see > https://issues.apache.org/jira/browse/OFBIZ-4282 for more --> > > <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="remoteoracle"/> > </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="remoteoracle"/> > </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="remoteoracle"/> > </delegator> > > <!-- need to at least define a name for each component to use --> > <entity-model-reader name="main"/> > > <!-- need to at least define a name for each component to use --> > <entity-group-reader name="main"/> > > <!-- need to at least define a name for each component to use --> > <entity-eca-reader name="main"/> > > > enant = OFBiz and External Tenant Data > seed = OFBiz and External Seed Data - to be maintained > along with source and updated whenever a system deployment is updated > seed-initial = OFBiz and External Seed Data - to be maintained > along with source like other seed data, but only loaded initially and not > updated when a system is updated except manually reviewing each line > demo = OFBiz Only Demo Data > ext = External General Data (custom) > ext-test = External Test Data (custom) > ext-demo = External Demo Data (custom) > --> > <entity-data-reader name="tenant"/> > <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="oracle" loader="fieldfile" > location="fieldtypeoracle.xml"/> > > <!-- > For DAO/JDBC Helper: Tries: > 1. JNDI Datasource IF jdbc.jndi.name, context.provider, etc are > specified > 2. Embedded (JOTM) if available (uses jdbc.driver, jdbc.uri, > jdbc.username, jdbc.password, isolation.level) > 3. Direct to manually laoded JDBC driver (uses jdbc.driver, > jdbc.uri, jdbc.username, jdbc.password) > > Transaction Isolation Levels - (<helperName>.isolation.level) can be > as follows: > * None > * ReadCommitted (Recommended) > * ReadUncommitted > * RepeatableRead > * Serializable (NOT Recommended) > * Not set uses database default > --> > > <datasource name="remoteoracle" > helper-class="org.ofbiz.entity.datasource.GenericHelperDAO" > schema-name="OFBIZ" > field-type-name="oracle" > check-on-start="true" > add-missing-on-start="true" > alias-view-columns="false" > join-style="ansi" > use-order-by-nulls="true"> > <read-data reader-name="tenant"/> > <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="oracle.jdbc.driver.OracleDriver" > jdbc-uri="jdbc:oracle:thin:@//10.1.114.43:1521/ofbiz" > (tried the old syntax and new syntax with same results) > jdbc-username="ofbiz" > jdbc-password="ofbiz" > pool-minsize="2" > pool-maxsize="250" > time-between-eviction-runs-millis="600000"/> > </datasource> > > </entity-config> > > > > |
Hi Pierre,
Thanks for the response. I have created a database in Oracle called ofbiz. What other databases do I need to create? Does the schema built when you run-install? I will add the olap and tenant back to the group mappings and see what happens. Thanks, Joe Joseph Bologna Solution Architect Dell | Pre-Sales, Quest Software Phone: 303-909-1278 (cell) -----Original Message----- From: Pierre Smits [mailto:[hidden email]] Sent: Tuesday, January 21, 2014 3:43 PM To: [hidden email] Subject: Re: OFBiz Database Change Assistance Hi Joe, At first sight nothing seems wrong with the excerpt of your entityengine.xml file. But, I only did see the group-maps for org.ofbiz, but not for org.ofbiz.olap and org.ofbiz.tenant. Did you set these to? Were you able to connect to the database in Oracle with a remote client other than OFBiz? Did you create the OFBiz databases prior to connecting to it with OFBiz. Not all external rdbms do create the database like Derby does.. Regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com On Tue, Jan 21, 2014 at 11:09 PM, Joe Bologna <[hidden email] > wrote: > Hello, > > I'm looking to change from a derby database to Oracle 11g. I have > tried the step outlined in the documentation and the application > server fails to load-demo data and start. I have placed the ojdbc6.jar > file in the lib\jdbc directory. When I go back to the original derby > configuration, everything works fine, but I need this running on oracle. Thanks. > > Here is a sample of my entityengine.xml file: > > > <!-- > - This file configures the Entity Engine JDBC (or other DataSource) > and JTA access. For a detailed description see the > core/docs/entityconfig.html file. > --> > <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/"/> > > <!-- the transaction factory class to use, one is needed for each > way of getting JTA interfaces --> > <!-- Use this one for Geronimo --> > <transaction-factory > class="org.ofbiz.geronimo.GeronimoTransactionFactory"/> > > <!-- Use this one for getting the JTA objects from JNDI --> > <!-- NOTE: to use the JndiFactory you must specify the necessary > JNDI properties > <transaction-factory class="org.ofbiz.entity.transaction.JNDIFactory"> > <user-transaction-jndi jndi-server-name="default" > jndi-name="java:comp/UserTransaction"/> > <transaction-manager-jndi jndi-server-name="default" > jndi-name="java:comp/UserTransaction"/> > </transaction-factory> > --> > <!-- > It is common to use UserTransaction for the > TransactionManager, but if that doesn't work, try this: > <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/TransactionManager"/> > Common UserTransaction locations: > java:comp/UserTransaction (most servers: Resin, Orion, > OC4J, > etc) > UserTransaction (RexIP) > JBoss uses two different objects for the UserTransaction and > TransactionManager interfaces; > they are located in JNDI at: "java:comp/UserTransaction" and > "java:/TransactionManager" respectively > --> > > <!-- the connection factory class to use, one is needed for > obtaining connections/pools for defined resources --> > <connection-factory > class="org.ofbiz.entity.connection.DBCPConnectionFactory"/> > > <debug-xa-resources value="false" /> <!-- see > https://issues.apache.org/jira/browse/OFBIZ-4282 for more --> > > <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="remoteoracle"/> > </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="remoteoracle"/> > </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="remoteoracle"/> > </delegator> > > <!-- need to at least define a name for each component to use --> > <entity-model-reader name="main"/> > > <!-- need to at least define a name for each component to use --> > <entity-group-reader name="main"/> > > <!-- need to at least define a name for each component to use --> > <entity-eca-reader name="main"/> > > > enant = OFBiz and External Tenant Data > seed = OFBiz and External Seed Data - to be maintained > along with source and updated whenever a system deployment is updated > seed-initial = OFBiz and External Seed Data - to be maintained > along with source like other seed data, but only loaded initially and > not updated when a system is updated except manually reviewing each line > demo = OFBiz Only Demo Data > ext = External General Data (custom) > ext-test = External Test Data (custom) > ext-demo = External Demo Data (custom) > --> > <entity-data-reader name="tenant"/> > <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="oracle" loader="fieldfile" > location="fieldtypeoracle.xml"/> > > <!-- > For DAO/JDBC Helper: Tries: > 1. JNDI Datasource IF jdbc.jndi.name, context.provider, etc are > specified > 2. Embedded (JOTM) if available (uses jdbc.driver, jdbc.uri, > jdbc.username, jdbc.password, isolation.level) > 3. Direct to manually laoded JDBC driver (uses jdbc.driver, > jdbc.uri, jdbc.username, jdbc.password) > > Transaction Isolation Levels - (<helperName>.isolation.level) can > be as follows: > * None > * ReadCommitted (Recommended) > * ReadUncommitted > * RepeatableRead > * Serializable (NOT Recommended) > * Not set uses database default > --> > > <datasource name="remoteoracle" > helper-class="org.ofbiz.entity.datasource.GenericHelperDAO" > schema-name="OFBIZ" > field-type-name="oracle" > check-on-start="true" > add-missing-on-start="true" > alias-view-columns="false" > join-style="ansi" > use-order-by-nulls="true"> > <read-data reader-name="tenant"/> > <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="oracle.jdbc.driver.OracleDriver" > jdbc-uri="jdbc:oracle:thin:@//10.1.114.43:1521/ofbiz" > (tried the old syntax and new syntax with same results) > jdbc-username="ofbiz" > jdbc-password="ofbiz" > pool-minsize="2" > pool-maxsize="250" > time-between-eviction-runs-millis="600000"/> > </datasource> > > </entity-config> > > > > |
Hi Joe,
You also need following databases: ofbizolap ofbiztenant As for 'does the schema built when executing ./ant run-install' the answer is quite clear. ./ant run-install has been deprecated from trunk and replaced. Which version are you using? In an older version the function might still be available, but AFAIK only with Derby as the rdbms it builds the schema. I know It doens't work for PostgreSQL. Regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com |
Thanks Pierre.
It's working now. Just created the users for olap and tenant in Oracle. I modified the entityengine.xml file two add the delegators and data sources for olap and tenat. After run load-demo the application started right up. I'm going to make a sample entityengine file just for Oracle and share on the Internet. Is it okay to post the sample back via email or is there a better place? Thanks again, Joe -----Original Message----- From: Pierre Smits [mailto:[hidden email]] Sent: Wednesday, January 22, 2014 8:04 AM To: [hidden email] Subject: Re: OFBiz Database Change Assistance Hi Joe, You also need following databases: ofbizolap ofbiztenant As for 'does the schema built when executing ./ant run-install' the answer is quite clear. ./ant run-install has been deprecated from trunk and replaced. Which version are you using? In an older version the function might still be available, but AFAIK only with Derby as the rdbms it builds the schema. I know It doens't work for PostgreSQL. Regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com |
Hi Joe,
Good for you. The best would be to have it persisted in a document for prosterity. Doing it in a mail might get it overcrowded by other mails. I don't know whether it already has been done, but you could check the technical production setup document(s), see https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide . Regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com |
Administrator
|
In reply to this post by Joe Bologna
What you could do is create a patch and contribute it through Jira, "just" follow
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices Thanks Jacques On Wednesday, January 22, 2014 9:16 PM, [hidden email] wrote > Thanks Pierre. > > It's working now. Just created the users for olap and tenant in Oracle. I modified the entityengine.xml file two add the > delegators and data sources for olap and tenat. After run load-demo the application started right up. I'm going to make a sample > entityengine file just for Oracle and share on the Internet. Is it okay to post the sample back via email or is there a better > place? > > Thanks again, > Joe > > > -----Original Message----- > From: Pierre Smits [mailto:[hidden email]] > Sent: Wednesday, January 22, 2014 8:04 AM > To: [hidden email] > Subject: Re: OFBiz Database Change Assistance > > Hi Joe, > > You also need following databases: > ofbizolap > ofbiztenant > > As for 'does the schema built when executing ./ant run-install' the answer is quite clear. ./ant run-install has been deprecated > from trunk and replaced. Which version are you using? > > In an older version the function might still be available, but AFAIK only with Derby as the rdbms it builds the schema. I know It > doens't work for PostgreSQL. > > Regards, > > > Pierre Smits > > *ORRTIZ.COM <http://www.orrtiz.com>* > Services & Solutions for Cloud- > Based Manufacturing, Professional > Services and Retail & Trade > http://www.orrtiz.com |
Free forum by Nabble | Edit this page |