Cannot find package/class symbol

hello. i'm using netveans for the first time. i have a java application with 2 classes... pb.java with public class pb int package svr and cl.java with public class cl in package cli
that is..
file class package
pb pb svr
cl cl cli
pb.java compiles properly cl.java gioves error.
the error is in the following lines of code...
pb obj1 = new pb();
        pb obj2 = new pb();i'm trying to make an object fo type pb from cl.java. the error i get is...
cannot find symbol
class pb
location cli.cl
i alse tried puttin svr.pb instead of pb but no use.
the entire cose is as follows...
pb.java
* pb.java
* Created on December 4, 2006, 8:56 AM
package svr;
public class pb
    private double balance;
    private double []lt = new double [10];
    private int i=9;
    public void deposit(double amt)
        if(amt<=0)
            System.out.println("Enter amount greater than 0");
        else
            balance=balance+amt;
            if(i>=0)
                lt=amt;
else
for(int j=9;j>=0;j--)
lt[i]=lt[i-1];
lt[0]=amt;
public void withdraw(double amt)
if(amt<=0)
System.out.println("Enter amount greater than 0");
else
if(amt>balance)
System.out.println("Balance lower than amount entered");
else
balance=balance-amt;
if(i>=0)
lt[i]=-amt;
else
for(int j=9;j>=0;j--)
lt[i]=lt[i-1];
lt[0]=-amt;
public void bal()
System.out.println("Balance: "+balance);
public void lts()
System.out.println("Last 10 Transactions");
for(int j=i;j>10;j++)
System.out.println(lt[j]);
public void statement()
lts();
bal();
cl.java
* cl.java
* Created on December 4, 2006, 8:58 AM
package cli;
class cl
    public static void main(String[] args)
        pb obj1 = new pb();
        pb obj2 = new pb();
        obj1.deposit(100.50);
        obj1.statement();
        obj2.deposit(200.75);
        obj2.statement();
        obj1.withdraw(25.50);
        obj1.statement();
        obj2.withdraw(100.25);
        obj2.statement();

For a beginner these tools are worst, because they
hide all the stuff a programmer needs to know to find
his way around Java. They should spend a few weeks
with the command line and a good text editor before
switching.
Just because an IDE does something for you, it
doesn't mean you don't need to kno wwhat it does.
Unless you volunteer to handle all "how do I do X in
Netbeans/Eclipse/Whatever", JAR and classpath
questions posted here by newbies yourself.I suppose I can agree with that to some extent. I wouldn't suggest to anyone that they just blindly trust whatever code the IDE inserts automatically.
But there's nothing wrong about learning by example. The IDE is willing to teach proper syntax, and eclipse will give suggestions about capitalizing class names and making constants all-caps.
There are things that frustrate new programmers where an IDE will be helpful, especially if the entire API is uncharted territory.

Similar Messages

  • Cannot find the class file

    Hi All,
    Can any one help me regarding the issue?
    Error:
    package com.support.misc.feedback
    I am getting the following error for the above line. But I have created the Hierarchy in folder structure. But still it is throwing the error.
    1. Cannot find the class file for com.sapportals.htmlb.page.DynPage
    2. This compilation unit indirectly references the missing type com.sapportals.htmlb.page.DynPage (typically some required class file is referencing a type outside the class path)     FeedbackBean.java
    Thanks in Advance.
    Message was edited by: Gowsika Kannan

    Hi Gowsika,
    the class needed is located in htmlb.jar which can be found under <irj-root>/WEB-INF/portal/portalapps/com.sap.portal.htmlb/lib
    You need to integrate this jar in your .classpath
    Hope this helps,
    Robert
    PS: Please do not post the same question 3 times

  • Wrapper cannot find servlet class error

    Hi all!
    I'm receiving a mysterious error when I try to run my web ap. "Wrapper cannot find servlet class com.ruffalocody.report.ReportServlet or a class it depends on"
    I'm running it on JBoss 3.2.7, and I have another web ap, made almost identical to this one which does not display the same error/exception.
    If anyone could give me advice on what I should do to fix this, I'd very much appreciate it. :)
    Full exception message:
    javax.servlet.ServletException: Wrapper cannot find servlet class com.ruffalocody.report.ReportServlet or a class it depends on
         org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
         org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:162)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:534)
    root cause
    java.lang.ClassNotFoundException: com.ruffalocody.report.ReportServlet
         java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         java.security.AccessController.doPrivileged(Native Method)
         java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
         org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:162)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:534)the servlet class file ReportServlet.class is located in:
    WEB-INF\classes\com\ruffalocody\report
    web.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <servlet>
            <servlet-name>RprtSrvlt</servlet-name>
            <servlet-class>com.ruffalocody.report.ReportServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>RprtSrvlt</servlet-name>
            <url-pattern>/reports</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
         <welcome-file>
                index.jsp
            </welcome-file>
        </welcome-file-list>
        <!-- Context Param -->
        <context-param>
        <param-name>crystal_image_uri</param-name>
        <param-value>crystalreportviewers10</param-value>
        </context-param>
        <!-- Context Param End -->
    </web-app>It's called from the index.jsp page w/ ulr: "reports?goTo=view"
    Servlet code (not sure if it's useful, but including just in case):
    * ReportServlet.java
    * Created on February 1, 2007, 11:04 AM
    package com.ruffalocody.report;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory;
    import com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2;
    import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
    import com.crystaldecisions.report.web.viewer.CrystalReportViewer;
    import com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase;
    * @author aerohner
    * @version
    public class ReportServlet extends HttpServlet
        String rptLoc = "CR10_JRC_BeginHere.rpt";
        /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
         response.setContentType("text/html;charset=UTF-8");
         String goTo = request.getParameter("goTo");
         if(goTo != null && goTo.equals("view"))
             viewReport(request, response);
         }// end goTo view
         else if(goTo != null && goTo.equals("export"))
             exportReport(request, response);
         }// end go to export
         else
             RequestDispatcher view = request.getRequestDispatcher("index.jsp");
             view.forward(request,response);
        private void viewReport(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException
         IReportSource rptSrc = setUpReportSource(request);
         if (rptSrc != null)
             // create viewer
             CrystalReportViewer viewer = new CrystalReportViewer();
             try
              viewer.setReportSource(rptSrc);
              forward(request, response, viewer);
             catch(ReportSDKExceptionBase e)
              e.printStackTrace();
         }// if rptsrc not null
         else
             log("rptSrc is null");
         }// end else not null
        }// end viewReport(.)
        private void exportReport(HttpServletRequest request, HttpServletResponse response)
        }// end exportReport(.)
        private IReportSource setUpReportSource(HttpServletRequest request)
         IReportSourceFactory2 rptFact = new JPEReportSourceFactory();
         IReportSource rptSrc = null;
         try
             rptSrc = (IReportSource)
              rptFact.createReportSource(rptLoc, request.getLocale());
         }// end try
         catch (Exception e)
         return rptSrc;
        }// end setUpReportSource()
        private void forward(HttpServletRequest request,
             HttpServletResponse response, Object viewer)
             throws ServletException, IOException
         request.setAttribute("viewer", viewer);
         RequestDispatcher view = request.getRequestDispatcher("viewer.jsp");
         view.forward(request,response);
        }// end forward(...)
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
         processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
         processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo()
         return "Short description";
        // </editor-fold>
    }Thanks :)

    I'm curious. Could you strip off the "java." part of the package, so both in your sourcefile as in the directory structure? It may be that the java package is not allowed, but then I wouldn't know why you didn't get a compile error...

  • "cannot find this class" erro while creating Background Callable Object.

    Hi All,
    I am facing "cannot find this class" while creating Background Callable Object.
    I followed the following document for Creating Background Callable Object.
    [Creating Callable Objects for Background Execution|http://help.sap.com/saphelp_nwce10/helpdata/en/53/cde385301f4aa3b8e77a92cd46bff3/frameset.htm]
    After giving the fully qualified java class name in the Implementation Class Name when i press next i am getting the error.
    Please suggets me in solving this issue.
    Regards,
    S.V.Satish Kumar
    Edited by: Sathish Kumar SV on Apr 4, 2009 10:34 AM

    Hi, kavita.
    First, make sure you choosed the correct container when you created the background CO.
    Second, make sure your package name was "com.examples.bckgco" and class name was "UserDetailsCallableObject". The exception  which you got just means you entered incorrect name.
    It doesn`t relate to your program.
    Best Regards.
    Louis Huang.

  • Wrapper cannot find servlet class

    Hi all
    Can anyone please help me to resolve this error. It come about since I've provided the package (pa_sodev.pr_add_user_diary_event). My Java file is in Java Resources:src folder .
    I don't have a folder called classes in my WEB_INF directory.
    Many thanks
    Zed
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class addEveProcess or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.ClassNotFoundException: addEveProcess
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         java.lang.Thread.run(Unknown Source)Edited by: Zed420 on Jan 31, 2010 6:09 PM

    Thanks for your reply, can I ask if my setup is correct ?
    I'm using Eclipse, on my left in Dynamic Web Perspective I have Servers and myProject.
    In myProject ->Java Resources:src (this is where all my java files are with package) and WebContent.
    In WebContent ->META-INF and WEB-INF
    In WEB-INF ->(this is where I have lib folder and my xml & jsp files)
    In lib I have Oracle connector .jar
    Can someone confirm if this is the right setup please.
    thanks
    Zed

  • HT204291 I seem to have tried all of the above, but still cannot find the airplay symbol on my Ipad 2. Any suggestions ?

    I cannot find the airplay symbol on my Ipad 2. I have tried all suggestions in te troubleshooting guide, but still no success. Please help.

    Have you left the iPod to charge for a couple of hours and then tried resetting it again? It can take up to at least 30 minutes of charging before an iPod with a dead battery shows any signs of life.  By a reset, I assume you mean pressing and holding both the Select/Center and Menu buttons together long enough for the Apple logo to appear?
    iPod won't turn on
    B-rock

  • Cannot find the class file for com.sap.portal.services.api.connectorgateway

    Hi,
    I was trying the "How to BI JAVA SDK in a Portal iView and get the following error.
    The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.portal.services.api.connectorgateway.IConnectorGatewayService. Fix the classpath and try rebuilding this project.
    I have the following in my portalapp.xml file
    <property name="SharingReference" value="com.sap.portal.ivs.connectorservice"/>
    and i have also added the jar file "com.sap.portal.ivs.connectorservice_api" in the set of lib's
    Has some faced a similar issue? or can someone suggest how I could possibly resolve this.
    Thanks,
    Smitha

    Hi Smitha:
       My webdynpro dc was build failed for "This compilation unit indirectly references the missing type com.sap.engine.services.webservices.espbase.client.dynamic.content.GenericObject (typically some required class file is referencing a type outside the classpath)".
    How should i do?  Thank you!

  • Cannot find servlet class

    I have a new computer and I have installed the latest version of Tomcat but kept the old free version of the Sun One Studio which I still had a setup file for (as I couldn't find it on this site anywhere for free anymore). The new version of Tomcat puts my webapps in a different area now being s1studio\tomcat401\webapps but there is another area for the server: C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs. I use the first directory and that shows my jsp's etc but it doesn't find my servlets.
    My problem I am having is that my log file is showing this:
    2005-10-24 10:27:48 StandardHost[localhost]: Removing web application at context path /webdav
    2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path /examples
    2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path /tomcat-docs
    2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path
    2005-10-24 10:27:52 StandardHost[localhost]: Removing web application at context path /manager
    2005-10-24 10:28:11 WebappLoader[manager]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\manager
    2005-10-24 10:28:11 StandardManager[manager]: Seeding random number generator class java.security.SecureRandom
    2005-10-24 10:28:11 StandardManager[manager]: Seeding of random number generator has been completed
    2005-10-24 10:28:11 ContextConfig[manager]: Added certificates -> request attribute Valve
    2005-10-24 10:28:11 ContextConfig[manager]: Configured an authenticator for method BASIC
    2005-10-24 10:28:11 StandardWrapper[manager:default]: Loading container servlet default
    2005-10-24 10:28:11 default: init
    2005-10-24 10:28:11 StandardWrapper[manager:invoker]: Loading container servlet invoker
    2005-10-24 10:28:11 invoker: init
    2005-10-24 10:28:11 jsp: init
    2005-10-24 10:28:11 StandardHost[localhost]: Installing web application at context path from URL file:C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\ROOT
    2005-10-24 10:28:11 WebappLoader[]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\_
    2005-10-24 10:28:11 StandardManager[]: Seeding random number generator class java.security.SecureRandom
    2005-10-24 10:28:11 StandardManager[]: Seeding of random number generator has been completed
    2005-10-24 10:28:11 ContextConfig[]: Added certificates -> request attribute Valve
    2005-10-24 10:28:11 StandardWrapper[:default]: Loading container servlet default
    2005-10-24 10:28:11 default: init
    2005-10-24 10:28:11 StandardWrapper[:invoker]: Loading container servlet invoker
    2005-10-24 10:28:11 invoker: init
    2005-10-24 10:28:11 jsp: init
    2005-10-24 10:28:11 StandardHost[localhost]: Installing web application at context path /tomcat-docs from URL file:C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\tomcat-docs
    2005-10-24 10:28:11 WebappLoader[tomcat-docs]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\tomcat-docs
    2005-10-24 10:28:11 StandardManager[tomcat-docs]: Seeding random number generator class java.security.SecureRandom
    2005-10-24 10:28:11 StandardManager[tomcat-docs]: Seeding of random number generator has been completed
    2005-10-24 10:28:12 ContextConfig[tomcat-docs]: Added certificates -> request attribute Valve
    2005-10-24 10:28:12 StandardWrapper[tomcat-docs:default]: Loading container servlet default
    2005-10-24 10:28:12 default: init
    2005-10-24 10:28:12 StandardWrapper[tomcat-docs:invoker]: Loading container servlet invoker
    2005-10-24 10:28:12 invoker: init
    2005-10-24 10:28:12 jsp: init
    2005-10-24 10:28:12 StandardHost[localhost]: Installing web application at context path /webdav from URL file:C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\webdav
    2005-10-24 10:28:12 WebappLoader[webdav]: Deploying class repositories to work directory C:\Program Files\s1studio_jdk\s1studio\tomcat401\work\localhost\webdav
    2005-10-24 10:28:12 StandardManager[webdav]: Seeding random number generator class java.security.SecureRandom
    2005-10-24 10:28:12 StandardManager[webdav]: Seeding of random number generator has been completed
    2005-10-24 10:28:12 ContextConfig[webdav]: Added certificates -> request attribute Valve
    2005-10-24 10:28:12 StandardWrapper[webdav:default]: Loading container servlet default
    2005-10-24 10:28:12 default: init
    2005-10-24 10:28:12 StandardWrapper[webdav:invoker]: Loading container servlet invoker
    2005-10-24 10:28:12 invoker: init
    2005-10-24 10:28:12 jsp: init
    2005-10-24 10:29:55 StandardWrapper[:org.apache.catalina.INVOKER.CourseList]: Marking servlet org.apache.catalina.INVOKER.CourseList as unavailable
    2005-10-24 10:29:55 invoker: Cannot allocate servlet instance for path /servlet/CourseList
    javax.servlet.ServletException: Wrapper cannot find servlet class CourseList or a class it depends on
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:807)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:396)
         at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Thread.java:536)
    ----- Root Cause -----
    java.lang.ClassNotFoundException: CourseList
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1156)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:801)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:396)
         at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Thread.java:536)
    2005-10-24 10:54:35 StandardWrapper[:org.apache.catalina.INVOKER.CourseList]: Marking servlet org.apache.catalina.INVOKER.CourseList as unavailable
    2005-10-24 10:54:35 invoker: Cannot allocate servlet instance for path /servlet/CourseList
    javax.servlet.ServletException: Wrapper cannot find servlet class CourseList or a class it depends on
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:807)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:396)
         at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Thread.java:536)
    ----- Root Cause -----
    and so it goes on.
    My classes are in the directory as:
    C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\ROOT\servervirtualward\WEB-INF\classes\virtualward\java
    and my web.xml is here: C:\Program Files\s1studio_jdk\s1studio\tomcat401\webapps\ROOT\servervirtualward\WEB-INF
    and the code for the CourseList servlet is:
    <servlet>
                   <servlet-name>virtualward.java.CourseList</servlet-name>
                   <servlet-class>virtualward.java.CourseList</servlet-class>
           </servlet>
    <servlet-mapping>
                   <servlet-name>virtualward.java.CourseList</servlet-name>
                   <url-pattern>/servlet/CourseList</url-pattern>
       </servlet-mapping>The example servlets work fine and all .jsp's work within my project.
    Can anyone spot what's wrong?
    Thanks!!!

    I did a basic .jsp page and that worked so at least that's something. Here is my code for the .jsp that won't work. It worked perfectly on my old computer on the configuration with Tomcat4
    <%@page import="virtualward.java.Student"%>
    <jsp:useBean id="student" class="virtualward.java.Student" scope="session"/>
    <%
    String error = null; // set the error message to null for the initial visit
                        //to the page
    if (request.getParameter("SUBMITTED") != null)
        Student s = Student.findStudent(request.getParameter("userid"));
        if (s == null)
            error = "Login ID not found, please try again.";
        else
            //if the input password = the stored password
            if (request.getParameter("userpword").equals(s.getPWord()))
                //if login priviledges are 1 give them student access
                if (s.getPrivilegeLevel()==1)
                    //store the details of that students details in a session from the object.
                    session.setAttribute("student", s);
                    //go to the page to display the details
                    response.sendRedirect("stuProfile.jsp");
                } //if login priviledges are 2 or 3 direct them to a page that
                  //gives them Lecturer priviledges
                else if (s.getPrivilegeLevel()==2 || s.getPrivilegeLevel()==3)
                        //store the details of that students details in a session from the object.
                        session.setAttribute("student", s);
                        //go to the page to display the details
                        //response.sendRedirect("selectProfile.jsp"); //old link
                             response.sendRedirect("maintenance/courseIdenti.jsp");
            else
                error = "Invalid Password";
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Student Profile</title>
    <link href="VWStyle.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    body {
         background-color: #515151;
    -->
    </style>
    </head>
    <body>
    <table width="450" height="125" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="8" colspan="3"><img src="images/tit_studentProf.gif" width="200" height="27"></td>
        <td height="8"> </td>
      </tr>
      <tr>
        <td width="8" height="8" background="images/corner01.gif"><img src="images/spacer.gif" width="8" height="8"></td>
        <td height="8" colspan="2" background="images/top_tbl.gif"><img src="images/spacer.gif" width="8" height="8"></td>
        <td width="8" height="8" background="images/corner02.gif"><img src="images/spacer.gif" width="8" height="8"></td>
      </tr>
      <tr>
        <td background="images/left_tble.gif"> </td>
        <td width="8" align="left" valign="top" class="bodyText"> </td>
        <td align="left" valign="top" class="bodyText"><form method = POST ACTION="profileLogin.jsp">
            <Input type="HIDDEN" name="SUBMITTED" VALUE="T">
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <% if (error != null){%>
                <strong> <FONT COLOR = "#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><%= error %></FONT></strong><br>
                <% } %>
                <td valign="top" class="bodyText">Login ID:</td>
                <td valign="top" class="bodyText">Password:</td>
                <td> </td>
              </tr>
              <tr>
                <td width="155" valign="top" class="bodyText"><input name="userid" type="text" width="25">
                </td>
                <td width="136" valign="top" class="bodyText"><input name="userpword" type="password" size=25>
                </td>
                <td width="126" align="right" valign="top"><div align="left">
                    <input name="Submit" type="image" id="Submit" src="images/but_go.gif" alt="Click to login" width="36" height="26" border="0">
                </div></td>
              </tr>
              <tr>
                <td colspan="3" valign="top" class="bodyText"><strong>Login to view your profile<br>
                  </strong><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif">In the case of forgetting your login details, contact your module co-ordinator.</font></td>
              </tr>
            </table>
        </form></td>
        <td background="images/right_tbl.gif"> </td>
      </tr>
      <tr>
        <td width="8" height="8" background="images/corner03.gif"><img src="images/spacer.gif" width="8" height="8"></td>
        <td height="8" colspan="2" background="images/bot_tbl.gif"><img src="images/spacer.gif" width="8" height="8"></td>
        <td width="8" height="8" background="images/corner04.gif"><img src="images/spacer.gif" width="8" height="8"></td>
      </tr>
    </table>
    </body>
    </html>

  • Servlet cannot invoke package classes

    I have two class which is authenticateController and userAuthentication store in authencation package with path WEB-INF/class/authentication/.
    My jvm is unable compile authenticateController in authentication directory but it is not problem in path WEB-INF/class/.
    authenticateController.java
    package authentication;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import authentication.*;
    public class authenticateController extends HttpServlet {
         //Initialize global variables
         public void init() throws ServletException {
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              doPost(request,response);   
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              //RequestDispatcher dispatcher = request.getRequestDispatcher("userAuthentication");
              //dispatcher.forward(request,response);     
              String usrnme = request.getParameter("usrnme");
              String password = request.getParameter("password");
              userAuthentication obj = new userAuthentication(usrnme, password);
              if(obj.getResult()) {
                   HttpSession session = request.getSession();
                   session.setAttribute("authenticateUser",usrnme);
                   response.sendRedirect("/developmentLine/userId/authentication/queryresult.jsp");
              else {
                   response.sendRedirect("/developmentLine/userId/authentication/login.jsp");
         //Clean up resources
             public void destroy() {
    }Any problem in my code?

    ok, this is compile error msg. I am using notepad and window cmd to compile. I able compile in classes directory (/WEB-INF/classes/) but once i move it into authentication subdirectory (/WEB-INF/class/authentication/), the authenticateController occur error msg as below.
    C:\WebJsp\servletlibrary\WEB-INF\classes\authentication>javac authenticateController.java
    authenticateController.java:28: cannot find symbol
    symbol  : class userAuthentication
    location: class authentication.authenticateController
                    userAuthentication obj = new userAuthentication(usrnme, password
                    ^
    authenticateController.java:28: cannot find symbol
    symbol  : class userAuthentication
    location: class authentication.authenticateController
                    userAuthentication obj = new userAuthentication(usrnme, password
                                                 ^
    2 errors
    C:\WebJsp\servletlibrary\WEB-INF\classes\authentication>This is the userAuthentication.java
    package authentication;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.Hashtable;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    import javax.naming.*;
    public class userAuthentication{
         private int totalResults;
         public userAuthentication(String usrnme, String password) {
              Hashtable env = new Hashtable();          
              String adminName = "MyCompany\\"+usrnme;
              String adminPassword = password;
              String ldapURL = "ldap://LDAPSERVER";
              //Access the keystore, this is where the Root CA public key cert was installed
              //Could also do this via the command line option java -Djavax.net.ssl.trustStore....
              //No need to specifiy the keystore password for read operations
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL,ldapURL);
              try {
                   // Create the initial directory context
                   DirContext ctx = new InitialLdapContext(env,null);
                   //Create the search controls           
                   SearchControls searchCtls = new SearchControls();
                   //Specify the attributes to return
                   String returnedAtts[]={"sn","givenName","mail","sAMAccountName","userPrincipalName","mailNickname","streetAddress"};
                   searchCtls.setReturningAttributes(returnedAtts);
                   //Specify the search scope
                   searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   //specify the LDAP search filter
                   //mailNickname and sAMAccountName is same, but sAMAccountName is Old NT 4.0 logon name and it may confuse to CN attribute.
                   String searchFilter = "(&(objectClass=user)(mailNickname="+usrnme+"))";
                   //Specify the Base for the search
                   String searchBase = "DC=MyCompany,DC=com,DC=my";
                   //initialize counter to total the results
                   totalResults = 0;
                   // Search for objects using the filter
                   NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
                   //Loop through the search results
                   while (answer.hasMoreElements()) {
                            SearchResult sr = (SearchResult)answer.next();
                        totalResults++;
                   ctx.close();
              catch (NamingException e) {
                   System.err.println("Problem searching directory: " + e);
         public boolean getResult() {
              if(totalResults == 0)
                   return false;
              else
                   return true;
    }Edited by: webster on Nov 17, 2008 4:49 PM
    Edited by: webster on Nov 17, 2008 4:51 PM

  • Servlet cannot find helper class

    Hello
    Under WEB-INF/classes I put ServletExample and SingletonExample. Compiling ServletExample, that makes use of SingletonExample, works.
    In the directory WEB-INF/classes I also have another direcotry, test. And in WEB-INF/classes/test I put again ServletExample and SingletonExample.
    Here I have tried in several ways to compile the servlet, but I always get an:
    Cannot find symbol class SingletonExample.
    I tried writing package test at the top of both files, and even at the top of only one of these two.
    I even tried to make WEB-INF/classes/test/ServletExample make use of SingletonExample residing in WEB-INF/classes, but I didnt succeded.
    What happens when you have subdirectory in WEB-INF/classes/? I think this is a MUST, to have subdirectory in large webapplication, so I really dont want to put everything in the classes directory.
    Do you how to resolve this prolem? And: if Im in WEB-INF/classes/test and want to referr from a servlet residing in this direcory to a Singleton/helper class residing in WEB-INF/classes/, which approach do I have to use?
    Thanks
    Paolo

    Jeez, you aren't gonna get very far in Java like this.
    CLASSPATH is wrong - again. You're supposed to give JARs and paths where the class loader is supposed to look, not the actual .class file.
    Also, you're not telling the compiler to put the .class file in the package directory structure.
    Your example is pretty awful. Try this:
    Put this code into c:\common
    package common;
    import common.test.TestDown;  // What the hell is this?  There is no package test, but there is a package named common.test
    public class TestUp
       public void sayHello()
          System.out.println("Hello.....");
    }Put this code into c:\common\test
    package common.test;
    import common.TestUp;
    public class  TestDown
       public TestDown()
            TestUp testUp = new TestUp();
            testUp.sayHello();
       public static void main(String[] args)
            new TestDown();
    }Open a command shell and navigate to c:\, then do the following:
    Directory of c:
    07/01/2005  03:43 PM    <DIR>          .
    07/01/2005  03:43 PM    <DIR>          ..
    07/01/2005  03:45 PM    <DIR>          common
                   0 File(s)              0 bytes
                   3 Dir(s)  74,909,675,520 bytes free
    C:\>javac -d . common\*.java
    C:\>javac -d . common\test\*.java
    C:\>java -classpath . common.test.TestDown
    Hello.....Once you've got your head around this, go learn Ant and have it compile your projects properly.
    %

  • Cannot find JavaBean class?

    Created JSP program that calls a javabean but for some reason it cannot find the javabean class. I moved the NonConfBean.class and NonConfBean.java modules to the directory: C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes. Also, I modified my CLASSPATH to the following: .;C:\j2sdk1.4.0\lib;C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes.
    Here is the JSP:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <%@ page import="accsp.application.*"%>
    <head>
    <title>Add ACCSP Application for Non-Confidential Data</title>
    </head>
    <body>
    <jsp:useBean id="accapp"
    class="accsp.application.NonConfBean"
                                  scope="request" />
    <jsp:setProperty name="accapp" property="*"/>
    <BR>
    <% accapp.updateDatabase(); %>
    <jsp:forward page="NonconfPresentation.jsp" />
    </body>
    </html>
    And here is the error:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\jakarta-tomcat-4.0.3\work\localhost\webdav\myJSPs\addaccspapp$jsp.java:3: Package accsp.application not found in import.
    import accsp.application.*;
    ^
    1 error, 1 warning
    If I take out the import I receive the following error:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred between lines: 7 and 9 in the jsp file: /myJSPs/addaccspapp.jsp
    Generated servlet error:
    C:\jakarta-tomcat-4.0.3\work\localhost\webdav\myJSPs\addaccspapp$jsp.java:60: Class accsp.application.NonConfBean not found.
    accsp.application.NonConfBean accapp = null;
    Why is this happening?

    Yes I have put NonConfBean.class in the following directories just to make sure I am covering all bases:
    1. C:\accsp\application
    2. C:\j2sdk1.4.0\accsp\application
    3. C:\jakarta-tomcat-4.0.3\accsp\application
    4. C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes\accsp\application
    Here is my classpath: .;C:\j2sdk1.4.0\lib\tools.jar;C:\accsp\application;C:\j2sdk1.4.0\accsp\application;C:\jakarta-tomcat-4.0.3\accsp\application;C:\jakarta-tomcat-4.0.3\webapps\examples\WEB-INF\classes\accsp\application
    And here is the JSP that tries to do the import:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@page import="accsp.application.*" %>
    <html>
    <head>
    <title>Add ACCSP Application for Non-Confidential Data</title>
    </head>
    <body>
    <jsp:useBean id="accapp"
    class="accsp.application.NonConfBean"
                                  scope="request" />
    <jsp:setProperty name="accapp" property="*"/>
    </jsp:useBean>
    <BR>
    <% accapp.updateDatabase(); %>
    <jsp:forward page="NonconfPresentation.jsp" />
    </body>
    </html>
    And here is the error message:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\jakarta-tomcat-4.0.3\work\localhost\webdav\myJSPs\addaccspapp$jsp.java:3: Class accsp.application.NonConfBean not found in import.
    import accsp.application.NonConfBean;

  • Cannot find the class to create it although it is there!

              Hi all,
              MyJsp.jsp file cannot find the "yy" class which I want to create in it. this file is located under weblogic\lib\cls.jar and I also tried to locate it under a directory which I define in weblogic.class.path.
              MyJsp.jsp is located under directly public_html.
              C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java:78: Class jsp_servlet.yy not found in type declaration.
              probably occurred due to an error in /MyJsp.jsp line 13:
              <%yy myclass=(yy) request.getAttribute("z");%>
              <%String[] res=myclass.getResult();%>
              Mon Nov 13 02:36:20 PST 2000:<E> <ServletContext-General> Compilation of C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java failed: C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java:78:
              Class jsp_servlet.yy not found in type declaration.
              yy myclass=(yy) request.getAttribute("z"); //[ /MyJsp.jsp; Line: 13]
              ^
              C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java:78:
              Class jsp_servlet.yy not found in type declaration.
              yy myclass=(yy) request.getAttribute("z"); //[ /MyJsp.jsp; Line: 13]
              ^
              2 errors
              Where should I locate that yy.class so that MyJsp.jsp's _myjsp.java does not look for it under its package name , just simply finds and creates it? :)
              Best regards
              jg
              

              Hi, there
              Wherever you put the class, you only set the classpath to the corresponding directory before you run your WL server. In your JSP file, set the import class tag, e.g:
              If your class directory is:
              weblogic\myserver\yy\yy.class
              you should add the directory to your classpath, and put the following tag in your jsp file:
              <%@ page language="java" import="yy" %>
              (Above assume your class has no prefix package name, or you should put full qualified class name)
              Cheers
              Oliver
              "jg" <[email protected]> wrote:
              >
              >Hi all,
              >
              >MyJsp.jsp file cannot find the "yy" class which I want to create in it. this file is located under weblogic\lib\cls.jar and I also tried to locate it under a directory which I define in weblogic.class.path.
              >MyJsp.jsp is located under directly public_html.
              >
              >C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java:78: Class jsp_servlet.yy not found in type declaration.
              >probably occurred due to an error in /MyJsp.jsp line 13:
              ><%yy myclass=(yy) request.getAttribute("z");%>
              ><%String[] res=myclass.getResult();%>
              >
              >Mon Nov 13 02:36:20 PST 2000:<E> <ServletContext-General> Compilation of C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java failed: C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java:78:
              > Class jsp_servlet.yy not found in type declaration.
              > yy myclass=(yy) request.getAttribute("z"); //[ /MyJsp.jsp; Line: 13]
              > ^
              >C:\weblogic\myserver\classfiles\jsp_servlet\_myjsp.java:78:
              >Class jsp_servlet.yy not found in type declaration.
              > yy myclass=(yy) request.getAttribute("z"); //[ /MyJsp.jsp; Line: 13]
              > ^
              >2 errors
              >
              >Where should I locate that yy.class so that MyJsp.jsp's _myjsp.java does not look for it under its package name , just simply finds and creates it? :)
              >
              >Best regards
              >
              >jg
              

  • Cannot find java classes in PDK

    we cannot find the java.classes
    oracle.webdb.portlet.Portlet;
    oracle.webdb.portlet.PortletInfo;
    oracle.webdb.portlet.PortletUtils;
    we need them for developing portlets.
    Thomas
    null

    The definitive article: [Mastering the Java Classpath|http://www.kevinboone.com/classpath.html].
    ... and actually do the exercise therein.
    See you an hour or so if you're still stuck (which you won't be).
    Cheers. Keith.

  • Cannot find the class!! - URGENT!!!

    I have an JSP archive and I�m using the Tomcat 4. I did a class named ConnectionBean that connect with a database.
    when i start my JSP, the Apache server show me an error page that say it�s impossible to find the class "ConnectionBean". I tryed to put it in the same directory of the JSP file, but happened the same error.
    I tryed to put it in the directory "apache tomcat 4\lib\" but i have the same error.
    I tryed to put it on the directory "jre\lib\ext\ of my JVM, but i have the same error!
    Please, somebody can help me to do my JSP find this class?
    Thanks for all

    after you compile your class you should put the .class in the WEB-INF/classes/ directory
    lets suppose that you wrote in the top of your class
    package com.mydbconnection
    this means that your class should be in
    WEB-INF/classes/com/mydbconnection/MyClass.class
    in your JSP have been like this
    <jsp:useBean id="DBConn" scope="page" class="com.mydbconnection.MyClass" />
    hope this help enough :)

  • [SOLVED] Cannot find package "flashplugin" or "archey".

    [EDIT - yaourt and archey now installed, thanks]
    I am running Arch 2.6.34 with GNOME desktop. When I type the command sudo pacman -S flashplugin or sudo pacman -S archey it tells me that it cannot find the package.
    I had this problem previously when I was trying arch in a VM, and I couldn't figure out what I had missed. I have everything else properly installed and working fine, it's just these two packages I've come across that I cannot locate. I'm guessing there's probably more packages that I just haven't run into yet that wouldn't work either.
    Last edited by Socialsymbol (2010-06-29 23:00:00)

    Shazzam6999 wrote:
    That's because archey is in the AUR. You can use yaourt to install packages from the aur similar to how you're trying, read the wikis and check it out.
    http://wiki.archlinux.org/index.php/Arc … Repository
    http://wiki.archlinux.org/index.php/Yaourt
    Ok, thanks, I had forgotten about that.
    When do they suspect they'll fix the flashplugin bug/vulnerability? And what is recommended to do until then as far as flash playback goes?
    Last edited by Socialsymbol (2010-06-29 22:51:14)

Maybe you are looking for

  • RFx Response Submission Outside Firewall in SRM 7 Enhancement pack 1.

    Dear Experts, As you know, the bid response part has been moved to SUS in srm 7 enhancement pack 1 to enable the suppliers to respond to bid invitation from SUS system itself. Does it mean that the  suppliers cannot respond to bid invitation in SRM s

  • Odd trackpad gesture issues

    It always starts when I tap with two fingers to zoom in to read articles. It wouldn't zoom, and everything stops working. Scrolling doesn't work. Going back to previous page doesn't work. Clicking on back button on the top left corner doesn't work ei

  • Iphoto crash's

    Everytime i try and edit my photos my iphoto crash's and slows down my computer, being a photographer this is a important feature on my mac and i really can understand why it is doing it as i was editing photos the other day and it was working fine b

  • Can't get updates to Photoshop CS5 after installing. When I download the updates, i get this.

    There was an error downloading this update. Please quit and try again later.  I have been trying for 2 days and keep getting the same thing. Is there a problem with the download server or what?

  • Date calculation returns a decimal. Is this right?

    Hi Folks, Forgive me, for I am a newbie. I'm trying to do a simple date calculation select SYSDATE - TO_DATE('10/DEC/1986', 'DD/MON/YYYY') from dual and the result is "8147.62126" Isn't the result meant to be a date? Since I am substracting a date fr