Dear all ,
 
 Hello ! I am using JBoss-3.2.1 and a standalone Tomcat . I try to connect an EJB in Jboss's through JSP in Tomcat . Thank you for some people's nice help . Now , the JSP is as follow :
 
<%@ page
   session="false"
   isThreadSafe="true"
   isErrorPage="false"
   import="javax.naming.*, com.sample.*, javax.rmi.PortableRemoteObject, java.util.*, java.io.*, javax.net.*"
%>
<h4>test</h4>
<p>test</p><br><br>
<p><%
try {
      Hashtable env = new Hashtable();
      env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming;");
      // The bulk of our EJBs run here.
      env.put("java.naming.provider.url", "jnp://localhost:1099");
      Object ref = new InitialContext(env).lookup("HelloWorld");
      HelloWorldHome lHome = (HelloWorldHome) PortableRemoteObject.narrow(ref, HelloWorldHome.class);
      HelloWorld lSession = lHome.create();
   String fromEJB = lSession.hello();
      out.println( "" +  fromEJB);
   }
   catch( Exception e ) {
      out.println( "Caugth exception: " + e.getMessage() );
      e.printStackTrace();
   }
%></p>
 
 I can lookup the EJB's name ("HelloWorld") in JBoss's "Global JNDI Namespace" . However , when I run the JSP , Tomcat says :

Caugth exception: null

 And in the Dos :

javax.naming.CommunicationException.  Root exception is java.rmi.UnmarshalExcept
ion: error unmarshalling return; nested exception is:
        java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair

 Therefore , what futher configuration should I have . Thank you !

 



Jonathan
(Wong Yat Sing)
Jonathan Studio
M.P (852) - 91235947
NetMeeting : [EMAIL PROTECTED]
ICQ# 57646152


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Reply via email to