[ https://issues.apache.org/jira/browse/OFBIZ-3971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12975111#action_12975111 ] Jacques Le Roux commented on OFBIZ-3971: ---------------------------------------- Hi Pierre, Please don't use tabs in your patch but white spaces (build.xml). I have tried your patch on a brand new checkout with prior an install with ant run-install-multitenant and then ant run-create-tenant (tenant/tenant/demo) and then ant clean-all and then ant run-create-tenant. I get the same errors. Could you please explain how you use it? {code} [java] 2010-12-26 13:39:24,869 (main) [EntityDataLoadContainer.java:375:INFO ] file:/D:/workspace/ofbizTenant/specialpurpose/myportal/data/MyPortalDemoData.xml [java] 2010-12-26 13:39:24,869 (main) [EntityDataLoadContainer.java:378:INFO ] =-=-=-=-=-=-= Starting the data load... [java] 2010-12-26 13:39:25,010 (main) [ EntitySaxReader.java:220:INFO ] Beginning import from URL: file:/D:/workspace/ofbizTenant/framework/entity/data/TenantDemoData.xml [java] 2010-12-26 13:39:25,229 (main) [ EntitySaxReader.java:270:INFO ] Transaction Timeout set to 2 hours (7200 seconds) [java] 2010-12-26 13:39:25,791 (main) [ EntitySaxReader.java:289:INFO ] Finished 6 values from file:/D:/workspace/ofbizTenant/framework/entity/data/TenantDemoData.xml [java] 2010-12-26 13:39:25,807 (main) [ EntitySaxReader.java:220:INFO ] Beginning import from URL: file:/D:/workspace/ofbizTenant/framework/security/data/PasswordSecurityData.xml [java] 2010-12-26 13:39:25,807 (main) [ EntitySaxReader.java:270:INFO ] Transaction Timeout set to 2 hours (7200 seconds) [java] 2010-12-26 13:39:27,792 (main) [ EntitySaxReader.java:289:INFO ] Finished 6 values from file:/D:/workspace/ofbizTenant/framework/security/data/PasswordSecurityData.xml [java] 2010-12-26 13:39:27,792 (main) [ EntitySaxReader.java:220:INFO ] Beginning import from URL: file:/D:/workspace/ofbizTenant/framework/security/data/SecurityDemoData.xml [java] 2010-12-26 13:39:27,792 (main) [ EntitySaxReader.java:270:INFO ] Transaction Timeout set to 2 hours (7200 seconds) [java] 2010-12-26 13:39:28,682 (main) [ GenericDelegator.java:889:ERROR] [java] ---- exception report ---------------------------------------------------------- [java] Failure in create operation for entity [UserLoginSecurityGroup]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,2010-12-26 13:3 9:28.104(java.sql.Timestamp)][createdTxStamp,2010-12-26 13:39:27.792(java.sql.Timestamp)][fromDate,2001-01-01 12:00:00.0(java.sql.Timestamp)][groupId,FULLADMIN(java.lang.String)][lastUpdatedStamp,2010-12-26 1 3:39:28.104(java.sql.Timestamp)][lastUpdatedTxStamp,2010-12-26 13:39:27.792(java.sql.Timestamp)][userLoginId,admin(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.USER_LOGIN_ SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE, THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'USER_LOGIN_SECURITY _GROUP' caused a violation of foreign key constraint 'USER_SECGRP_GRP' for key (FULLADMIN). The statement has been rolled back.)). Rolling back transaction. [java] Exception: org.ofbiz.entity.GenericEntityException [java] Message: Error while inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,2010-12-26 13:39:28.104(java.sql.Timestamp)][createdTxStamp,2010-12-26 13:39:27.792(java.sql.Timestamp)][fromDat e,2001-01-01 12:00:00.0(java.sql.Timestamp)][groupId,FULLADMIN(java.lang.String)][lastUpdatedStamp,2010-12-26 13:39:28.104(java.sql.Timestamp)][lastUpdatedTxStamp,2010-12-26 13:39:27.792(java.sql.Timestamp)][ userLoginId,admin(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE, THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_T X_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key constraint 'USER_SECGRP_GRP' for key (FULLADMIN). The statement has been rolled back.)) [java] ---- cause --------------------------------------------------------------------- [java] Exception: org.ofbiz.entity.GenericDataSourceException [java] Message: SQL Exception while executing the following:INSERT INTO OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE, THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_ STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key constraint 'USER_SECGRP_GRP' for key (FULLADMIN). The statement has bee n rolled back.) [java] ---- cause --------------------------------------------------------------------- [java] Exception: java.sql.SQLIntegrityConstraintViolationException [java] Message: INSERT on table 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key constraint 'USER_SECGRP_GRP' for key (FULLADMIN). The statement has been rolled back. [java] ---- cause --------------------------------------------------------------------- [java] Exception: org.apache.derby.impl.jdbc.EmbedSQLException [java] Message: INSERT on table 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key constraint 'USER_SECGRP_GRP' for key (FULLADMIN). The statement has been rolled back. [java] ---- cause --------------------------------------------------------------------- [java] Exception: org.apache.derby.iapi.error.StandardException [java] Message: INSERT on table 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key constraint 'USER_SECGRP_GRP' for key (FULLADMIN). The statement has been rolled back. [java] ---- stack trace --------------------------------------------------------------- [java] ERROR 23503: INSERT on table 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key constraint 'USER_SECGRP_GRP' for key (FULLADMIN). The statement has been rolled back. [java] org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [java] org.apache.derby.impl.sql.execute.ForeignKeyRIChecker.doCheck(Unknown Source) [java] org.apache.derby.impl.sql.execute.GenericRIChecker.doCheck(Unknown Source) [java] org.apache.derby.impl.sql.execute.RISetChecker.doFKCheck(Unknown Source) [java] org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source) [java] org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) [java] org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) [java] org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) [java] org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) [java] org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) [java] org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) [java] org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) [java] org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) [java] org.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:420) [java] org.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:173) [java] org.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:115) [java] org.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:64) [java] org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:867) [java] org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1429) [java] org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.java:297) [java] org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:276) [java] org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:225) [java] org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.java:213) [java] org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoadContainer.java:382) [java] org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:100) [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:272) [java] org.ofbiz.base.start.Start.startServer(Start.java:322) [java] org.ofbiz.base.start.Start.start(Start.java:326) [java] org.ofbiz.base.start.Start.main(Start.java:411) {code} > enhancement to create new tenants easier > ---------------------------------------- > > Key: OFBIZ-3971 > URL: https://issues.apache.org/jira/browse/OFBIZ-3971 > Project: OFBiz > Issue Type: Improvement > Components: commonext/setup, framework > Affects Versions: SVN trunk > Environment: All > Reporter: Pierre Smits > Fix For: SVN trunk > > Attachments: OFBiz-NewTenant-20101001.patch > > > This modification enables backend admins to easier create new tenants. > It first enters data about the tenant (tenantID and tenantName) in entity Tenant and TenantDataSource. > Subsequently it creates the databases (derby only) for the new delegator. The backend-admin can state which datafiles must be loaded in the newly created databases (seed, seed-initial, ext, etc...) > Finally it creates the tenant-admin and its password in the newly created database. The name of tenant-admin is based on the tenantId given (i.e. tenantId-admin). The password of the tenant-admin must be changed on first login. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |