[ 
https://issues.apache.org/jira/browse/OODT-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14721329#comment-14721329
 ] 

Chris A. Mattmann commented on OODT-686:
----------------------------------------

I'm having to modify other tests and I'm running through the full test suite 
for OODT b/c of this to make sure we're all good.

> AddProductTypeCliAction should prompt for ProductTypeId
> -------------------------------------------------------
>
>                 Key: OODT-686
>                 URL: https://issues.apache.org/jira/browse/OODT-686
>             Project: OODT
>          Issue Type: Bug
>          Components: file manager
>    Affects Versions: 0.6
>         Environment: 0.7-SNAPSHOT
>            Reporter: Rishi Verma
>            Assignee: Chris A. Mattmann
>             Fix For: 0.11
>
>         Attachments: OODT-686.rverma.05-08-2014.patch.txt
>
>
> Currently, the AddProductTypeCliAction [1] breaks (returns 
> NullPointerException) when generating a new product type even when all 
> required valid arguments are supplied. 
> Reproducible steps:
> 1. Navigate to filemgr/bin
> 2. Issue: ./filemgr-client -op -addPT -typeName TestProductType1 -repository 
> "file:///usr/local/oodt/data/archive" -typeDesc "This is a test product type" 
> -versionClass "gov.nasa.jpl.oodt.myproductversioner" -url 
> http://localhost:9000
> 3. View failure message: "ERROR: Failed to add product type with name 
> 'TestProductType1', description 'This is a test product type', repository 
> 'file:///usr/local/oodt/data/archive, and versioner 
> 'gov.nasa.jpl.oodt.myproductversioner' : null"
> After some investigation, I found that the underlying problem here is that 
> the AddProductTypeCliAction does not generate a ProductType object that has a 
> ProductTypeId field set. I'm not sure why AddProductTypeCliAction does not 
> prompt the user for this like it does for other arguments, because the 
> XmlRepositoryManager requires a ProductTypeId to be present in order for 
> policy to be generated (see [2] addProductType method). If ProductTypeId is 
> not present within the ProductType object generated by this CliAction, then 
> the XmlRepositoryManager will issue an error. In fact, I'll bet future 
> repository managers will need ProductTypeId as much as XmlRepositoryManager 
> does, so fixing this CliAction will be beneficial.
> --
> [1] 
> http://svn.apache.org/repos/asf/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/AddProductTypeCliAction.java
> [2] 
> http://svn.apache.org/repos/asf/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/repository/XMLRepositoryManager.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to