0

I am new to Ofbiz and I am creating a datasource for my postgres database as below:

<datasource name="localpostgres"
            helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="public"
            field-type-name="postgres"
            check-on-start="false"
            add-missing-on-start="false"
            use-fk-initially-deferred="false"
            alias-view-columns="false"
            join-style="ansi"
            use-binary-type-for-blob="true"
            use-order-by-nulls="true"
            result-fetch-size="50"> <!-- Comment out the result-fetch-size attribute for jdbc driver versions older than 8.0.
            Not recommended to use those though. They are archived unsupported versions: http://jdbc.postgresql.org/download.html -->

        <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"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.postgresql.Driver"
                jdbc-uri="jdbc:postgresql://127.0.0.1:5432/dummy?stringtype=unspecified"
                jdbc-username="postgres"
                jdbc-password="root"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>

but when i run it populates my database with nearly 850 default entities. Then to solve this i set the property add-missing-on-start="false" now it doesn't loads the default tables but it executes the select query related to that tables causing the exception as below:

[java] Message: org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT JOB_ID, JOB_NAME, RUN_TIME, POOL_ID, STATUS_ID, PARENT_JOB_ID, PREVIOUS_JOB_ID, SERVICE_NAME, LOADER_NAME, MAX_RETRY, CURRENT_RETRY_COUNT, AUTH_USER_LOGIN_ID, RUN_AS_USER, RUNTIME_DATA_ID, RECURRENCE_INFO_ID, TEMP_EXPR_ID, CURRENT_RECURRENCE_COUNT, MAX_RECURRENCE_COUNT, RUN_BY_INSTANCE_ID, START_DATE_TIME, FINISH_DATE_TIME, CANCEL_DATE_TIME, JOB_RESULT, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP FROM public.JOB_SANDBOX WHERE ((RUN_BY_INSTANCE_ID = ? AND (STATUS_ID = ? OR STATUS_ID = ? OR STATUS_ID = ?))) ORDER BY START_DATE_TIME ASC (ERROR: relation "public.job_sandbox" does not exist

now help me to prevent these default entities related operation from its execution.Thank You...

Rong Nguyen
  • 4,143
  • 5
  • 27
  • 53
user3256546
  • 73
  • 2
  • 5
  • What you mean `it doesn't loads the default tables`, ofbiz doesn't create tables? – Rong Nguyen Feb 07 '14 at 05:04
  • but it adds 859 tables to the database named dummy while starting the ofbiz if the add-missing-on-start="true" is set to false then it doesn't loads the tables but executes the select query related to that tables. – user3256546 Feb 07 '14 at 06:22
  • I found the solution...Create the one more new datasource which may point to the desired database of mine and make a custom database named ofbiz to load the default entities. A little bit changes in delgator and entitygroup.xml was made. – user3256546 Feb 07 '14 at 09:00

0 Answers0