ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miles, Lee" <Lee.Mi...@bskyb.com>
Subject <jar> nullpointer error when setting filesetmanifest property
Date Wed, 03 Jul 2002 10:46:07 GMT
Hi,

I have been using the <jar> task and have come across the following problem.
When  I set filesetmanifest="merge" or filesetmanifest="mergewithoutmain" I
get a null pointer error and the build halts.

I have been using the following build file:-

problem.xml
-----------

<project name="problem" default="distribute" basedir=".">
	<target name="distribute">
		<jar	basedir="obfuscate/exploded"
			filesetmanifest="mergewithoutmain" 
			destfile="my.jar"/>
	</target>
</project>


The manifest file itself originally had automatically generated content from
retroguard (class obfuscator) which I thought may have been the problem, I
therefore replaced this file with the following minimal content but the
problem still occurs:-

MANIFEST.MF
-----------

Manifest-Version: 1.0
Built-By: conor
Created-By: Apache Ant 1.5alpha


When I run it I get the following nullpointer exception.  I have tried this
with beta2 and beta3 but it still occurs.  Using -debug or -verbose does not
seem to give any more clues.

distribute:
fileset: Setup scanner in dir
C:\disc\MyStuff\J2ME_Wireless\obfuscate\NuttyNK\ob
fuscate\exploded with patternSet{ includes: [] excludes: [] }
      [jar] Updating jar since the current jar has no manifest
      [jar] Building jar:
C:\disc\MyStuff\J2ME_Wireless\obfuscate\NuttyNK\try\pr
everified.jar
fileset: Setup scanner in dir
C:\disc\MyStuff\J2ME_Wireless\obfuscate\NuttyNK\ob
fuscate\exploded with patternSet{ includes: [] excludes: [] }
      [jar] adding directory META-INF/
      [jar] adding directory NuttyNK/
      [jar] Found manifest to merge in file
C:\disc\MyStuff\J2ME_Wireless\obfusc
ate\NuttyNK\obfuscate\exploded\META-INF\MANIFEST.MF

BUILD FAILED
java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:64)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:89)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:61)
        at org.apache.tools.ant.taskdefs.Jar.filesetManifest(Jar.java:442)
        at org.apache.tools.ant.taskdefs.Jar.zipFile(Jar.java:406)
        at org.apache.tools.ant.taskdefs.Zip.addFiles(Zip.java:501)
        at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:369)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:368)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:606)
        at org.apache.tools.ant.Main.start(Main.java:195)
        at org.apache.tools.ant.Main.main(Main.java:234)

Total time: 8 seconds
java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:64)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:89)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:61)
        at org.apache.tools.ant.taskdefs.Jar.filesetManifest(Jar.java:442)
        at org.apache.tools.ant.taskdefs.Jar.zipFile(Jar.java:406)
        at org.apache.tools.ant.taskdefs.Zip.addFiles(Zip.java:501)
        at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:369)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:368)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:606)
        at org.apache.tools.ant.Main.start(Main.java:195)
        at org.apache.tools.ant.Main.main(Main.java:234)


Hopefully someone can point me in the right direction on this.

Thanks in advance
Lee


**********************************************************************
Information in this email is confidential and may be privileged. 
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**********************************************************************


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message