[ 
https://issues.apache.org/jira/browse/OFBIZ-6071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14320876#comment-14320876
 ] 

Jacques Le Roux edited comment on OFBIZ-6071 at 2/18/15 8:53 AM:
-----------------------------------------------------------------

OK, I spent too long time trying to login already.

To test if it could be related to r1608347, I got back to r1655795 which is the 
last revision before I merged the SEO branch in trunk (r1655803)

I put multitenant=Y in general.properties
then used 
ant load-demo-multitenant
ant load-tenant-admin-user-login -DtenantId=DEMO1

But then I could not login with DEMO1-admin/ofbiz/DEMO1 (following  OFBIZ-3971) 
The DEMO1-admin user was not recognised
BTW, I found weird this message after ant load-tenant-admin-user-login 
-DtenantId=DEMO1
{code}
load-tenant-admin-user-login:
     [echo] ------------------------------------
     [echo] Installing the admin for the tenant
     [echo] Delegator = ${delegatorId}
     [echo] Tenant admin = '${userLoginId}'
     [echo] Password for tenant admin is 'ofbiz' must change on first login
     [echo] ------------------------------------
    [input] Continue Y or N (N, n, Y, y)
{code}    
compared to what was at 
https://issues.apache.org/jira/browse/OFBIZ-3971?focusedCommentId=12988521

I gave up at this stage. Could you made the same test than me (using r1655795) 
to see if you reproduce with this revision (before the SEO merge).

I'd like also that you give me the steps you used before
{quote}
1. Create a tenant and login to tenant's admin account.
{quote}

Thanks!



was (Author: jacques.le.roux):
OK, I spent too long time trying to login already.

To test if it could be related to r1608347, I got back to r1655795 which is the 
last revision before I merged the SEO branch in trunk (r1655803)

I put multitenant=Y in general.properties
then used 
ant load-demo-multitenant
ant load-tenant-admin-user-login -DtenantId=DEMO1

But then I could not login with DEMO1-admin/ofbiz/DEMO1 (following  OFBIZ-3971) 
The DEMO1-admin user was not recognised
BTW, I found weird this message after ant load-tenant-admin-user-login 
-DtenantId=DEMO1
{code}
load-tenant-admin-user-login:
     [echo] ------------------------------------
     [echo] Installing the admin for the tenant
     [echo] Delegator = ${delegatorId}
     [echo] Tenant admin = '${userLoginId}'
     [echo] Password for tenant admin is 'ofbiz' must change on first login
     [echo] ------------------------------------
    [input] Continue Y or N (N, n, Y, y)
{code}    
compared to what was at OFBIZ-3971

I gave up at this stage. Could you made the same test than me (using r1655795) 
to see if you reproduce with this revision (before the SEO merge).

I'd like also that you give me the steps you used before
{quote}
1. Create a tenant and login to tenant's admin account.
{quote}

Thanks!


> Issue in decrypting entity fields where encrypt="true" is used in tenant 
> -------------------------------------------------------------------------
>
>                 Key: OFBIZ-6071
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6071
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Trunk, Upcoming Branch
>            Reporter: Divesh Dutta
>            Assignee: Jacopo Cappellato
>            Priority: Blocker
>         Attachments: OFBIZ-6071.patch
>
>
> Error while adding a credit card from order manager when logged in with 
> tenant account.
> The error is as following:
> ERROR rendering error page [/error/error.jsp], but here is the error text: 
> org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen 
> [component://party/widget/partymgr/PaymentMethodScreens.xml#editcreditcard]: 
> org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen 
> [component://party/widget/partymgr/PaymentMethodScreens.xml#PaymentMethodDecorator]:
>  org.ofbiz.entity.transaction.GenericTransactionException: The current 
> transaction is marked for rollback, not beginning a new transaction and 
> aborting current operation; the rollbackOnly was caused by: Failure in 
> findByCondition operation for entity [CreditCard]: 
> org.ofbiz.entity.GenericEntityException: Error creating GenericValue 
> (org.ofbiz.base.util.GeneralException: javax.crypto.BadPaddingException: 
> Given final block not properly padded (Given final block not properly padded) 
> (javax.crypto.BadPaddingException: Given final block not properly padded 
> (Given final block not properly padded))). Rolling back 
> transaction.org.ofbiz.entity.GenericEntityException: Error creating 
> GenericValue (org.ofbiz.base.util.GeneralException: 
> javax.crypto.BadPaddingException: Given final block not properly padded 
> (Given final block not properly padded) (javax.crypto.BadPaddingException: 
> Given final block not properly padded (Given final block not properly 
> padded))) 
> It seems there is some issue with encryption-decryption mechanism for the 
> fields of an entity for which encrypt="true" is set. From the exception it 
> seemed that incorrect key is being used for decryption i.e. the key is not 
> appropriate with respect to the one which was used for encryption.
> After tracing the process flow we suspect that in SqlJdbcUtil.java while 
> calling 'decryptFieldValue' the delegator which is being used is 
> baseDelegator instead of tenant's delegator, but at the time of encryption 
> using 'encryptFieldValue' the delegator was tenant's delegator. May be this 
> is the reason why it is generating "javax.crypto.BadPaddingException".
> Steps to regenerate:
> 1. Create a tenant and login to tenant's admin account.
> 2. Navigate to ORDER > Order Entry > Sales Order
> 3. Use Demo Customer as Customer and continue.
> 4. Add some item to order and proceed for Quick Finalize Order.
> 5. Try to add new credit card.
> 6. On saving credit card information it will generate the above error. 



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

Reply via email to