>>>>> "Dobromir" == Dobromir Herzog <[EMAIL PROTECTED]> writes:
Dobromir> Hi!
Dobromir> I use Tomcat 3.2.1 on first Linux machine and Jboss 3.2.2 on another
Dobromir> (IP:213.25.69.82). I'm able to execute Interest example from Jboss's
Dobromir> manual but when I converted it to JSP it doesn't work. This is the JSP
Dobromir> code:
Dobromir> <%@ page import="java.io.IOException, javax.naming.InitialContext,
Dobromir> javax.rmi.PortableRemoteObject, com.web_tomorrow.interest.*, java.util.
Dobromir> *,javax.ejb.*, javax.naming.Context" %>
Dobromir> <HTML><BODY>
Dobromir> <%
Dobromir> Hashtable env = new Hashtable();
Dobromir>
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
Dobromir> env.put(Context.PROVIDER_URL, "213.25.69.82:1099");
Dobromir> try{
Dobromir> InitialContext jndiContext = new InitialContext(env);
Dobromir> Object ref = jndiContext.lookup("interest/Interest");
Dobromir> out.println("Got reference");
Dobromir> InterestHome home = (InterestHome) PortableRemoteObject.narrow
Dobromir> (ref,InterestHome.class);
Dobromir> Interest interest = home.create();
Dobromir> out.println ("Interest on 1000 units, at 10% per period,
compounded
Dobromir> over 2 periods is:");
Dobromir> out.println (interest.calculateCompoundInterest (1000, 0.10, 2));
Dobromir> }
Dobromir> catch(Exception e){
Dobromir> out.println("Sth. wrong ...");
Dobromir> out.println(e.toString());
Dobromir> }
Dobromir> %>
Dobromir> </BODY></HTML>
Dobromir> When it runs the output is:
Dobromir> Sth. wrong ...javax.naming.CommunicationException [Root exception is
Dobromir> java.lang.ClassNotFoundException: com.web_tomorrow.interest.InterestHome]
Dobromir> I believe I have all (not all necessary but ALL) client jars in my
Dobromir> classpath, com.web_tomorrow.interest package in my WEB-INF/classes
Dobromir> directory.
I believe you need to put the client jars into WEB-INF/lib, not in your
CLASSPATH.
--
===================================================================
David M. Karr ; Best Consulting
[EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user