• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help

 
Rajshekhar Paul
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 jndi.properties, 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.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably don't need the jndi.properties 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 xxx.er"
 
Rajshekhar Paul
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception was javax.naming.NoInitialContextException.
And I think it was because of the jndi.properties 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
Posts: 15354
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use a meaningful subject line instead of something like "Need Help".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic