[
https://issues.apache.org/jira/browse/OFBIZ-9649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16142746#comment-16142746
]
Ayushi Rathod commented on OFBIZ-9649:
--------------------------------------
*Quick Update:*
On Exploring the issue I found the following error on console :
{code}|W| Error running groovy script [
boolean useEncryption =
"true".equals(org.apache.ofbiz.entity.util.EntityUtilProperties.getPropertyValue("security",
"password.encrypt", delegator))
if (useEncryption) { newUserLogin.set("currentPassword",
org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String)
newUserLogin.get("currentPassword"))) }
]: javax.script.ScriptException:
groovy.lang.MissingMethodException: No signature of method: static
org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash() is applicable for
argument types:
{code}
On further exploring, I found that the HashCrypt.getDigestHash() method doesn't
exist in HashCrypt.java. The method existed in the earlier version of Ofbiz
(Ofbiz-16.12):
{code}
/**
* @deprecated use digestHash("SHA", null, str)
*/
@Deprecated
public static String getDigestHash(String str) {
return digestHash("SHA", null, str);
}
/**
* @deprecated use digestHash(hashType, null, str))
*/
@Deprecated
public static String getDigestHash(String str, String hashType) {
return digestHash(hashType, null, str);
}
/**
* @deprecated use digestHash(hashType, code, str);
*/
@Deprecated
public static String getDigestHash(String str, String code, String
hashType) {
return digestHash(hashType, code, str);
}
{code}
So what is expected here to fix this issue:
1. If the methods were removed by mistake then, do we need to add
getDigestHash() method again in HashCrypt.java
2. Needs new implementation for the same.
> Unable to create Customer
> -------------------------
>
> Key: OFBIZ-9649
> URL: https://issues.apache.org/jira/browse/OFBIZ-9649
> Project: OFBiz
> Issue Type: Bug
> Components: party
> Affects Versions: Trunk
> Reporter: Ayushi Rathod
> Assignee: Ayushi Rathod
> Attachments: OFBIZ-9649.png
>
>
> Steps to regenerate:
> 1. Go to Party Component
> (https://demo-trunk-ofbiz.apache.org:8443/partymgr/control/main)
> 2. Create on *Create Customer* sub-menu
> (https://demo-trunk-ofbiz.apache.org:8443/partymgr/control/NewCustomer)
> 3. Fill all the required fields and click on save button
> Expected result: Customer should be created successfully.
> Actual result: An error is thrown
> {code}
> The Following Errors Occurred:
> Error running the simple-method: Error running groovy script [<br/> boolean
> useEncryption =
> "true".equals(org.apache.ofbiz.entity.util.EntityUtilProperties.getPropertyValue("security",
> "password.encrypt", delegator))<br/> if (useEncryption) {
> newUserLogin.set("currentPassword",
> org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String)
> newUserLogin.get("currentPassword"))) }<br/> ]: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method: static
> org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash() is applicable for
> argument types: (java.lang.String) values: [ofbiz]<br/>Possible solutions:
> digestHash(java.lang.String, [B) Method = createUser, File =
> file:/home/ofbizDemo/trunk/applications/party/minilang/user/UserEvents.xml,
> Element = <script>, Line 316null
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)