You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Markus Schuch (Jira)" <ji...@apache.org> on 2022/12/08 06:47:00 UTC

[jira] [Updated] (CONNECTORS-1725) MissingResourceException exception occurs at Generic Repository Connector

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

Markus Schuch updated CONNECTORS-1725:
--------------------------------------
    Fix Version/s: ManifoldCF 2.24
                       (was: ManifoldCF next)

> MissingResourceException exception occurs at Generic Repository Connector
> -------------------------------------------------------------------------
>
>                 Key: CONNECTORS-1725
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1725
>             Project: ManifoldCF
>          Issue Type: Bug
>            Reporter: Nguyen Huu Nhat
>            Assignee: Karl Wright
>            Priority: Minor
>             Fix For: ManifoldCF 2.24
>
>
> Hi there,
> As there is a problem that is still not addressed during use, I would like to suggest the following correction for the source code of the Generic Repository Connector.
> For additional details, please see below:
> h3. +*1. Connector name*+
> Generic Repository Connector
> h3. +*2. Issue*+
> When I create or edit a job using Generic Repository Connector, if I add a parameter without designate its *Parameter name* field, the alert message *generic.TypeInParamName* appears.
> An error log is as follows:
> {noformat}
> ERROR 2022-08-04T15:45:43,443 (qtp10405169-442) - Missing resource 'generic.TypeInParamName' in bundle 'org.apache.manifoldcf.crawler.connectors.generic.common' for locale 'en'
> java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key generic.TypeInParamName
>     at java.util.ResourceBundle.getObject(ResourceBundle.java:450) ~[?:1.8.0_211]
>     at java.util.ResourceBundle.getString(ResourceBundle.java:407) ~[?:1.8.0_211]
>     at org.apache.manifoldcf.core.i18n.Messages.getMessage(Messages.java:195) ~[mcf-core.jar:?]
>     at org.apache.manifoldcf.core.i18n.Messages.getMessage(Messages.java:184) ~[mcf-core.jar:?]
>     at org.apache.manifoldcf.core.i18n.Messages.getString(Messages.java:218) ~[mcf-core.jar:?]
>     at org.apache.manifoldcf.ui.i18n.Messages.getBodyJavascriptString(Messages.java:343) ~[mcf-ui-core.jar:?]
>     at org.apache.manifoldcf.crawler.connectors.generic.Messages.getBodyJavascriptString(Messages.java:95) ~[?:?]
>     at org.apache.manifoldcf.crawler.connectors.generic.Messages.getBodyJavascriptString(Messages.java:54) ~[?:?]
>     at org.apache.manifoldcf.crawler.connectors.generic.GenericConnector.outputSpecificationHeader(GenericConnector.java:610) ~[?:?]
> {noformat}
> h3. +*3. Reproduction*+
>  * Create a Generic Repository Connector
>  * Create a job using the connector created above with the following details:
>  ** On the Parameters tab, add the following parameters:
>  *** Parameter name: blank
>  *** Parameter value: <optional>
>  *** Click [Add]
> h3. +*4. Cause*+
> Key *generic.TypeInParamName* is not present in native2ascii _*.properties_ files, however it is in use.
> Perhaps, this key is being mistaken with *generic.TypeInParameterName*, that is not in use.
> h3. +*5. Solution*+
> Update the property key used in java classes so that it matches the one defined in _*.properties_ files:
> *generic.TypeInParamName* ➞ *generic.TypeInParameterName*
> h3. +*6. Suggested source code (based on release 2.22.1)*+
> [https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java#L610]
> {code:java}
>       + "function "+seqPrefix+"SpecAddParam(anchorvalue) {\n"
>       + "  if (editjob."+seqPrefix+"specparamname.value == \"\")\n"
>       + "  {\n"
> -     + "    alert(\"" + Messages.getBodyJavascriptString(locale, "generic.TypeInParamName") + "\");\n"
> +     + "    alert(\"" + Messages.getBodyJavascriptString(locale, "generic.TypeInParameterName") + "\");\n"
>       + "    editjob."+seqPrefix+"specparamname.focus();\n"
>       + "    return;\n"
>       + "  }\n"
>       + "  "+seqPrefix+"SpecOp(\""+seqPrefix+"paramop\",\"Add\",anchorvalue);\n"
>       + "}\n"
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)