?
Solved

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

Posted on 2002-03-25
8
Medium Priority
?
733 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
Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

 
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

Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

Question has a verified solution.

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

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 …
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month9 days, 2 hours left to enroll

764 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