Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Error: Unable to find class for bean

Error: Unable to find class for bean

From: Saeed Rana <saeed_at_nms-sys-ltd.demon.co.uk>
Date: Thu, 9 May 2002 11:18:39 +0100
Message-ID: <uGNd0LA$zk28EwdW@nms-sys-ltd.demon.co.uk>


I have Oracle 8.1.7 installed on Suse 6.3. Oracle installs Apache, Jserv, and comes with a load of demos for JSp's, all of which I have verified as working.

I created a directory called /home/saaed/jsp, and added an alias in the Apache httpd.conf called srjsp pointing to this directory.

In this directory I have created some very simple JSP's, all of which work fine. My next step is to try a simple bean. I created a file called NMSTest.java whcih includes a 'package NMSBean' statement at the top to identify it as a package. I compiled this and it created the NMSTest.class file. I then used jar to put this in a file called NMSBean.jar.

I then wrote a JSP which references this bean as follows:

<%@ import="NMSBean.NMSTest" %>

<jsp:useBean id="pageBEan" class="NMSBean.NMSTest" scope="page" />

When I try to access the page in the browser I get:

oracle.jsp.parse.JspParseException: Line # 2, Error: Unable to find class for bean: pageBean defined by tag with class: NMSBean.NMSTest

I then found the directory $ORACLE_HOME/Apache/htdocs/WEBINF /classes/beans in which are dot .java and correspodning .class files that pertain to the Oracle samples, and copied the NMSTest.class file to there. I bounce Apache, tried again, but still got the same error.

I then thought that since the classes in the directory were in a package called "beans", I changed all references to NMSBean to simply 'beans' and replaced the files with the new versions - still I get the error.

I spent all day yesterday searching the web for answers. Any help would be appreciated.

Kind regards,

Saeed Rana

NMS Systems Ltd Received on Thu May 09 2002 - 05:18:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US