• Post Reply Bookmark Topic Watch Topic
  • New Topic

Make SERVLET talk to EJB

 
Sanya, Kapoor
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have started working on an application where my SERVLET retrieves parameters from an html page, transfers them to the ejb container, then it receives results from the Session Bean through the container, and Publishes back the result as an html file, to the end user.
Now the problem is, while I write the source code for the Servlet i.e the .java file, I need to import javax.rmi.PortableRemoteObject, so as to create an instance of the home interface of the Session Bean. I get the error: "Class javax.rmi.PortableRemoteObject not found in import." though all other javax imports work.
And thus I am not able to compile the servlet. Though I am able to compile the home interface, remote interface, the session bean.
I am working with:
1. Weblogic Server 4.5.1
2. Jakarta-Tomcat-3.2.1
3. jdk1.2.2
4. Windows 98 - Operating System
My all class paths and paths are well set, Since everything else compiles except for:
import javax.rmi.PortableRemoteObject;
or rather javax.rmi package
It could be that Weblogic Server 4.5.1 does not contain the above package. If that is the case, then I would like to know, in what other way I can solve this problem of mine? I do not wish to change my application server or the operating system.
Please, if anybody can advice me on this.
Sanya
 
Aravind Ravi
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Just find the file j2ee.jar and include it in ur classpath. Hope that helps.
Regards,
Aravind.
 
Manish Mudgal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sanya, Malik:
Hi!
I have started working on an application where my SERVLET retrieves parameters from an html page, transfers them to the ejb container, then it receives results from the Session Bean through the container, and Publishes back the result as an html file, to the end user.
Now the problem is, while I write the source code for the Servlet i.e the .java file, I need to import javax.rmi.PortableRemoteObject, so as to create an instance of the home interface of the Session Bean. I get the error: "Class javax.rmi.PortableRemoteObject not found in import." though all other javax imports work.
And thus I am not able to compile the servlet. Though I am able to compile the home interface, remote interface, the session bean.
I am working with:
1. Weblogic Server 4.5.1
2. Jakarta-Tomcat-3.2.1
3. jdk1.2.2
4. Windows 98 - Operating System
My all class paths and paths are well set, Since everything else compiles except for:
import javax.rmi.PortableRemoteObject;
or rather javax.rmi package
It could be that Weblogic Server 4.5.1 does not contain the above package. If that is the case, then I would like to know, in what other way I can solve this problem of mine? I do not wish to change my application server or the operating system.
Please, if anybody can advice me on this.
Sanya

Hi Sanya
In case weblogic server u need to set classpath for weblogicaux.jar file which contains all the class files needed regarding JNDI.
I hope it will work properly then
Bye
Manish


------------------
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!