Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

problem in accessing a distributed EJB through a servlet

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
    Bookmark Topic Watch Topic
  • New Topic