aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes problem in accessing a distributed EJB through a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "problem in accessing a distributed EJB through a servlet" Watch "problem in accessing a distributed EJB through a servlet" New topic
Author

problem in accessing a distributed EJB through a servlet

mara thamizhan
Ranch Hand

Joined: Jul 05, 2006
Posts: 74
Dear all,
I'm a trying to call a stateless session bean which has its home and component interfaces, which prints the name it receives from the servlet client.
I'm trying to access a remote server EJB beans, which has been registered with JNDI & when deploying the EJB beans onto the Jboss server which operates in localhost: 8081 it has shown




This is my servlet which is there in tomcat container which runs in localhost:8082 to access the bean:



Then in my tomcat container console it's showing exception like:



Could anyone encountered this problem & could anyone say how to fix this issue.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

java.net.SocketTimeoutException


It appears your client is unable to talk with the server. Do you have a firewall ? Are you able to access the JBoss console ? Does the target JBoss server have your bean deployed ?

You will have to change your name. namma thamizhan translates to our tamilian and it is not a valid name.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

Hi Namma,

it seems to be a problem with the JNDI lookup. Are you using JBoss with a default configuration? Then localhost and port 8081 would be wrong. The default options for the JNDI lookup with JBoss are as follows:

You should first try to set the port to 1099 in your properties for this is the default port a client (here: your servlet) has to use to get a JNDI lookup from JBoss.

Marco
Anoopp Thakur
Greenhorn

Joined: May 03, 2008
Posts: 5
I'm trying to access a remote server EJB beans...


And also as it is a remote server, in place of localhost it should be

mara thamizhan
Ranch Hand

Joined: Jul 05, 2006
Posts: 74
when i change the properties url to jnp:localhost

again it's throwing Unmarshal exception

The full stack trace of the exception is:
mara thamizhan
Ranch Hand

Joined: Jul 05, 2006
Posts: 74
I've found out the solution and i need to install my webapplication in a tomcat directory without whitepsaces i.e. c:\program files\apache\.....\tomcat5.5 is the cause of these exception.

 
Don't get me started about those stupid light bulbs.
 
subject: problem in accessing a distributed EJB through a servlet