ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30548] - NPE in oata.Project when executing emma task from netbeans.
Date Sun, 15 Aug 2004 05:51:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30548>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30548

NPE in oata.Project when executing emma task from netbeans.





------- Additional Comments From shalmaneser@ePost.de  2004-08-15 05:51 -------
Did the following:
- upgraded Ant in Netbeans to 1.6.2.
- patched the getThreadMethod() again, to read:

2020  public Task getThreadTask(Thread thread) {
2021	try
2022	{
2023            Object task = threadTasks.get(thread);
2024            if (task == null) {
2025               ThreadGroup group = thread.getThreadGroup();
2026               while (task == null && group != null) {
2027                  task = threadGroupTasks.get(group);
2028                  group = group.getParent();
2029               }
2030            }
2031	    return (Task) task;
2032	}
2033	catch (NullPointerException npe)
2034	{
2035	    System.out.println("NPE in getThreadTask!!");
2036	    npe.printStackTrace();
2037	    System.out.println("Parameter thread: " + thread);
2038	    System.out.println("Map threadTasks: " + threadTasks);
2039	    System.out.println("Map threadGroupTasks: " + threadGroupTasks);
2040	    //System.out.println("task: " + task);
2041            System.out.println("this.getClass().getName()" +
this.getClass().getName());
2042            System.out.println("this" + this);
2043	    return null;
2044     }
2045  }

Now got as a response:

coverage:
NPE in getThreadTask!!
java.lang.NullPointerException
        at org.apache.tools.ant.Project.getThreadTask(Project.java:2023)
        at org.apache.tools.ant.Project.demuxOutput(Project.java:1085)
        at
org.apache.tools.ant.DemuxOutputStream.processBuffer(DemuxOutputStream.java:171)
        at org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:146)
        at org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:240)
        at java.io.PrintStream.write(PrintStream.java:258)
        at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
        at
sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
        at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
        at java.io.BufferedWriter.flush(BufferedWriter.java:230)
        at java.io.PrintWriter.flush(PrintWriter.java:120)
        at com.vladium.logging.Logger._log(Logger.java:483)
        at com.vladium.logging.Logger.info(Logger.java:195)
        at com.vladium.emma.data.MergeProcessor._run(MergeProcessor.java:117)
        at com.vladium.emma.Processor.run(Processor.java:54)
        at com.vladium.emma.data.mergeTask.execute(mergeTask.java:48)
        at com.vladium.emma.emmaTask.execute(emmaTask.java:57)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:178)
        at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:252)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
Parameter thread: Thread[exec_jeede (coverage)_2,3,exec_jeede (coverage)_2]
Map threadTasks: null
Map threadGroupTasks: null
this.getClass().getName()org.apache.tools.ant.Project
thisorg.apache.tools.ant.Project@1a5b607
NPE in getThreadTask!!
java.lang.NullPointerException
        at org.apache.tools.ant.Project.getThreadTask(Project.java:2023)
        at org.apache.tools.ant.Project.demuxFlush(Project.java:1154)
        at
org.apache.tools.ant.DemuxOutputStream.processFlush(DemuxOutputStream.java:185)
        at org.apache.tools.ant.DemuxOutputStream.flush(DemuxOutputStream.java:210)
        at java.io.PrintStream.flush(PrintStream.java:136)
        at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:410)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
        at java.io.BufferedWriter.flush(BufferedWriter.java:230)
        at java.io.PrintWriter.flush(PrintWriter.java:120)
        at com.vladium.logging.Logger.cleanup(Logger.java:436)
        at com.vladium.logging.Logger.pop(Logger.java:364)
        at com.vladium.emma.Processor.run(Processor.java:60)
        at com.vladium.emma.data.mergeTask.execute(mergeTask.java:48)
        at com.vladium.emma.emmaTask.execute(emmaTask.java:57)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:178)
        at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:252)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
Parameter thread: Thread[exec_jeede (coverage)_2,3,exec_jeede (coverage)_2]
Map threadTasks: null
Map threadGroupTasks: null
this.getClass().getName()org.apache.tools.ant.Project
thisorg.apache.tools.ant.Project@1a5b607
src\build.xml [441] java.lang.NullPointerException
BUILD FAILED (total time: 5 seconds)

So to the contrary of my earlier musings: threadTasks is null!!
Currently I have no Idea how this should happen, if the only
setting of this variable in the whole sourcetree seems to be:

165  /** Records the latest task to be executed on a thread (Thread to Task). */
166  private Hashtable threadTasks = new Hashtable();

Ideas?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message