[
https://issues.apache.org/jira/browse/OFBIZ-12342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17434962#comment-17434962
]
Joe Nicke commented on OFBIZ-12342:
-----------------------------------
Here is the workflow:
create ofbiz_greenstar and ofbizolap_greenstar db's in MySQL
Run: gradlew createTenant -PtenantId=greenstar -PtenantName="GreenStar Inc"
-PdomainName=greenstar.ofbiz.opensaas.live.com
-PtenantReaders=seed,seed-initial,ext -PdbPlatform=M
Fails, Log Snippet:
Caused by: org.apache.ofbiz.entity.GenericDataSourceException: SQL Exception
while executing the following:SELECT DESCRIPTION, LAST_UPDATED_STAMP,
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP FROM SECURITY_PERMISSION
WHERE PERMISSION_ID=? (Table 'ofbiz_greenstar.security_permission' doesn't
exist)
at
org.apache.ofbiz.entity.jdbc.SQLProcessor.executeQuery(SQLProcessor.java:402)
~[ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:490)
~[ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:466)
~[ofbiz.jar:?]
at
org.apache.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:81)
~[ofbiz.jar:?]
at
org.apache.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1317)
~[ofbiz.jar:?]
... 13 more
Caused by: java.sql.SQLSyntaxErrorException: Table
'ofbiz_greenstar.security_permission' doesn't exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
~[mysql-connector-java-8.0.25.jar:8.0.25]
at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
~[mysql-connector-java-8.0.25.jar:8.0.25]
at
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
~[mysql-connector-java-8.0.25.jar:8.0.25]
at
com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
~[mysql-connector-java-8.0.25.jar:8.0.25]
at
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83)
~[commons-dbcp2-2.1.1.jar:2.1.1]
at
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83)
~[commons-dbcp2-2.1.1.jar:2.1.1]
at
org.apache.ofbiz.entity.jdbc.SQLProcessor.executeQuery(SQLProcessor.java:399)
~[ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:490)
~[ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:466)
~[ofbiz.jar:?]
at
org.apache.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:81)
~[ofbiz.jar:?]
at
org.apache.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1317)
~[ofbiz.jar:?]
... 13 more
2021-10-27 16:44:48,884 |main |TransactionUtil |I| Transaction rolled back
FAILURE: Build failed with an exception.
See next steps below .........
> createTenant / loadTenant fails
> -------------------------------
>
> Key: OFBIZ-12342
> URL: https://issues.apache.org/jira/browse/OFBIZ-12342
> Project: OFBiz
> Issue Type: Bug
> Components: ALL APPLICATIONS
> Affects Versions: 17.12.08
> Environment: Azure Windows Server 2019, MySQL v8.0.25.0, Gradle
> v4.5.1, OFBiz v 17.12.08
> 4 CPU, 8gb RAM.
> Reporter: Joe Nicke
> Priority: Minor
>
> I am looking for some guidance with multi-tenancy using Gradle (gradlew).
> createTenant and loadTenant *fails* even when the ofbiz_tenant /
> ofbizolap_tenant are created in MySQL.
> When I preload the db's, the exact same gradlew arguments *succeed*.
> gradlew loadTenant -PtenantId=tenant003
> gradlew createTenant -PtenantId=tenant003 -PtenantName="My Name"
> -PdomainName=tenant002.ofbiz.opensaas.live.com
> -PtenantReaders=seed,seed-initial,ext -PdbPlatform=M
> In the "succeed" workflow, the ofbiztenant tables are filled as expected. I
> am able to select and login with this tenant. It seems this would elimininate
> entity and other settings.
> Why do I have to preload the db's with schemas?
> Thanks!
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)