• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need Help

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use a meaningful subject line instead of something like "Need Help".
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic