• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help me!

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a simple EJB (simply return "Hello World") and I deploy it in JBoss-2.4.4
then I wrote a JSP page that looking for this EJB and display Hello World in my browser, here is the code :
<%
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, "localhost:1099");
InitialContext jndiContext = new InitialContext(properties);
Object ref = jndiContext.lookup("StringProcessor");
StringProcessorHome home = (StringProcessorHome)PortableRemoteObject.narrow(ref, StringProcessorHome.class);
StringProcessor sp = home.create();
out.println(sp.hello( ));
%>
and I deployed it in Tomcat 4.1
and I put jboss-client.jar, jboss-j2ee.jar, jnp-client.jar in : myapp/WEB-INF/lib directory
but when I requested the page, it display an exception (StringProcessor not bound).
(JAVA_HOME, J2EE_HOME, CATALINA_HOME, CLASSPATH, PATH are all set correctly)
so what is the problem??
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cmon guys, please I need your help.
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Todd,
If I used the same tools as you I would be happy to help. Regrettably that is not the case, and I don't have the time for learning tools at the moment (really busy with web services and consulting gigs). If you were using the IBM WebSphere stuff, I could help you and you could probably help yourself a lot better. There are free trial copies of WebSphere Studio Applcation Developer, good for 60 days, that you can download from the IBM we site. The choice is yours. Good Luck!
Regards,
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Howard, I found a small mistake in my ejb-jar.xml, but now, new Exception is thrown (SecurityManager..).
I think there is some jar files from JBoss I must put it in :
myapp/WEB-INF/lib
so any one can tell me what is this files.
by the way, can you tell me if there is a free xml editor??
Thanks for help.
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Todd:
by the way, can you tell me if there is a free xml editor??
Thanks for help.

XMLSPY is the next best thing to WebSphere Studio, and you can prob'ly find a free trial version. Go to ALTOVA and check it out for yourself.
You're quite welcome!
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Soon, I think I will solve this problem, I am encouter the final problem,
and the following exception is thrown:
javax.naming.CommunicationException [Root exception is ClassNotFoundException:
org.jboss.ejb.plugins.jrmp13.interfaces.HomeProxy (no security manager)
I think you will be able to help me, (you are using WebSphere,and I think you encouter like this exception,so when this exception is thrown??)
Your answer will save my life.
Survive.
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
ClassNotFoundException sounds like a class loader problem (i.e. classpath). I have not encountered the javax.naming.CommuncationException in any of my work. That said, a stack trace might help, but if it were me, I would be using my debugger right about now.
The HomeProxy wants to talk to the remote home, and can't is what seems to be the symptom. Determining what is the root cause may be tricky though.
I wish I could be of more help right about now.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind Howard, thank for your help, I hope I don't disturbe you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!