This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes java.lang.IllegalStateException while deploying EAR(Webclient + EJB) project to Jboss .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "java.lang.IllegalStateException while deploying EAR(Webclient + EJB) project to Jboss .. " Watch "java.lang.IllegalStateException while deploying EAR(Webclient + EJB) project to Jboss .. " New topic
Author

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

Gurubg Gb
Greenhorn

Joined: Jan 04, 2011
Posts: 5
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
uttam kumar
Ranch Hand

Joined: Jan 27, 2009
Posts: 128

For EJB deployment in JBoss, read this - EJB in JBoss
Gurubg Gb
Greenhorn

Joined: Jan 04, 2011
Posts: 5
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

Joined: Jan 27, 2009
Posts: 128


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

Joined: Jan 04, 2011
Posts: 5
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

Joined: Jan 04, 2011
Posts: 5
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

Joined: Jan 27, 2009
Posts: 128

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.IllegalStateException while deploying EAR(Webclient + EJB) project to Jboss ..
 
Similar Threads
Jboss 5.0.1GA - Error Installing to PortClassLoader
RuntimeException while trying to call the local interface of session bean from servlet
vfszip deployment error in Jboss 5.0.1 while deploying struts2 application
RuntimeException when calling the local interface of session bean from servlet code
RuntimeException when trying to deploy application using jboss