jonathan wong wrote:

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 !


I see MarshalledValuePair.class in the following jars in jboss-3.2.1/client:


jnp-client.jar
jbossjmx-ant.jar
jbossall-client.jar

Do you have either the first or the third in the classpath you are using for Tomcat? Post your Tomcat classpath - it should show up in your Tomcat console when you startup Tomcat.



--
Guy Rouillier




------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to