我是Ofbiz的新手,我正在为postgres数据库创建数据源,如下所示:
<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"/>
但是当我运行时,它用近850个默认实体填充我的数据库。然后为了解决这个问题,我设置了属性add-missing-on-start="false"
,现在它不加载默认表,但它执行与该表相关的选择查询,导致如下异常:
[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
现在帮助我防止这些默认实体与其执行相关的操作。谢谢......