[teiid-issues] [JBoss JIRA] Resolved: (TEIID-398) mmadmin: exportDataRoles gives NPE if no roles present for VDB - Should throw better exception.

Ramesh Reddy (JIRA) jira-events at lists.jboss.org
Mon Apr 20 12:45:22 EDT 2009


     [ https://jira.jboss.org/jira/browse/TEIID-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramesh Reddy resolved TEIID-398.
--------------------------------

    Resolution: Done


All the methods that use the ObjectConverterUtil have been checked to make sure they only send valid contents as parameters, if not they will throw an exception showing that an error has occurred.


> mmadmin: exportDataRoles gives NPE if no roles present for VDB - Should throw better exception.
> -----------------------------------------------------------------------------------------------
>
>                 Key: TEIID-398
>                 URL: https://jira.jboss.org/jira/browse/TEIID-398
>             Project: Teiid
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 6.0.0
>         Environment: fedora 10 running 5.5.2GA
>            Reporter: Paul Nittel
>            Assignee: Ramesh Reddy
>            Priority: Minor
>             Fix For: 6.1.0
>
>
> While creating mmadmin tests for NIAP, I found that attempting to export roles from a VDB with no data roles, got an NPE. It should be getting a more meaningful exception.
> exportDataRoles("NiapWebVdb","2","/home/pnittel/mmx/552niap/TestMmadmin/testroles.xml");
> // Error: // Uncaught Exception: Method Invocation ObjectConverterUtil.write : at Line: 600 : in file: URL: jar:file:/home/pnittel/mmx/552niap/tools/lib/mmadmin.jar!/scripts/serveradmin.bsh : ObjectConverterUtil .write ( currentContext ( ) .internalAdmin .exportDataRoles ( vdbName , vdbVersion ) , filename ) 
> Called from method: exportDataRoles : at Line: 1 : in file: <unknown file> : exportDataRoles ( "NiapWebVdb" , "2" , "/home/pnittel/mmx/552niap/TestMmadmin/testroles.xml" ) 
> Target exception: java.lang.NullPointerException
> java.lang.NullPointerException
> 	at com.metamatrix.core.util.ObjectConverterUtil.write(ObjectConverterUtil.java:121)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at bsh.Reflect.invokeMethod(Unknown Source)
> 	at bsh.Reflect.invokeStaticMethod(Unknown Source)
> 	at bsh.Name.invokeMethod(Unknown Source)
> 	at bsh.BSHMethodInvocation.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHBlock.evalBlock(Unknown Source)
> 	at bsh.BSHBlock.eval(Unknown Source)
> 	at bsh.BshMethod.invokeImpl(Unknown Source)
> 	at bsh.BshMethod.invoke(Unknown Source)
> 	at bsh.BshMethod.invoke(Unknown Source)
> 	at bsh.Name.invokeLocalMethod(Unknown Source)
> 	at bsh.Name.invokeMethod(Unknown Source)
> 	at bsh.BSHMethodInvocation.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.BSHPrimaryExpression.eval(Unknown Source)
> 	at bsh.Interpreter.run(Unknown Source)
> 	at com.metamatrix.script.shell.MMAdmin.main(MMAdmin.java:50)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the teiid-issues mailing list