Thanks for the help Mark. That works now. But now I am getting class cast exception as I have two class files with the same name under the same package in different directory though. I cannot remove it from myejb.jar file and I need to put that class file under a separate jar in application/web-inf/lib for my jsp's to see it as suggested. Does anyone has any idea about this. Thanks. Exception: [11:37:01] java.lang.ClassCastException: examples.ejb.beans.share.Project [878] [879] Remote Exception [880] java.rmi.RemoteException: System exception/error caught by container; nested exception is: [881] java.lang.ClassCastException: examples.ejb.beans.share.Project [882] java.rmi.UnexpectedException: Undeclared checked exception; nested exception is: [883] javax.ejb.EJBException: RemoteException: [884] java.rmi.RemoteException: System exception/error caught by container; nested exception is: [885] java.lang.ClassCastException: examples.ejb.beans.share.Project [886] javax.ejb.EJBException: RemoteException: [887] java.rmi.RemoteException: System exception/error caught by container; nested exception is: [888] java.lang.ClassCastException: examples.ejb.beans.share.Project [889] at examples.ejb.beans.session.ProjectStorage.search(ProjectStorage.java:167) -----Original Message----- From: Mark Phelps [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 4:36 PM To: JRun-Talk Subject: RE: catching custom exception located in deploy directory from jsp pa ge You are definately suffering from a classpath problem. I don't think that the deploy directory is autmatically on the classpath that the JSPs use. Try putting the exception class in a separate .jar file and placing that file in the classpath for the default server. You can do this via the JMC. You can also put the .jar file in the default-app\web-inf\lib directory where the JSPs will automatically see it. -----Original Message----- From: Minal Thakkar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 1:14 PM To: JRun-Talk Subject: catching custom exception located in deploy directory from jsp pa ge I have a method in a servlet JSP.class that throws a custom exception created by me. That custom exception extends Exception. package RMS; import examples.ejb.beans.session.RMS; import examples.ejb.beans.session.RMSHome; import examples.ejb.beans.share.ProcessingErrorException; ..................... .................. public String[] searchProject (HttpServletRequest request) throws ProcessingErrorException { // Create a Project object Project proj = makeProject (request); if (proj.category.equals("All")) ..................... ................... ................ } package examples.ejb.beans.share; public class ProcessingErrorException extends Exception { public ProcessingErrorException() {} public ProcessingErrorException(String message) {super(message);} } I call that method in MyJsp.jsp file. ....................... ...................... // Search for Projects int nrecs; String[] list = null; try{ list = rms.searchProject( request ); }catch(Exception e){ throw new Exception(); } if (list == null) { nrecs = 0; } else nrecs = list.length/3; .............................. ......................... ....................... But I am getting the following error. C:/Program Files/Allaire/JRun/servers/default/RMSRoot/WEB-INF/jsp/jrun__projList2ejspd. java:63:28:63:40: Error: Type examples/ejb/beans/share/ProcessingErrorException was not found. [1404] [1405] 06/13 13:07:50 error (JRun) Errors occurred during compilation: C:/Program Files/Allaire/JRun/servers/default/RMSRoot/WEB-INF/jsp/jrun__projList2ejspd. java:61:28:61:40: Error: Could not find package named: [1406] C:\jdk1.3.1\jre\lib\rt.jar(examples/ejb/beans/share), [1407] C:\jdk1.3.1\jre\lib\i18n.jar(examples/ejb/beans/share), [1408] C:\jdk1.3.1\jre\lib\sunrsasign.jar(examples/ejb/beans/share), [1409] C:\Program Files\Allaire\JRun\lib\ext/examples/ejb/beans/share, [1446] C:\Program Files\Allaire\JRun\servers\default\RMSRoot\WEB-INF\classes/examples/ejb/bean s/share or [1447] C:\Program Files\Allaire\JRun\servers\default\RMSRoot\WEB-INF\jsp/examples/ejb/beans/sh are [1448] C:/Program Files/Allaire/JRun/servers/default/RMSRoot/WEB-INF/jsp/jrun__projList2ejspd. java:61:28:61:40: Error: Type examples/ejb/beans/share/ProcessingErrorException was not found. [1449] Will the generic exception in my jsp not catch my custom exception since the custom exception extends Exception? I tried importing the examples.ejb.beans.share.ProcessingErrorException in my jsp but I am getting the following error. Compilation error occured: Found 3 errors in JSP file: C:\\Program Files\\Allaire\\JRun\\servers\\default\\RMSRoot\\projList.jsp:15: Error: "examples/ejb/beans/share/ProcessingErrorException" is either a misplaced package name or a non-existent entity. C:\\Program Files\\Allaire\\JRun\\servers\\default\\RMSRoot\\projList.jsp:26: Error: Could not find package named: C:\\Program Files\\Allaire\\JRun\\servers\\default\\RMSRoot\\projList.jsp:26: Error: Type examples/ejb/beans/share/ProcessingErrorException was not found. The processingerrorexception.class is in the jar file along with other ejbs in the deploy directory. JSP.class (servlet) and other jsp's are in different directory. JSP.class is able to locate the ejbs and other classes in the jar file but my jsp's aren't able to. Can anybody let me know how this is done. Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
