• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Java ManagedBean and RMI to access methods on a server.

 
scott coleman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there everyone.
My first post on your forums as I've never usually had to post because somebody on here has asked the questions and posted the answer i was looking for.
so here it goes.

I'm using:
NetBeans 6.9
Tomcat 6.0
JSF - primeFaces
Hibernate with JPA
mySQL

What I want my system to do:
I currently have a Primefaces XHTML front end
the XHTML calls methods via a bean using the @managedBean annotation.
I then want the bean to perform an RMI call to a server class file I have running on my local machine.
This 'server' then persists data to a mySQL database.

Currently I'm just trying to get the bean-to-RMI set-up,
so i have a simple method called ping(); which gets called in the constructor of the bean.

Bean:-


ServerInterface:-


'Server':-


Error:

In the stackTrace I'm getting this error:


It happens at line:

in the bean.

If I take the code that i used in the bean, stick it in a javaclass file and run it through commandprompt then it pings the server as it should do.
So i'm guessing its got something to do with it being in a managed bean?

Can any of you guys help?
Cheers,
Scott


As a side note:
I've already done something similar,
the client RMI code was run from a servlet in tomcat and the rmi worked correctly




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic