A few days earlier I had no problems with building the project. But suddenly I can't access the lib directory (SchoolManagement/SchoolManagement/dist/lib). I can't even delete the lib directory. It shows error "Access Denied!".
The output log shows:
ant -f C:\\Users\\Dinesh\\Dropbox\\SchoolManagement\\SchoolManagement - Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Deleting directory C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\build
clean:
init:
deps-jar:
Created dir: C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\build\classes
Created dir: C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\build\empty
Created dir: C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\build\generated-sources\ap-source-output
Compiling 14 source files to C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\build\classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 2 files to C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\build\classes
compile:
Copying 1 file to C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\build
Copy libraries to C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\dist\lib.
C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\nbproject\build-impl.xml:993: The following error occurred while executing this line:
C:\Users\Dinesh\Dropbox\SchoolManagement\SchoolManagement\nbproject\build-impl.xml:837:
java.lang.NullPointerException
at org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:439)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:559)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:519)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:480)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:443)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:409)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:384)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:322)
at org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs.execute(CopyLibs.java:206)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 28 seconds)
Ok firstly we may need to see the exact lines of code just incase as there is a null pointer error, however it may be due to being unable to access your directory depending upon your privileges Netbeans has to the C:/ drive.
Possible solution
If Netbeans cannot delete the directory you may want to try running netbeans as administrator to have the required privileges (right click and run as admin) and then maybe it will work. Also there seems to be a null pointer exception but this may be because of the lack of privileges
Other solution
As this is a school project, if you are running on a school computer im going to assume to some extent that they may have given you an account that doesn't have raised privileges and that may be the issue, you could try copying the file manually to a new location where your account does have privileges to read/write from.
Related
I have tried to use "convert to new Gui builder", from a project created in the old Gui builder. Conversion works successfully, but after I run it, it displays an error.
I want to convert Old to New gui builder. How do i solve it?
ant -f C:\\Users\\user1\\Desktop\\appversions\\renew2\\29-6-Convertnew -Dnb.internal.action.name=run run
Akmi_Career.java unmodified, skipping
Processing GUI builder file: C:\Users\user1\Desktop\appversions\renew2\29-6-Convertnew\src\com\codename1\akmiapp\gui\AnakoinoseisTab.java
Processing GUI builder file: C:\Users\user1\Desktop\appversions\renew2\29-6-Convertnew\src\com\codename1\akmiapp\gui\Bonus_Card.java
ContactWeb.java unmodified, skipping
Processing GUI builder file: C:\Users\user1\Desktop\appversions\renew2\29-6-Convertnew\src\com\codename1\akmiapp\gui\Egramateia.java
C:\Users\ksak\Desktop\appversions\renew2\29-6-Convertnew\build.xml:470:
java.lang.NullPointerException
at com.codename1.build.client.GenerateGuiSources.appendCommandIcon(GenerateGuiSources.java:863)
at com.codename1.build.client.GenerateGuiSources.updateProperties(GenerateGuiSources.java:660)
at com.codename1.build.client.GenerateGuiSources.constructComponentsHierarchy(GenerateGuiSources.java:311)
at com.codename1.build.client.GenerateGuiSources.generateGuiSource(GenerateGuiSources.java:299)
at com.codename1.build.client.GenerateGuiSources.generateGuiSource(GenerateGuiSources.java:231)
at com.codename1.build.client.GenerateGuiSources.execute(GenerateGuiSources.java:202)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 0 seconds)
This seems to be a bug with processing commands in a menu. We have a fix for it. This fix should be out next week. We hope to make a major release next week for some new features and it should include this fix.
We are in the process of upgrading out application servers from Weblogic 11g running java 1.6 to Weblogic 12c running java 1.8. One of the steps in our ANT build process is to use YUI Compressor (version 2.4.8) to minify our CSS and JS files. The step to minify CSS files works fine. But when we try to minify JS files we get the following error:
java.lang.NoSuchFieldError: instance
at org.mozilla.javascript.CompilerEnvirons.<init>(CompilerEnvirons.java:48)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:310)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at com.yahoo.platform.yui.compressor.YUICompressTask.doCompression(YUICompressTask.java:202)
at com.yahoo.platform.yui.compressor.YUICompressTask.execute(YUICompressTask.java:101)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
When I looked into the classes inside yuicompressor-2.4.8.jar causing the error I see that line 48 of CompilerEnvirons.java looks like this:
this.errorReporter = DefaultErrorReporter.instance;
But when I checked the class DefaultErrorReporter.java it's empty. The entire class consists of the following:
class
{
}
Java 1.6 didn't seem to care about this but java 1.8 does.
I'm not an expert with this compressor tool by any means so I was wondering if anyone had any ideas on what might cause this. If I need to provide additional information I'm happy to.
Thanks.
This turned out to be a corrupt JAR file.
I have a weird bug that is popping up in my Ant build. The build works as such: build.xml calls a new buildTargets.xml file, and in that file most of the work is being done. buildTargets.xml creates a bunch of new files in gwt-out/htdocs/** and another directory staging/htdocs/**. Basically, files are being created in gwt-out/htdocs and then copied into staging/htdocs. The error is that only one file is not being copied, and I am getting a java.IO.FileNotFoundException (Access is denied) error. The weird part is that the file changes from build to build.
At first I thought it was an Eclipse problem so I built through the command line, and a new (a different file than eclipse) was not being put into staging/htdocs, which was yielded the same error. I've attached what Ant has said with the -debug flag. The error seems to pop up when the files are being tokenized in buildTargets.xml. After searching around it seems that the most common response was to fix my permissions-- however the file is being dynamically created, and when I go to check on that file all permissions are enabled (except "Special"), so I don't think that's the issue.
Other SO questions similar to mine all deal with building on a remote server and fixing my permissions to that server-- however this is all local to my computer, so I'm not sure that is the issue either. Could it be an error with the copying task in the Ant build?
Here's the error:
BUILD FAILED
C:\CSDK\build\buildTargets.xml:253: Failed to copy C:\Users\admin\worksp
ace\BuildPortal\out\gwt-out\htdocs\war\BuildPortalTest.iOS_Bu
ild_Portal\sc\modules\ISC_DataBinding.js to C:\Users\admin\workspace\BuildPortal
\out\staging\htdocs\war\BuildPortalTest.iOS_Build_Portal\sc\m
odules\ISC_DataBinding.js due to java.io.FileNotFoundException C:\Users\admin\wo
rkspace\BuildPortal\out\staging\htdocs\war\BuildPortalTest.iO
S_Build_Portal\sc\modules\ISC_DataBinding.js (Access is denied)
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:907)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:563)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.FileNotFoundException: C:\Users\admin\workspace\BuildPortal\o
ut\staging\htdocs\war\BuildPortalTest.iOS_Build_Portal\sc\mod
ules\ISC_DataBinding.js (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
Thanks.
I ended up using the retry task, and that seemed to work based off of Isaac's description of what was possibly going wrong.
I'm having issues with the IDE Processing.
I'm trying to compile something to Android. I'm on Android Mode, of course. But I'm getting this Error at the time of compiling. (It's not the code itself)
I've installed "adb devices", it seems Ok. I've done all the "51-android.rules" process. I've installed API 10(the one requested) and Android Tools. I don't really know what should be wrong.
-----------------
API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
Merging AndroidManifest files into one.
Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
Generating resource IDs...
BUILD FAILED
/home/user/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml:649: The following error occurred while executing this line:
/home/user/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml:690: Execute failed: java.io.IOException: Cannot run program "/home/user/adt-bundle-linux-x86_64-20130729/sdk/build-tools/18.0.1/aapt" (in directory "/tmp/android8933435574063638939sketch"): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
at com.android.ant.AaptExecTask.execute(AaptExecTask.java:699)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:120)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at processing.mode.android.AndroidBuild.antBuild(AndroidBuild.java:415)
at processing.mode.android.AndroidBuild.build(AndroidBuild.java:73)
at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:220)
at processing.mode.android.AndroidEditor$14.run(AndroidEditor.java:310)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 44 more
Total time: 2 seconds
The problem is on this part of the script from "build.xml":
<echo level="info">----------</echo>
<echo level="info">Handling Resources...</echo>
<aapt executable="${aapt}"
command="package"
verbose="${verbose}"
manifest="${out.manifest.abs.file}"
originalManifestPackage="${project.app.package}"
androidjar="${project.target.android.jar}"
rfolder="${gen.absolute.dir}"
nonConstantId="${android.library}"
libraryResFolderPathRefid="project.library.res.folder.path"
libraryPackagesRefid="project.library.packages"
libraryRFileRefid="project.library.bin.r.file.path"
ignoreAssets="${aapt.ignore.assets}"
binFolder="${out.absolute.dir}"
proguardFile="${out.absolute.dir}/proguard.txt">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
</aapt>
According to the error log, this is the line 690: proguardFile="${out.absolute.dir}/proguard.txt">
But I donnt know what to do.
Could you please give me a hand on this? I'm wasting so much time in this. I'm in trouble with this since yesterday morning. I've searched on google with no help.
EDIT:
I've deleted and re-installed the tools packages and the console of SDK Manager gave me this error:
Validate XML: https://dl-ssl.google.com/android/repository/sys-img/x86/sys-img.xml
Parse XML: https://dl-ssl.google.com/android/repository/sys-img/x86/sys-img.xml
Found Intel x86 Atom System Image, Android API 10, revision 2
Found Intel x86 Atom System Image, Android API 15, revision 1
Found Intel x86 Atom System Image, Android API 16, revision 1
Found Intel x86 Atom System Image, Android API 17, revision 1
Done loading packages.
Preparing to install archives
Downloading Android SDK Platform-tools, revision 18.0.1
Installing Android SDK Platform-tools, revision 18.0.1
**Stopping ADB server failed (code -1).**
Installed Android SDK Platform-tools, revision 18.0.1
Downloading Android SDK Build-tools, revision 18.0.1
I've been experiencing this issue as well, and apparently there are 2 possible causes:
Apparently the location of aapt has been changed by a recent version of the SDK tools, v22. I'm not sure if removing that version of the tools would fix it, or if that would be recommended. This thread has some fixes that might work.
If this doesn't fix the problem, you may be trying to run the 32 bit aapt on a 64 bit system without the 32 bit runtime installed. In this case the fix from this thread may fix the issue:
sudo apt-get --no-install-recommends install ia32-libs-multiarch
In my case, only the second of these fixes was necessary. By the way, I should point out that I was building android via Phonegap, so the use case may not match 100%. However, the same problem was occurring on the exact same line, where ant tries to execute aapt.
(Aside: The problem isn't necessarily on line 690 specifically, I think that line 690 is just given because it's the end of the "clause" specifying the execution of aapt.)
I have a ant target, xml file in my TFS project folder. the project folder is bound with TFS(Team Foundation Server). My problem is when ever i try to build the project by running the ant target in that TFS bound location it fails. it gives the following failure.
> ria_ant_build.xml:435: Error running C:\Program Files\Java\jdk1.6.0_20\bin\javac.exe compiler
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.
java:508)
at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:61)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1153)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:930)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_20\bin\javac.exe": CreateProcess erro
r=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.
java:505)
... 19 more
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 24 more
but when i copy the project to a different location and remove the read only attribute from the folder the ant target runs without any error and I'm getting a deploy-able artifact. but even when i remove the read only attribute from the TFS folder i could not build the ant target.It seems like the problem exist on the TFS location it self. :(
can some one suggest me a method to solve this problem. I have to stay in the TFS location you guys know the reason i assume :)
--
Thanks & Regards,
Rangana
From your question it's hard to figure out what really causes your problem.
Perhabs, your ant call length is too long and even longer than the max command prompt line (that's 8191 characters in the latest versions of Windows). As question Fail to launch application (CreateProcess error=87), can't use shorten classpath workaround says you may consider "to shorten folder names, reduce depth of folder trees, using parameter files, etc".
Try to run ant with the -debug option to see the specific command-line parameters of your build call inside the TFS workspace. In that way you can estimate the total length of the call.