geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bohn (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-3866) Export Plugin from web console contains empty, non-editiable 'Unique ID" field
Date Fri, 22 Feb 2008 20:01:19 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-3866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571569#action_12571569
] 

Joe Bohn commented on GERONIMO-3866:
------------------------------------


Here is some detail on the problem:

This code in ExportConfigHandler.renderView() is the source of the problem:
    PluginType data = ManagementHelper.getManagementHelper(request).getPluginInstaller().getPluginMetadata(
                Artifact.create(configId));
    PluginArtifactType instance = data.getPluginArtifact().get(0);

The last line is getting the NPE because the pluginInstaller.getPluginMetadata for the artifact
is returning null. I've verified that the artifact itself appears valid after being created.

Digging a bit deeper I discovered that in GeronimoSourceRepository.extractPluginMetadata(File
dir) we have the following check:

   if (!xml.isFile() || !xml.canRead() || xml.length() == 0) {
      return null;
   }

So this is why we get null for the metadata and why we fail the export of a plugin.  It appears
that the process of extractingPluginMetadata assumes it is working with a deployed plugin
and judging from the code in the portlet I would assume this has not always been the case.

I found slightly different code in place back when the original function logic was included
in PluginInstallerGBean.  When it was moved to GeronimoSourceRespository (in rev. 604483)
the additional check for configId was lost.  The original code was this:


   if (!xml.isFile() || !xml.canRead() || xml.length() == 0) {
      if (moduleId != null) {
          return createDefaultMetadata(moduleId);
      } else {
          return null;
      }
   }

I think this additional check would allow the export plugin to function properly by creating
some default metadata (I'm trying it out now).


> Export Plugin from web console contains empty, non-editiable 'Unique ID" field
> ------------------------------------------------------------------------------
>
>                 Key: GERONIMO-3866
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3866
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>    Affects Versions: 2.1
>            Reporter: Joe Bohn
>            Assignee: Joe Bohn
>
> When attempting to export a plugin the UI appears to present a screen that, among other
things, should contain a Unique ID that was created based upon the component information.
 However, there is no input or display field included in the presented UI ... just the tag
of "Unique ID:" and nothing else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message