You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Rishi Verma (JIRA)" <ji...@apache.org> on 2013/06/24 20:54:21 UTC

[jira] [Commented] (OODT-584) PGETaskInstance logger and NullPointerException

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

Rishi Verma commented on OODT-584:
----------------------------------

Hey Chris,

+1. Patch was submitted in r1461847 but the JIRA issue was not set to resolved. 

Thanks for correcting this!

rishi 
                
> PGETaskInstance logger and NullPointerException
> -----------------------------------------------
>
>                 Key: OODT-584
>                 URL: https://issues.apache.org/jira/browse/OODT-584
>             Project: OODT
>          Issue Type: Bug
>          Components: pge wrapper framework
>    Affects Versions: 0.5
>            Reporter: Rishi Verma
>            Assignee: Rishi Verma
>             Fix For: 0.6
>
>
> When trying to execute PGEs using the latest trunk build of CAS-PGE (r1460925), I keep getting NullPointerExceptions when a batchstub (or Workflow Manager locally) tries to execute PgeTaskInstance's run() method.
> After some investigation, it seems that the NullPointerException is being generated by the use of the 'logger' object at line 139 of PgeTaskInstance.java [1]. 
> See the following error example of running a simple PGE workflow:
> ...
> INFO: Executing task: [Determine_Snow_Density_Task] locally
> java.lang.NullPointerException
> at org.apache.oodt.cas.pge.PGETaskInstance.run(PGETaskInstance.java:139)
> at org.apache.oodt.cas.workflow.engine.IterativeWorkflowProcessorThread.executeTaskLocally(IterativeWorkflowProcessorThread.java:573)
> at org.apache.oodt.cas.workflow.engine.IterativeWorkflowProcessorThread.run(IterativeWorkflowProcessorThread.java:320)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Thread.java:680)
> Mar 25, 2013 10:41:26 AM org.apache.oodt.cas.workflow.engine.IterativeWorkflowProcessorThread executeTaskLocally
> WARNING: Exception executing task: [Determine_Snow_Density_Task] locally: Message: null
> Looking at the code of PGETaskInstance.java [1], it appears that the 'logger' object is used multiple times before it is instantiated. For example, methods like createPgeMetadata and createPgeConfig both use the 'logger' object before the method createLogger() has been invoked. This generates a NullPointerException, which is then caught by the run() method's catch block. The catch statement then tries to log the error, but then runs into a second NullPointerException because logger has still not been instantiated. 
> This is a major issue, because not only does initialization of a PGE immediately stop, but any erroneous configuration of PGEs is not properly logged and alerted to the user. 
> --
> [1] http://svn.apache.org/repos/asf/oodt/trunk/pge/src/main/java/org/apache/oodt/cas/pge/PGETaskInstance.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira