This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Java EE5 Tutorial - 'ant create-tables' BUILD FAILED Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Java EE5 Tutorial - Watch "Java EE5 Tutorial - New topic
Author

Java EE5 Tutorial - 'ant create-tables' BUILD FAILED

Paul Mac
Greenhorn

Joined: Jun 17, 2009
Posts: 2
Hi,

Appologies, this is quite a begineers question, hopefully it's an easy one to answer. I've searched for the last few hours regarding this issue,
trying things and searched the forums here with no similar issue. As you can see below, I cannot create the tables for the bookstore1 application using 'ant'.

I am getting a FileNotFoundException however the delete.sql and tutorial.sql files are at this location C:\javaee\javaeetutorial5\examples\common\sql\javadb\
I have also made sure that the files have read and write access. I know their could be some permissions issues using vista if I installed at C:/ProgramFiles, so everything is in C:/

Another thing I have tried is using the ant command directly even though the PATH is in my enviroment variables, just incase another version was conflicting, as I read about people having such issues.

"C:\Sun\AppServer\lib\ant\bin\ant create-tables" => This gave the same error as below. Im not sure what other information may help you help me here, so just ask.

Annoying thing is, this example worked fine when I set up the environment on my work laptop (which I have no access to now) earlier, I didn't have this issue.

Thanks for your help.

/Paul.


Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Ant appears to be looking for a file called "C:\javaee\javaeetutorial5\examples\web\bookstore1\=C:\javaee\javaeetutorial5\examples\common\sql\javadb\delete.sql" - can you post your target?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

And welcome to Javaranch Paul!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Paul Mac
Greenhorn

Joined: Jun 17, 2009
Posts: 2
Paul Sturrock wrote:Ant appears to be looking for a file called "C:\javaee\javaeetutorial5\examples\web\bookstore1\=C:\javaee\javaeetutorial5\examples\common\sql\javadb\delete.sql" - can you post your target?


Thanks for replies and the welcome. [Yea, I know it's says it's looking for that file, but it exists in C:\javaee\javaeetutorial5\examples\common\sql\javadb\ and I also copied delete.sql to C:\javaee\javaeetutorial5\examples\web\bookstore1\

I am working locally on Windows Vista. Thanks for help]

Edit - looking through my build properties I found 'javaee.tutorial.home==C:/javaee/javaeetutorial5'. I must have copied a second equals sign while copying directory path. It now works as expected.
Many thanks, I can now continue the tutorial
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java EE5 Tutorial - 'ant create-tables' BUILD FAILED
 
Similar Threads
java.lang.NoClassDefFoundError
Sun JavaeeTutorial jaxB examples
Failure to run simple clientsessionmdb example from Sun Java EE tutorial
@WebMethod not found
J2EE 1.5 tutorial