Bug 954 - The signjar task gives a CreateProcess exception
Summary: The signjar task gives a CreateProcess exception
Status: RESOLVED INVALID
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.3
Hardware: PC All
: P1 normal with 1 vote (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-13 01:03 UTC by Michael McCrann
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael McCrann 2001-03-13 01:03:50 UTC
I am trying to sign a jar using the signjar task. I am using the following 
build file

<project name="Test" default="compile" basedir="/rbuild">
  
  <!-- Set up the global dir names -->
  <property name="dir.build" location="/rbuild" />
  <property name="dir.security" location="${dir.build}/security" />
  
  <!-- Setup any initialisation stuff -->
  <target name="init">

    <tstamp />
     
  </target>

  <!-- Sign the jars -->
  <target name="signJars" depends="init" >
  
    <property name="keyStorePath" location="${dir.security}/rapport.ks" />

    <signjar 
      jar="\rapport\jars\rapport_fe.jar" 
      alias="rapport" 
      storepass="mpompo" 
      keystore="${keyStorePath}"
    />
      
  </target>

</project>

When I run ant using the following command:

ant -buildfile xml/bug.xml signJars 

I get:

C:\rbuild>ant -buildfile xml/bug.xml signJars
Buildfile: xml\bug.xml

init:

signJars:
  [signjar] Signing Jar : C:\rapport\jars\rapport_fe.jar

BUILD FAILED

C:\rbuild\xml\bug.xml:24: Execute failed: java.io.IOException: CreateProcess: ja
rsigner -keystore C:\rbuild\security\rapport.ks -storepass mpompo \rapport\jars\
rapport_fe.jar rapport error=267
--- Nested Exception ---
java.io.IOException: CreateProcess: jarsigner -keystore C:\rbuild\security\rappo
rt.ks -storepass mpompo \rapport\jars\rapport_fe.jar rapport error=267
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:66)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:551)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:509)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:228)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
        at org.apache.tools.ant.taskdefs.SignJar.execute(SignJar.java:208)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 0 seconds
C:\rbuild>

Notes 

1. The signing works OK when I run it on the command line:

C:\rbuild>jarsigner -keystore C:\rbuild\security\rapport.ks -storepass mpompo \r
apport\jars\rapport_fe.jar rapport
Comment 1 Conor MacNeill 2002-03-21 11:28:51 UTC
Sorry to take so long to look at this bug

error=267

is a windows error for some problem with a directory. I'm not sure what it would
mean in this context but it could be a path problem, etc.

I'm going to close this as invalid - please reopen if you still have an issue.