Solved

Using ANT to create .ear and .war files...

Posted on 2002-03-25
8
708 Views
Last Modified: 2008-03-06
Hi all, quick question.

Trying to use Ant to create .war and .ear files to deploy to the latest release of oc4j

I am using the sample addressbook example that can be found on

http://kb.atlassian.com/content/tutorials/jollem/orion-cmp-primer/ 
, however upon running the Ant tool, the response is nothing more than -
E:\addressbook>"c:\jdk1.2.2\\bin\java" -classpath "c:\jdk1.2.2\\lib\tools.jar;c:\jakarta-ant-1.4.1\\lib\jaxp.jar;c:\jakarta-a
nt-1.4.1\\lib\crimson.jar;c:\jakarta-ant-1.4.1\\lib\ant.jar;c:\jdk1.2.2\bin;C:\oracle\ora81\bin;;C:\oracle\ora81/bin;C:\oracle
\ora81\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program Files\Oracle\jre\1.1.7\bin;C:\WINNT\system32;C:\WINNT;c:\jakarta-ant-1.4
.1\\bin;c:\jakarta-ant-1.4.1\lib" -D ant.home="c:\jakarta-ant-1.4.1\"
Exception in thread "main" java.lang.NoClassDefFoundError: ant/home=c:\jakarta-ant-1/4/1"

- it seems that, although the tool has 'kicked in' it has not been able to either 1) find the build.xml file 2) for some reason ant.home has been transposed to ant/home...

Anybody feeling brave...??!!

Thanks in adavance

0
Comment
Question by:stuart_graham
8 Comments
 
LVL 2

Expert Comment

by:coreyit
ID: 6895739
Well, here are some points that *may* help, but don't quite seem to fit in this case.

- change ant.home to ANT_HOME
- for convenience, have ANT_HOME/bin added to your system path
- ant looks, by default,  for build.xml in the current directory
- try running ant with the -verbose flag to see if it provides any output more helpful.

-corey
0
 

Author Comment

by:stuart_graham
ID: 6896001
Thanks for the reply coreyit,

Do you mean change the build.xml content from ant.home to ANT_HOME ? I have ANT_HOME as an environment variable as well as my path including the bin dir of Ant.

The trouble is that when I type ant I get:

Exception in thread "main" java.lang.NoClassDefFoundError: ant/home=c:\jakarta-ant-1/4/1" ...OR... just the outcome of running ant -?... very odd.

I've tried to run using all of the options but the outcome is always the same.....is the ant.home setup for UNIX? in which case need I change the whole shebang to ""-""

Cheers all the same...

0
 
LVL 2

Expert Comment

by:coreyit
ID: 6898475
hmm,

No, I meant to be sure your system variable was ANT_HOME, which it is, so...?

I downloaded the orion addressbook-src.zip and was mildly successful running ant with no changes to my system or additional downloads. It got as far as the compilation phase (ant target "ejb-classes") before failing because I don't have the javax.ejb package (which is probably included with the Orion download).

Here is a list of some of my system info that may be useful:
- using cygwin and dos command prompt
- using jdk 1.4
- ANT_HOME is set (with and without "." in the path)
- JAVA_HOME is set
- PATH has ANT_HOME/bin and JAVA_HOME/bin included
- steps:
  1) downloaded and unpacked (say, to TESTDIR)
  2) > cd $TESTDIR (contains build.xml and src directory)
  3) > ant

The two things puzzling me are
  1) if there is really also an "ant.home" variable set, where is that?
  2) why do your "." characters seem to be converted to"/" characters in both the var name and the value?

I suppose I may be able to track something more down if you replied with some system settings and steps your following as well. Not sure though. Sorry that this hasn't helped much.

-corey
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 2

Expert Comment

by:coreyit
ID: 6898476
Oh,

one more idea. Try removing the following line from the build.xml:

<property name="build.compiler" value="classic" />

cheers,
corey
0
 

Author Comment

by:stuart_graham
ID: 6898952
Thanks for the help,

I'll give that a go.  I've no idea why the system seems to have transposed the . for a /
Got a feeling that having JNDI / LDAP may be causing some unforseen probs.

Anyway thanks coreyit
0
 
LVL 2

Expert Comment

by:coreyit
ID: 6900170
sure,
good luck. :)

-corey
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7894628
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ'd and pts refunded
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7962339
Per recommendation, points refunded and question closed.

Netminder
EE Admin
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hibernate jars 4 45
runtime exception 2 41
difference between sorce folder and folder in eclipise 3 28
Java 8 to Java 6 8 20
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question