• 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

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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




 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic