Compilation of 'C:\DOCUME~1\Admin\LOCALS~1\Temp\jsp_servlet\__index.java' failed: C:\DOCUME~1\Admin\LOCALS~1\Temp\jsp_servlet\__index.java:145: cannot resolve symbol
probably occurred due to an error in /index.jsp line 17:
StatefulSessionHome home = (StatefulSessionHome)ctx.lookup("ejbjsp");

C:\DOCUME~1\Admin\LOCALS~1\Temp\jsp_servlet\__index.java:145: cannot resolve symbol
probably occurred due to an error in /index.jsp line 17:
StatefulSessionHome home = (StatefulSessionHome)ctx.lookup("ejbjsp");

I am using weblogic8.1 server. i dont have manifest.mf files there. Only ejb-jar.xml and weblogic-ejb-jar.xml. And ya i know this is naive approach to build applications writing ejb code in jsp file. My problem is that i want to deploy an EAR file which successfully runs.

Another doubt persists in my mind is...

EJB gives service components residing on the server side. So once *.jar files are deployed and your service components will reside in server. Any client can go and look for the service component using JNDI Look up name of the component. If this is the case, i write stateless session bean which gives the name of the server if client looked up.. Ok. Now my client writes the lookup code in jsp file (Let it be.. the client is naive).

If my understanding is correct, I should not get the errors mentioned in my earlier replies. Because the errors pose as it depends on the class files that the server runs. Thats puzzling.. Please correct me and give any other way of writing EAR application..

Abubacker Siddik wrote:I have one jsp file. which has JNDI lookup code. This is a naive approach for EAR. (Let it be)

Ok. Noting that you may encounter problems that are hard to get help with because people don't have experience doing that.

Abubacker Siddik wrote:Now the important point is, I placed the class files EJBHome, EJBObject, and Session Bean of myejb.jar in the WEB-INF\Classes folder.. (I thought this would solve my problem).

That would "solve" a compiler error but introduce a new error - not being able to call the EJB because it is just Java code. It does hint at the problem though. My guess is the JSP imports are incorrect. Can you show what imports you have in the JSP along with the package name of the EJB?

Abubacker Siddik
Ranch Hand

Joined: Aug 12, 2009
Posts: 90

posted Sep 10, 2009 05:41:08

0

This is the .jsp file showing the import files. I still dont get the solution.

Abubacker Siddik
Ranch Hand

Joined: Aug 12, 2009
Posts: 90

posted Sep 10, 2009 06:36:47

0

Thanks Jeane, I found the error i did and solved the problem. My EAR is running now. I didnt import package where my *.class files are.. Now i imported the package in the jsp file. Now it runs.. Thanks a lot.

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com