Solved

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

Posted on 2002-03-25
8
714 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to determine if a string is a valid SHA value 7 45
mysql jsp example issue 32 75
How to log java errors in tomcat 8 25
Html split(text) 2 32
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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

730 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