You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Bs Serge <se...@gmail.com> on 2022/02/07 20:45:17 UTC

Apache Shiro Error Message

Hi all,

Ofbiz 17.12,
Postgres Database,

I'm getting this error when I try to find financial accounts in the UI and
I'm not familiar with Apache Shiro. So I'm wondering what could be the
reason for this?

Any thoughts or comments would be appreciated!

java.lang.IllegalArgumentException: Error running script at location
[component://webtools/groovyScripts/entity/FindGeneric.groovy]:
org.apache.ofbiz.base.util.GeneralRuntimeException: Error creating
GenericValue (org.apache.shiro.crypto.CryptoException: Unable to execute
'doFinal' with cipher instance [javax.crypto.Cipher@205e8e3d]. (Unable to
execute 'doFinal' with cipher instance [javax.crypto.Cipher@205e8e3d].))

Best Regards,

Re: Apache Shiro Error Message

Posted by Bs Serge <se...@gmail.com>.
Hi Jacopo,

Yeah I finally figured that that’s whats happening and it was related to demo financial accounts created by default owned by the “Company” party group.

And Yes there is a data migration which was done but it was a while back and I still have the original database.

I also found an entity called “EntityKeyStore” with some keys in the table, all keys were migrated also.

Best Regards,

Re: Apache Shiro Error Message

Posted by Jacopo Cappellato <ja...@gmail.com>.
Hi Serge,

It seems like a problem happening when OFBiz tries to decrypt the value of
the fields finAccountCode and finAccountPin (in the FinAccount entity),
that are stored encrypted.
Did you migrate your FinAccount data from a different instance?

Regards,

Jacopo


On Tue, Feb 8, 2022 at 11:22 AM Bs Serge <se...@gmail.com> wrote:

> I found this line the stack trace,
>
> Caused by: javax.crypto.BadPaddingException: Given final block not properly
> padded. Such issues can arise if a bad key is used during decryption.
>
> Full Stack Trace :
>
>
> https://paste.0xfc.de/?855ddf22ba0fbef4#Ef5Fom4VnGfb2XGvNEfK22A8AP5jt5KRMkuhSs4KuCeX
>
> Best regards,
>
> On Mon, Feb 7, 2022 at 10:45 PM Bs Serge <se...@gmail.com> wrote:
>
> > Hi all,
> >
> > Ofbiz 17.12,
> > Postgres Database,
> >
> > I'm getting this error when I try to find financial accounts in the UI
> and
> > I'm not familiar with Apache Shiro. So I'm wondering what could be the
> > reason for this?
> >
> > Any thoughts or comments would be appreciated!
> >
> > java.lang.IllegalArgumentException: Error running script at location
> > [component://webtools/groovyScripts/entity/FindGeneric.groovy]:
> > org.apache.ofbiz.base.util.GeneralRuntimeException: Error creating
> > GenericValue (org.apache.shiro.crypto.CryptoException: Unable to execute
> > 'doFinal' with cipher instance [javax.crypto.Cipher@205e8e3d]. (Unable
> to
> > execute 'doFinal' with cipher instance [javax.crypto.Cipher@205e8e3d].))
> >
> > Best Regards,
> >
>

Re: Apache Shiro Error Message

Posted by Bs Serge <se...@gmail.com>.
I found this line the stack trace,

Caused by: javax.crypto.BadPaddingException: Given final block not properly
padded. Such issues can arise if a bad key is used during decryption.

Full Stack Trace :

https://paste.0xfc.de/?855ddf22ba0fbef4#Ef5Fom4VnGfb2XGvNEfK22A8AP5jt5KRMkuhSs4KuCeX

Best regards,

On Mon, Feb 7, 2022 at 10:45 PM Bs Serge <se...@gmail.com> wrote:

> Hi all,
>
> Ofbiz 17.12,
> Postgres Database,
>
> I'm getting this error when I try to find financial accounts in the UI and
> I'm not familiar with Apache Shiro. So I'm wondering what could be the
> reason for this?
>
> Any thoughts or comments would be appreciated!
>
> java.lang.IllegalArgumentException: Error running script at location
> [component://webtools/groovyScripts/entity/FindGeneric.groovy]:
> org.apache.ofbiz.base.util.GeneralRuntimeException: Error creating
> GenericValue (org.apache.shiro.crypto.CryptoException: Unable to execute
> 'doFinal' with cipher instance [javax.crypto.Cipher@205e8e3d]. (Unable to
> execute 'doFinal' with cipher instance [javax.crypto.Cipher@205e8e3d].))
>
> Best Regards,
>