problem when use viewentity in viewentity with encrypt field

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

problem when use viewentity in viewentity with encrypt field

叶双明
Hi all:

for example, i define two viewentity:

        <view-entity entity-name="PersonView" package-name="org.ofbiz.party">
                <member-entity entity-alias="PS" entity-name="Person"/>
                <alias-all entity-alias="PS"/>
        </view-entity>
       
        <view-entity entity-name="PersonViewView" package-name="org.ofbiz.party">
                <member-entity entity-alias="PSW" entity-name="PersonView"/>
                <alias-all entity-alias="PSW"/>
        </view-entity>

query by "PersonView", code:
       List<GenericValue> list = delegator.findByAnd("PersonView",null);
        for(GenericValue p : list){
                println p.getString("socialSecurityNumber");
        }

every thing is ok.

query by "PersonViewView", code:
List<GenericValue> list = delegator.findByAnd("PersonViewView",null);
        for(GenericValue p : list){
                println p.getString("socialSecurityNumber");
        }

get something like:
sn:322557bcf72a6244001fc2a9a1b35daf

and exception:
2012-05-06 16:48:40,296 (http-0.0.0.0-8443-2) [
EntityCrypto.java:94 :INFO ] Decrypt with DES key from standard key
name hash failed, trying old/funny variety of key name hash
2012-05-06 16:48:40,296 (http-0.0.0.0-8443-2) [
GenericDelegator.java:2603:WARN ]
---- exception report ----------------------------------------------------------
Problem decrypting field [PersonViewView / socialSecurityNumber]
Exception: org.ofbiz.entity.EntityCryptoException
Message: 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))
...

Thanks!
--
叶双明