Solved

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

Posted on 2002-03-25
8
690 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countPairs challenge 7 58
json format text only 4 65
What is JNDI datasource in spring 1 37
ArrayIndexOutOfBoundException 9 30
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now