Solved

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

Posted on 2002-03-25
8
695 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Python Assistance 7 70
Java Timer (static) 9 36
stackato and cloud 4 64
javap not working 8 35
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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 regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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.

948 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

20 Experts available now in Live!

Get 1:1 Help Now