• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invoking EJB via Http call using Jboss

 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am new to the world of remotes and homes. I am stuck in this problem for a while... Please help me out.

I am using EJB 2.1 , Jboss 4.0.2, JDK 1.6 and JRE 5.0. I can able to invoke the session bean from a java application. But when i tried to invoke from the servlet (in my case JSF servlet,... also i tried with the Http Servlet ...i got the same result), it is giving the communication exception error. just like the call from main method, i am using Eclipse RCP as a front end and can be able to invoke the session beans.

1. What is the configuration need to be done in Jboss AS for EJB. Please explain it.
2. What is the exact difference between when a user making a call from a main method and call from a servlet.
3. Do i have to use the concept of Mbean? if it is so, could you please brief it. Or giveme some links to explore it.



Here is the class which is invoking the (Proxy) EJB,



This is the Error Message i am getting when i tried to invoke the EJB session bean ..... I understood that the root exception is because of the jboss-client.jar and jbossall-client.jar. But i am using the same jar files which comes along with the jboss 4.0.2.Zip. I am getting the same error. Is there any other thing causing this error? So what is the solution for this problem.



Thanks for your valuable time.

- Vinoth[/size][/size]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you error is that the client side version of the class is not the same version of your class on the server.

You need to make sure the jars on both sides that contains your EJBs have the same compiled versions. Otherwise you will get the exception that you are receiving.

So, in reality the question ends up not being EJB or about JBoss. Funny.

Good Luck, and try to recompile your code, and use the same .class files on both client and server sides.

Mark
 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thanks for the reply. My EAR have the both web client and EJB. So do i need to put the compiled jar file in the web client's library once again? Can you put some more words on that ...
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like the classpath has incorrect version of JBoss jar files. Do you package any JBoss jar files in your application? If yes, remove them from your packaging.
 
vinoth subramaniam
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the problem, thank you ..! As you said there is a jar file (jboss-common.jar) in the WEB-INF/lib. I removed it and that problem is solved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic