File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Need Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Need Help" Watch "Need Help" New topic

Need Help

Rajshekhar Paul
Ranch Hand

Joined: Oct 17, 2006
Posts: 140
Hi all,

I am a novice to EJB and hence the configuration part is also totally new to me.
I have searched in this forum about the EJB 3.0 project environment setup guide in context with JBoss.
But that search din't yield any result.

The particular problem I am facing is when I am trying to setup the examples given in the 'EJB 3 in Action' book.
I am stuck in the very first chapter itself.
I have -
1. Setup the JBoss 4.2.2
2. Added the JBoss as a server in Eclipse Ganymede
3. Created an EJB project in the Eclipse
4. Put all the source code(client & ejb) inside 'ejbModule'.
5. There are some other files like, jboss-app.xml and application.xml. I have no clue where I need to put these files in the project.
I tried putting all of them in the 'META-INF' directory. But while I tried to run the client, it resulted in none other than an exception.

Please help me to solve the problem.

When it's obvious that you have to do it, just do it without shattering your thoughts over different directions.
Peter Johnson

Joined: May 14, 2008
Posts: 5852

You probably don't need the file, and the other 2 files go in META-INF, so I think you are okay there.

What exception are you getting?

Also in step 4, please describe the exact layout for the deployed EAR file. You can get this by running the jar command like this: "jar -tf"

JBoss In Action
Rajshekhar Paul
Ranch Hand

Joined: Oct 17, 2006
Posts: 140
The exception was javax.naming.NoInitialContextException.
And I think it was because of the file not being available in the proper location.

But finally, I was able to run the program.
I have attached the project directory structure here.

Thank you for the reply.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

Please use a meaningful subject line instead of something like "Need Help".

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Need Help
It's not a secret anymore!