Calling ejb from a servlet


General J2EE: Calling ejb from a servlet

  1. Calling ejb from a servlet (1 messages)

    I am having an application using jboss 4.0.3SP1 and tomcat 5.0.28
    When i try calling the ejb deployed in jboss using following code
    InitialContext jndiContext = new InitialContext();
    Object ref = jndiContext.lookup("interest/Interest");

    I get error saying --

    javax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: no protocol: tomcat5.0/jakarta-tomcat-5.0.28/webapps/servlets-examples/WEB-INF/classes/]

    Tomcat is installed in directory having spaces (D:\jakarta tomcat5.0\jakarta-tomcat-5.0.28)

    Same code works fine if tomcat is installed in directory having no space . Please let me know if anyone faced this issue and how to tackle it

    Any help is appreciated
  2. Calling ejb from a servlet[ Go to top ]

    That is the same old story; there a lot of similar posts in JBoss Forum. For example, see:

    You can't but change your Tomcat installation location.