You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2015/11/21 13:22:11 UTC

[jira] [Updated] (OFBIZ-6658) Creating a new tenant fails

     [ https://issues.apache.org/jira/browse/OFBIZ-6658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-6658:
-----------------------------------
    Attachment: tenant.log.zip

I understand why Stefan and his team decided to not use OFBiz. It's a total failure when you want to use the tenant, at least when loading demo data. I can't even say how much this is dreadful. In trunk HEAD, with set multitenant=Y, I just used
{code}
ant clean-all load-demo create-tenant start
{code}
with  these data entered
{code}
tenant-data-entry:
     [echo] ------------------------------------
     [echo] tenantId = test
     [echo] tenantName = test
     [echo] domainName =
     [echo] db-Platform = D
     [echo] db-IP = localhost
     [echo] db-User = ofbiz
     [echo] db-Password = ofbiz
     [echo] ------------------------------------
     [echo] database for tenant data will be 'ofbiz_test'
     [echo] database for tenant olap data will be 'ofbizolap_test
     [echo] Please make sure that the driver of the platform is installed and that the databases have been created (Check names just above)
     [echo] ------------------------------------
    [input] Continue Y or N (N, n, Y, y)

[...]

    load-tenant-admin-user-login:
     [echo] ------------------------------------
     [echo] Installing the admin for the tenant
     [echo] Delegator = default#test
     [echo] Tenant admin = 'test-admin'
     [echo] Password for tenant admin is 'ofbiz' must change on first login
     [echo] ------------------------------------
    [input] Continue Y or N (N, n, Y, y)
     [copy] Copying 1 file to C:\projectASF-Mars\ofbiz\runtime\tmp
{code}

I got then to https://localhost:8443/webtools/control/entitymaint and entered
{code}
test-admin
ofbiz
test
{code}
I then got this error on screen
{code}
org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#login]: org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://webtools/widget/CommonScreens.xml#main-decorator]: org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)) (Error rendering screen [component://webtools/widget/CommonScreens.xml#main-decorator]: org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)))
{code}

I then looked in the log (attached) and saw a lot of errors, 1st being (twice in log)
{code}
     [java] 2015-11-21 11:39:28,100 |OFBiz-batch-3        |DatabaseUtil                  |E| Error adding foreign key: ModelEntity was null for related entity name Tenant
{code}
then a lot of kinda
{code}
     [java] 2015-11-21 11:53:41,044 |main                 |GenericDelegator              |E| Failure in create operation for entity [TemporalExpressionAssoc]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:TemporalExpressionAssoc][createdStamp,2015-11-21 11:53:41.04(java.sql.Timestamp)][createdTxStamp,2015-11-21 11:53:41.009(java.sql.Timestamp)][fromTempExprId,JANUARY_FIRST(java.lang.String)][lastUpdatedStamp,2015-11-21 11:53:41.04(java.sql.Timestamp)][lastUpdatedTxStamp,2015-11-21 11:53:41.009(java.sql.Timestamp)][toTempExprId,MONTH_RANGE_01(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.TEMPORAL_EXPRESSION_ASSOC (FROM_TEMP_EXPR_ID, TO_TEMP_EXPR_ID, EXPR_ASSOC_TYPE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?) (INSERT on table 'TEMPORAL_EXPRESSION_ASSOC' caused a violation of foreign key constraint 'TEMP_EXPR_TO' for key (MONTH_RANGE_01).  The statement has been rolled back.)). Rolling back transaction.
{code}

You can't switch the language before entering the user pwd, it also fails.  Bad experience so far, I'm no yet ready to dive in this mess.

OK, wait maybe I'm missing something then please help.

In any case if we want people to be interested by tenants in OFBiz we need to provide something working :/

> Creating a new tenant fails
> ---------------------------
>
>                 Key: OFBIZ-6658
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6658
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL APPLICATIONS
>    Affects Versions: 13.07.02
>         Environment: Windows
>            Reporter: Stefan Badenhorst
>            Assignee: Jacques Le Roux
>         Attachments: log files.7z, tenant.log.zip
>
>
> When setting up an additional tenant. I'm having trouble logging in as the administrator. 
> I have downloaded OfBiz 13.07.02 and changed the configuration to connect to Postgres 9.4.  Now I have it working with the demo data loaded. I want to add a new tenant with no demo data loaded.  I heave read many articles and tried the suggestions, the furthest I have gotten is to run this at the command line:  ant create-tenant  At first I got errors using this and I realized that it could not create the databases that I was specifying. I manually created the databases with my chosen tenant id '10001'. So now I have 2 additional databases ofbiz_10001 and ofbizolap_10001.  At the point where it asks me what data to install I have tried both 'Seed' and 'seed-initial'. I must confess that I'm not sure what this means.  I ran the create-tenant again and this time it created 833 tables in the main database and 6 tables in the olap database.  At the end it tells me the following: [echo] Delegator = default#10001 [echo] Tenant admin = '10001-admin' [echo] Password for tenant admin is 'ofbiz' must change on first login  I have also update the global config to show the tenant input on the login screen.  When I try to login with the above user, it tells me that the user does not exist.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)