Community
Participate
Working Groups
java.io.FileNotFoundException at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:194) at java.io.FileOutputStream.<init>(FileOutputStream.java:145) at org.aspectj.util.FileUtil.makeOutputStream(FileUtil.java:1303) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.writeOutxmlFile(AjBuildManager.java:674) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildMa ... orker.run(Worker.java:53) Compile error: FileNotFoundException thrown: /STS-2539/target/test-classes/META-INF/aop-ajc.xml (No such file or directory) --- This can be reliably reproduced in Spring Tool Suite with the Spring Roo integration: * Create a new Spring Roo project in Spring Tool Suite * type 'jpa setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE ' into the Roo Shell * type 'entity jpa --class MyEntity' This should create a class MyEntity.java along with a few .aj files. The project will rebuild and should throw up a dialog with the given stack trace.
Thanks for the bug report. What's happening here is that AJDT is confusing a workspace path with a filesystem path. Before the build, AJDT needs to map all source folders with output folders. It needs to use filesystem paths, not workspace paths, so it must convert. The heuristic that AJDT has been using is that it first tries to convert the output folder to a workspace path. If that exists, AJDT uses it, otherwise AJDT assumes that the path is a filesystem path. In this case, the output folder does not exist and so the wrong choice is being made. Looks like we need a different heuristic for determining the true output folder.
Pushed a fix. The AJDT snapshot with this fix in it will be out tomorrow. Please try it out to confirm that it is fixed. Update site is here: http://download.eclipse.org/tools/ajdt/42/dev/update/
Thanks Andrew. I'll try the snapshot when its available.
Verified with AJDT 2.2.2.e42x-20121204-1900