• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

java.lang.IllegalStateException while deploying EAR(Webclient + EJB) project to Jboss ..

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello folks,

I am new to J2EE scene and I have to develop a Web application involving Session and Entity beans . For this I have created a Dynamic Web client and one EJB project.
I have one session bean with the remote interface defined which is called from a servlet in my webclient.

I have created one EAR project to deploy my web and EJB modules to the JBOSS server (JBoss 5.0.1.GA) .
I am using eclipse IDE ...

I am not sure if the configuration files for my project are corrent .. i,e jndi.properties and Persistence.xml files ,,

jndi.properties file contains
and I have placed it in Webcontent folder of my web client ..

Persistence.xml file contains
This I have placed in EJBmodule/META_INF directory of my EJB project.

There is one application.xml file generated by JBoss when I created an EAR project with the web and ejb modules ..


I assume this should be enough to deploy it to JBoss .. But when I deployed it I got the following error ..


Could someone help me with the above error , correct me if I am missing something to configure the projects ..
Also it would be great if I get to look at step by step procedure to configure the EJB project to Jboss ..
Hope to get a quick response ..

Thanks in advance ..
Guru
 
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For EJB deployment in JBoss, read this - EJB in JBoss
 
Gurubg Gb
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Uttam,

Thanks for the link.. will go through it ..
But any thoughts on the error which I have posted ???

-Guru
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The "/Test" has already been deployed, that's why you are getting the error. Try changing the context root to something else. See if it works.
 
Gurubg Gb
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I changed the name to Test1 just to try , and it does work .. The Web client is deployed and I can see my homepage coming up ..
But I am trying to access a Session bean from my servelt which fails with the error "javax.naming.NameNotFoundException: UserSBRemote not bound"..
I guess my EJB module is not getting deployed properly .. Any clue how to test it ?
 
Gurubg Gb
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh Sorry for my earlier reply , it doesn't seem to work when I try to deploy the EAR project..
The page never get launched .
<Context-root> has some significance here > I can't give some random name ??
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

javax.naming.NameNotFoundException: UserSBRemote not bound


It appears your EJB is being deployed before the servlet looks for it.

BTW, if your previous problem has been resolved please ask this question in a new thread and mark this thread as resolved.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic