DriverManager cannot be resolved

plz help me with this one
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 83 in the jsp file: /form.jsp
DriverManager cannot be resolved
80: </head>
81:
82: <body>
83: <% DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
84: Connection conn=DriverManager.getConnection ("jdbc:oracle:thin:@127.0.0.1:1522:XE","system","786313");

ok at the moment i don't think there is problem with sql,my jsp is not getting connected to oracle.
i did this now
<body>
<% DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn=DriverManager.getConnection ("jdbc:oracle:thin:@127.0.0.1:1522:XE","system","786313");
String first_name = request.getParameter("firstName");
String last_name = request.getParameter("lastName");
String address = request.getParameter("address");
String country = request.getParameter("country");
String email = request.getParameter("email");
Statement stmt=conn.createStatement();
//String queryinsert =
//stmt.executeQuery("INSERT INTO customer (cust_id,cust_first_name,cust_last_name,cust_address, cust_country,cust_email)VALUES(custId,firstname,lastname ,address ,country ,email)");
//String update =
//stmt.executeQuery("UPDATE customer SET (cust_first_name  = first_name ,cust_last_name = last_name  ,cust_address =address ,cust_country = country,cust_email = email )WHERE (cust_first_name = first_name AND cust_last_name = last_name)") ;
stmt.close();
conn.close(); %>i m getting this error
org.apache.jasper.JasperException: Unable to compile class for JSP:
Stacktrace:
     org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
     org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Similar Messages

  • Re: OracleDriver cannot be resolved to a type

    I still have the same problem which was reported in the first post.
    I tried all the changes mentioned above but doesn't help as I am totally new to jsp please suggest me a way out in detail.
    An error occurred at line: 6 in the jsp file: /one.jsp
    oracle.jdbc.driver.OracleDriver cannot be resolved to a type
      <%
      try{  
      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.145.2.142:1521:MESNEW","MESAPUSER", "mesdev");
      String query1="Select OWNER,TABLE_NAME FROM ALL_TAB_PRIVS_MADE ";
    Stacktrace:
      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
      org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    Thanking you in advance.

    1) you don't want to do that in a JSP
    2) did you actually add the correct jars to the classpath of your web application? Because if you did, you'd not get this error.
    That means adding it to the proper location in your WAR file, as you should have learned when you studied tutorials and books about web application development.

  • SQLServerDriver cannot be resolved to a type

    How do i solve this. I have imported java.sql.* and javax.sql.* using page directive. Still it is not able to resolve the driver. The same code works in a normal java file but not in jsp page
    An error occurred at line: 12 in the jsp file: /jsp/AMSX_Page.jsp
    com.microsoft.jdbc.sqlserver.SQLServerDriver cannot be resolved to a type
    9: <H1>Asset Management System (AMSX) </H1>
    10:
    11: <%              
    12:      DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
    14:          Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://10.187.33.159:49408","username","password");
    15:      if (connection != null)Message was edited by:
    BrijeshShah

    Yes i did put the driver files in the WEB-INF directory but still i have the same error.
    Do you have any other suggestion?
    Brijesh Shah

  • OracleDriver cannot be resolved to a type

    Hi all..
    Iam new to this forum...Actually i have a problem.please help me..
    Now iam working with tomcat6.0.16 and oracle10g.
    <%@page import="java.sql.*" %>
    <%
    //Register the drivers
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //Establish connection with the database
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","manager");
    //create a sql statement
    Statement st=con.createStatement();
    //execute the statement
    ResultSet rs=st.executeQuery("select * from emptab");
    //all rows of emptab are in rs.Now retrive column data
    //from rs and display
    while(rs.next())
    out.println(rs.getInt(1));
    out.println(rs.getString(2));
    out.println(rs.getFloat(3));
    out.println("................");
    //close the connection
    con.close();
    %>
    this is my program...then iam getting following error.please any one can help me?
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 4 in the jsp file: /oradata.jsp
    oracle.jdbc.driver.OracleDriver cannot be resolved to a type
    1: <%@page import="java.sql.*" %>
    2: <%
    3: //Register the drivers
    4: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    5: //Establish connection with the database
    6: Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","manager");
    7: //create a sql statement
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
    Apache Tomcat/6.0.16

    You need to have Oracles JDBC driver available to your web application.
    That means the driver (commonly called ojdbc14.jar) should be in either the WEB-INF/lib directory of your web application, or in the [TOMCAT]/lib directory.
    However it is generally accepted that Database connections from JSP pages are a bad idea.
    Put this logic in java code/beans.
    Even better, set up a [JNDI Datasource in Tomcat|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html] that your web application can access. That way your code can be database independant.
    Cheers,
    evnafets

  • Palm Pre crazy symptoms: "phone offline", will not charge battery, will not start, error message "an error has occured that cannot be resolved"

    This is a long description of a series of problems with my new Palm Pre. You may wish to search the text to find your specific issue(s). There is no solution in my post. Look for possible answers in the responses to come.
    I bought my Palm Pre 4 days ago and it arrived 2 days ago. Phone worked great. Last night I plugged in the phone and updated the OS. After completion, I selected "Done" and went to bed.
    - First Series of Issues: "Phone Offline", will not charge battery -
    In upper lefthand corner of the phone there is the message "phone offline". Although the phone has been charging all night it reads "26% battery". I called the general Sprint tech support number and we tried the following things:
    1) Restart phone (press and hold power button, then select "turn off". after power down, press and hold power button to power on.)
    2) Reset the phone (several different ways - call tech support so that you do this correctly)
    The individual at Sprint then sent me to another tech support person, presumably 2nd tier.
    - Second Series of Issues: Error message "an error has occured that cannot be resolved" -
    Sprint tech support person #2 also had me restart and reset the phone in a number of ways. In her words "we've tried every palm pre trick I know" and each time the phone was unresponsive. Often we received the error message "phone is offline". We did a full erase and after that the phone would no longer restart. At this point the error message came up saying "an error has occured that cannot be resolved" which referred me to www.palm.com for assistance. I think it's important to note here that this was not the typical error message (black screen with white letters) but rather the blue sky background with a semitransparent box over it with white text.
    Sprint tech support person #2 then connected me with Palm support and the dance continued. Again we tried a whole bunch of resetting and restarting and erasing options. Palm support instructed me to go to: www.palm.com/rom to download WebOS Doctor, which I did. I downloaded the file. While that was happening he had me hold the "volume up" button and plug the phone into the charger. This caused a USB symbol to appear on the phone. When the file was complete I received an error message that the file couldn't run. Palm tech support person seemed surprised. I mentioned that I was on a Mac and he said he couldn't help me. He then transferred me to another Palm support person who works with Mac users.
    Palms tech support person #2 then informed me that I should have selected the "mac" download option on www.palm.com/rom. I verbally walked her through the whole series of webpages, telling her that it says that you need Windows (version whatever) or Mac (version whatever) but that at no time was there an option to download a different WebOS Doctor for different operating systems. After some more discussion she told me she would have to have someone call me back tomorrow.
    - Third Series of Issues: phone stuck on USB symbol -
    So at the moment the phone is completely useless. Not fantastic. I booted up the mac in Windows 7 and downloaded WebOS Doc and received the same error. I also ran Windows Vista virtually and received the same error. Later this afternoon I'm heading into work to try the same thing on Windows XP.
    In the meantime, I got onto this forum and located a thread that provided a direct link to the necessary file:
    palm.cdnetworks.net/staging/rom/webosdoctorp100ewwsprint.jar
     After downloading that file, which I realized could totally be a virus, I was able to get WebOS Doc working on my computer. It required that I recharge the phone completely before beginning and now it's on the screen that says "Don't disconnect your phone" and the file is at 3% complete. Only... it's been at 3% complete for almost 30 minutes.
    I am hoping that Palm will follow up with me tomorrow, but I'm leaving at 7am on a business trip and would love to have the thing working. Any suggestions are welcome, even if you can just tell me how to get the think disconnected safely before my flight tomorrow. I don't fancy getting through security with my phone wired to my laptop.
    Thanks.
    Post relates to: Pre p100eww (Sprint)
    This question was solved.
    View Solution.

    Hello and welcome to the forums;
    Our phone support is open every day Monday through Sunday, although there are different hours of operation for the weekend. If after a webOS Doctor reset you are still experiencing the same problems, I would likely recommend replacement, either in a local store for your carrier or through our technical support department.
    There may be additional technical support offered or suggested over the phone, this would need to be done first before a replacement could be issued.
    Hope this helps,
    TreoAide

  • Cannot start Outlook 2013: "name cannot be resolved" / "connection to Microsoft Exchange is unavailable" / "___.ost is not an Outlook data file (.ost)"

    My work e-mail has a double-login system, where my credentials for work access are one username and my e-mail is an alias of that first username, so they differ from one another. I suspect that's why I've been having the hardest time with Outlook 2013. I
    was able to add my account just fine once but changed my mind about using Outlook and removed the account. Now I can't get back into Outlook for the life of me. The error messages that show up are:
    1. It asks me to verify server and Mailbox. I've tried it with both usernames (the official work username and the e-mail alias) as my Mailbox info, followed by the email domain (even tried it without the domain) and it still won't verify when I click "Check
    Name".
    2. This message comes up: The name cannot be resolved. The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.
    3. Then once I click "OK" another pop-up says: Cannot start Microsoft Outlook. The file C:\Users\FirstLastname\AppData\Local\Microsoft\Outlook\FirstLastname.ost is not an Outlook data file (.ost).
    Help?

    Hi,
    As per this KB article, the issue might occurs when some required registry key does not exist on your computer. 
    Please try the steps mentioned in it and see if it is helpful to you:
    http://support.microsoft.com/kb/2264398/en-us
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Join  configuration cannot be resolved. Reason :more than 1 of the detail .

    Hi Guys,
    I am getting a following error while opening a discoverer report.
    Join  configuration cannot be resolved. Reason :more than 1 of the detail folders uses non-aggregated items .I know this error is regarding the fan trap.
    The report is built from 5 folders(Complex & Simple) and a custom folder.I have 3 more reports which are using some of the simple folders from these 5 folders and are joined with other folders with the appropriate joins.
    Is this the reason I am getting the error ?
    Appreciate your help !!
    Veejay

    Hi Veejay,
    is it that the columns which I am using should be at same levelNo, not really. A item that has a data point property means that Discoverer knows that the item can be aggregated in a report. So if you include detail (i.e. non-aggregated) data points into a workbook from 2 detail folders then Discoverer will generate a fan-trap error because the workbook is not aggregated correctly.
    Let me try and give you an example. Suppose we have 3 folders; A, B and C. Folders B and C are detail folders of A. Now support A has one row; folder B has 2 detail rows to A and folder C has 3 detail rows to A. Now if you create workbook selecting items from A and aggregate (e.g. SUM) items from B and C you will get 1 row containing the SUM from B and the SUM from C. Similarily, if you select the detail data point from B and the SUM from C you will get 2 rows containing rows from B and the SUM from C. However, if you select detail data points from both B and C you will get 6 rows in the report and Discoverer will generate a fan trap error because the number of rows do not relate to any one table. But, if you change the join from A to B to be a 1 to 1 join then you will still get 6 rows in the report, but Discoverer will not raise a fan trap error because Discoverer thinks the number of rows returned is in from table C because you have said that there is only 1 row in B for every row in A.
    Rod West

  • Cannot be resolved to a type

    Hello everybody,
    An error occurred while executing these codes
    <%@page import="examples.simple.ActiveClass" %>
    try
    String userId=request.getParameter("userID");
    String activateCode=request.getParameter("activationCode");
    ActiveClass object=new ActiveClass();
    String status=object.Activate(userId);
    if(status.equals("success"))
    ok
    catch(Exception e)
    The error displayed was:
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 25 in the jsp file: /simple/activeAccount.jsp
    ActiveClass cannot be resolved to a type
    22: String userId=request.getParameter("userID");
    23: String activateCode=request.getParameter("activationCode");
    24:
    25: ActiveClass object=new ActiveClass();
    26: String status=object.Activate(userId);
    27:
    28: if(status.equals("success"))
    Can anyone help me out please?

    * ActiveClass.java
    * Created on August 31, 2007, 3:04 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package examples.simple;
    import javax.sql.DataSource;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import examples.sql.connect;
    * @author Administrator
    public class ActiveClass {
    int userId;
    Connection con=null;
    /** Creates a new instance of ActiveClass */
    public ActiveClass() {
    public String Activate(String userId)
    this.userId=Integer.parseInt(userId);
    try
    connect conn=new connect();
    con=conn.createConnection();
    Statement stmt=con.createStatement();
    String sql="UPDATE registered_user SET user_privileges='Y' WHERE user_id = "+this.userId;
    if(stmt.executeUpdate(sql)==1)
    return "success";
    else
    return "failure";
    catch (SQLException ex)
    ex.printStackTrace();
    return "failure";
    }

  • JspWriter cannot be resolved to a type

    The following is CheckAddress.jsp page which checks if the form has the name and phone fields filled in or not. If not then it must print the errors. But the problem I am having is that the Eclipse is showing me the error "JspWriter cannot be resolved to a type".
    If I ignore this error and run the page in the j2ee preview server in eclipse than I get the following error:
    >
    Unable to compile class for JSP
    An error occurred at line: 22 in the jsp file: /CheckAddress.jsp
    Generated servlet error:
    The method prinln(String) is undefined for the type JspWriter
    An error occurred at line: 22 in the jsp file: /CheckAddress.jsp
    Generated servlet error:
    The method prinln(String) is undefined for the type JspWriter
    An error occurred at line: 22 in the jsp file: /CheckAddress.jsp
    Generated servlet error:
    The method prinln(String) is undefined for the type JspWriter
    Caused by:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    >
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <%--Provide Directives to inform JSP of packages needed--%>
    <%@page language="java" import="java.util.*"%>
    <%@page language="java" import="java.io.*"%>
    <%--Specify JSTL tag library for use --%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <meta http-equiv="Content-Type" content="text/html; charaset=ISO-8859-1">
    <title>Check Address</title>
    </head>
    <body>
    <%--Declare the java bean for the addresslist to be queried --%>
         <jsp:useBean id="dbab" class="addressBean.DBAddressBean" />
    <%--Use JSP scripting elements to define two methods --%>
    <%!
         List<String> checkAddress(String Name, String Phone){
          List<String> errors = new ArrayList<String>();
          if((Name == null) || (Name.equals(""))){
               errors.add("Name must not be blank");
          if((Phone == null)||(Phone.equals(""))){
               errors.add("Phone must not be blank");
          return errors;
         void printErrors(JspWriter out, List<String> errors) throws IOException{
              //Report the errors
              out.prinln("<p class=\"error1\">The following errors occured: <br />");
              out.prinln("<ul>");
              Iterator<String> i = errors.iterator();
              while(i.hasNext()){
                   out.println("<li type=\"disc\">"+i.next()+"</li>");
              out.prinln("</ul></p><p><b>please try again</b></p><br />");
    %>     
    <%--Use the internal Scriptlet to call an internal method and get the request parameters with the form info--%>
    <%
         List<String> errors = checkAddress(request.getParameter("Name"), request.getParameter("Phone"));
    %>
    <%--Use JSTL tags to get the values of the parameters for all of the form info --%>
         <c:set var="aid" value="${param.aid}"/>
         <c:set var="Name" value="${param.Name}"/>
         <c:set var="Street" value="${param.Street}"/>
         <c:set var="City" value="${param.City}"/>
         <c:set var="State" value="${param.State}"/>
         <c:set var="Zip" value="${param.Zip}"/>
         <c:set var="Phone" value="${param.Phone}"/>
    <%--Use JSP elements to set the values in the Java Beans--%>
         <jsp:setProperty name="dbab" property="id" value="${aid}"/>
         <jsp:setProperty name="dbab" property="name" value="${Name}"/>
         <jsp:setProperty name="dbab" property="street" value="${Street}"/>
         <jsp:setProperty name="dbab" property="city" value="${City}"/>
         <jsp:setProperty name="dbab" property="state" value="${State}"/>
         <jsp:setProperty name="dbab" property="zip" value="${Zip}"/>
         <jsp:setProperty name="dbab" property="phone" value="${Phone}"/>
    <%--Use the scriptlet to determine where to go now --%>
    <%--Notice how the JSP element tag is used within the scriptlet, the scriptlet needs to be "closed" and "reopened"--%>
    <%
         if(errors.size()==0){
              dbab.saveChanges();
              response.sendRedirect("AddressList.jsp");
         }else{
              //print errors
              printErrors(out, errors);
    %>          
         <jsp:include page="EditAddress.jsp"/>
    <%
    %>     
    </body>
    Edited by: blinkaj on Apr 18, 2010 2:15 AM

    Thanks elOpalo, even though eclipse is still showing the error, things are running fine after I rectified my typing mistake about the prinln. :)

  • Table error - Context Path Cannot Be Resolved (Last Node Is Empty)

    Hi All,
    I am dynamically building up a context node called PoList which is used to hold the contents of a table.
    My BAPI is called and a routine transfers the contents of the BAPI context node across into the POList context node. This is rendered correctly on the screen. There is a routine which filters the results based on a vendor. The code works fine when some records are found but when no records are found, I get the error "Context Path POLIST.EBELN Cannot Be Resolved (Last Node Is Empty) ".
    The cardinality of the PoList node is 0..N. This should mean that 0 records is valid.
    The ABAP which fills the context is pasted below :
    data:
        Node_Z_Bapi_Po_Combined             type ref to If_Wd_Context_Node,
        Node_Changing_Po                    type ref to If_Wd_Context_Node,
        Node_T_Header                       type ref to If_Wd_Context_Node,
        Elem_T_Header                       type ref to If_Wd_Context_Element,
        itab_C_T_Header    type If_Componentcontroller=>Elements_Polist,
       stru_C_T_Header    like line of itab_C_T_Header,
        Stru_T_Header                       type If_Componentcontroller=>Element_T_Header .
      data:
        Node_Polist                         type ref to If_Wd_Context_Node,
        Elem_Polist                         type ref to If_Wd_Context_Element,
        Stru_Polist                         type If_Componentcontroller=>Element_Polist.
      data:
    lri_Element    type ref to if_Wd_Context_Element,
    loa_Elements   type Wdr_Context_Element_Set.
    navigate from <CONTEXT> to <Z_BAPI_PO_COMBINED> via lead selection
      Node_Z_Bapi_Po_Combined = wd_Context->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Z_Bapi_Po_Combined ).
    navigate from <Z_BAPI_PO_COMBINED> to <CHANGING_PO> via lead selection
      Node_Changing_Po = Node_Z_Bapi_Po_Combined->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Changing_Po ).
    navigate from <CHANGING_PO> to <T_HEADER> via lead selection
      Node_T_Header = Node_Changing_Po->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_T_Header ).
    navigate from <CONTEXT> to <POLIST> via lead selection
      Node_Polist = wd_Context->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Polist ).
      loa_Elements = node_T_Header->get_Elements( ).
      loop at loa_Elements[] into lri_Element.
        lri_Element->get_Static_Attributes(
          importing Static_Attributes = stru_C_T_Header ).
    Get the vendor number
        if i_lifnr is initial.
          insert  stru_C_T_Header into table itab_C_T_Header[].
        elseif i_lifnr = stru_c_t_header-lifnr.
          insert stru_C_T_Header into table itab_C_T_Header[].
        endif.
      endloop.
      data : W_LINES TYPE I.
      describe table itab_c_t_header lines w_lines.
      if w_lines eq 0.
        node_Polist->set_lead_selection_index( 0 ).
        CALL METHOD NODE_POLIST->INVALIDATE.
      else.
        node_Polist->bind_Table( itab_C_T_Header ).
        clear itab_C_T_Header[].
      endif.
    I would have though that invalidating the node would blank the context node and mean that the table is empty but instead I get an error.
    Please help.
    Richard

    Hi Richard,
    The problem here is that some UI element tries to bind against a node where the parent node is empty. You have to make sure that the last but one node has at least 1 element, otherwise you should hide the UI element (visibility = NONE).
    If the lead selection were empty, the corresponding error message would tell you this, but it explicitely says: "Last Node is Empty", and you can trust it.
    One possibility to have at least one element in the node is to change the cardinality to 1..n. If you have a supply function for this node, you have to make sure that there is at least 1 element (bind empty structure to the node), otherwise the framework creates the first element for you.
    Ciao, Regina

  • Class name cannot be resolved to a type

    Dear All,
    I have one main class calling another class but I keep getting this error "
    SMSClient cannot be resolved to a type". Before this I tried on other pc it was ok. Below is part of the codes. What could have been wrong? Can it be a missing library but how to trace that?
    public class callSMSClient{   public static void main(String[] args)  {       
              SMSClient t1 = new SMSClient(0);       
              t1.sendMessage("+6065544223","testing one two");  }}public class callSMSClient
              public static void main(String[] args)
           SMSClient t1 = new SMSClient(0);
           t1.sendMessage("+6065544223","testing one two");
    public class SMSClient implements Runnable{  
    public final static int SYNCHRONOUS=0; 
    public final static int ASYNCHRONOUS=1; 
    private Thread myThread=null;  
    private int mode=-1; 
    private String recipient=null; 
    private String message=null;  
    public int status=-1; 
    public long messageNo=-1;   
    public SMSClient(int mode) {     
    this.mode=mode;   
    public int sendMessage (String recipient, String message)
          this.recipient=recipient;   
          this.message=message;  
          myThread = new Thread(this);   
          myThread.start();
          //    run();   
          return status;   
    public void run()
    Sender aSender = new Sender(recipient,message);    
    try{     
    //send message         
    aSender.send ();         
    // System.out.println("sending ... ");      
    //in SYNCHRONOUS mode wait for return : 0 for OK, -2 for timeout, -1 for other errors     
    if (mode==SYNCHRONOUS)
    while (aSender.status == -1)
    {            myThread.sleep (1000);         
    if (aSender.status == 0)
    messageNo=aSender.messageNo ;   
    catch (Exception e)
    {         e.printStackTrace();    
    this.status=aSender.status ;    
    aSender=null;   
    }public class SMSClient implements Runnable{
      public final static int SYNCHRONOUS=0;
      public final static int ASYNCHRONOUS=1;
      private Thread myThread=null;
      private int mode=-1;
      private String recipient=null;
      private String message=null;
      public int status=-1;
      public long messageNo=-1;
      public SMSClient(int mode) {
          this.mode=mode;
      public int sendMessage (String recipient, String message){
        this.recipient=recipient;
        this.message=message;
        //System.out.println("recipient: " + recipient + " message: " + message);
        myThread = new Thread(this);
        myThread.start();
    //    run();
        return status;
        public void run(){
        Sender aSender = new Sender(recipient,message);
        try{
          //send message
              aSender.send ();
             // System.out.println("sending ... ");
          //in SYNCHRONOUS mode wait for return : 0 for OK, -2 for timeout, -1 for other errors
          if (mode==SYNCHRONOUS) {
              while (aSender.status == -1){
                myThread.sleep (1000);
          if (aSender.status == 0)
             messageNo=aSender.messageNo ;
        }catch (Exception e){
            e.printStackTrace();
        this.status=aSender.status ;
        aSender=null;
    }

    Dear Ejp,
    I would like to first share a simple case here first. Below is the simplied codes. Here I dont need any import statement. I keep both this in the same directory. I am using this command to compile javac callSMSClient.java. Why even this simple case is not working?
    public class callSMSClient{
      public static void main(String[] args)
           SMSClient t1 = new SMSClient(1);
           t1.sendMessage("+6014466044","testing one two");
    public class SMSClient {
      private int mode=-1;
      private String recipient=null;
      private String message=null;
      public SMSClient(int mode) {
          this.mode=mode;
      public void sendMessage (String recipient, String message){
        this.recipient=recipient;
        this.message=message;
        System.out.println("recipient: " + recipient + " message: " + message);
    }

  • Include JSP in JSP - Error:  cannot be resolved to a type

    Hello,
    Several of my jsp pages include other jsp pages. The project has many errors: "x cannot be resolved to a type". Is there a way to resolve these errors? Below is a small example of the issue:
    JSP #1:
    <%@ page import="com.testing.Introduction" %>
    <html>
    <head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Hello</title>
    </head>
    <body>
    <%
         Introduction intro = new Introduction();
         String speak = intro.sayHello();
    %>
    <p><%=speak %></p>
    <%@ include file="Name.jsp" %>
    </body>
    </html>  JSP #2:
    <html>
    <head>
    <title>Name</title>
    </head>
    <body>
    <%
         String speak2 = intro.sayName();
    %>
    <p>
    <%=speak2 %>
    </p>
    </body>
    </html>Class:
    package com.testing;
    public class Introduction
         public static void main(String[] args) {
         public Introduction() {
              super();
         public String sayHello() {
              return "Hello";          
         public String sayName()     {
              return "My name is Sam";
    }The error shows up in Name.jsp; the issue is with "intro". Any ideas how to resolve this issue?
    Thank you in advance for your help!

    The jsp page Name.jsp appears to be missing the import statement that appears in the first page.
    <%@ page import="com.testing.Introduction" %>The included file is included character for character into the main page which is then treated as a single jsp page for the response. The include directive is invoked at the time of page translation. Given this, I don't see the purpose of using the <html> <head> and <title> tags in the second and included page. I don't think that this suggests the proper purpose of the include directive.
    Note too that if the included file changes, all of the jsp files that call this file need to be updated as well. Servers can handle the alteration of the main jsp, but may not serve the altered content if the included file changes.
    For more information see here. http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro8.html

  • Eclipse and Apache I18N Taglib - how to fix "bundle cannot be resolved" msg

    I edit my jsp pages in Eclipse 3.1.2
    And I use Apache I18N Taglib.
    Everythink works fine, but I get annoying messages in problem list that "bundle cannot be resolved"
    a piece jsp code
    <%@ taglib uri="http://jakarta.apache.org/taglibs/i18n-1.0" prefix="i18n"%>
    <i18n:bundle baseName="my.test" id="bundle"/>
    <%     
    if (isFoo) {
         buttonValue = bundle.getString("AddButtonText");
    } else {
         buttonValue = bundle.getString("UpdateButtonText");
    %>This code works fine, but Eclipse think that code has errors.
    also I want do demonstate taglib config in web.xml
         <jsp-config>
              <taglib>
                   <taglib-uri>http://jakarta.apache.org/taglibs/i18n-1.0</taglib-uri>
                   <taglib-location>/WEB-INF/i18n.tld</taglib-location>
              </taglib>
         </jsp-config>

    Well, putting all that Java code into a JSP was a bad idea in the first place, just on general design principles. But you've done it in such a way that the result of compiling the JSP is malformed Java code. Frankly I would just throw it away and put the Java code into a servlet or some other Java class, where it belongs.
    But if you're really working in a place where nobody has learned anything since 2003, and you're forced to support that old junk, then I would point out that the error occurs before the place which generates this line:
    import java.util.*;You only need to look at two of the thousand lines of code you posted.

  • I am getting this error - JspFormsSession cannot be resolved to a type

    Hi
    I am getting following error when I try to open a jsp file.
    Any solution?
    JSP line details are -
    JspFormsSession openrules_session = (JspFormsSession) session.getAttribute(s_attr);
    Error is -
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 4 in the jsp file: /index.jsp
    Generated servlet error:
    JspFormsSession cannot be resolved to a type
    An error occurred at line: 4 in the jsp file: /index.jsp
    Generated servlet error:
    JspFormsSession cannot be resolved to a type
    An error occurred at line: 4 in the jsp file: /index.jsp
    Generated servlet error:
    JspFormsSession cannot be resolved to a type
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    Now I am confident that the problem is with library including, as the same thing happens with other libraries.
    I found that such a warning appears every time:
    Classpath entry /jspbook/src/lib/mail.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.Unfortunately, I've no idea how to include this in a proper way. I think that setting it in "Add External JARs" in "Java Build Path" is enough... or not?
    Seems we're close to solve the problem. May be this screen shot will be helpful to determine the problem?
    http://img257.imageshack.us/img257/3967/screenshotjavaeejspbook.png
    You can see that libraries are included in the Project Explorer

  • The host name cannot be resolve ? ( with linksys router )

    Hi all, I have some problem with setting up a network. I tried to set my network according to http://wiki.archlinux.org/index.php/Configuring_network   the network/internet is fine except the host name with "http://" cannot be resolve. For example
    ping 216.239.61.104
    ping www.gogle.com
    both work fine, until I try,
    ping http://www.google.com
    it give me error, tell me that the hostname cannot be resolved. I tried to config my network using both dhcp or fix-ip, but the problem still present in both way. Internet works fine in windows/ubuntu.
    Anyboy has any clue ?  The router I use is wrt54gl with tomato firmware.
    thanks in advance.

    kowalski wrote:
    Hi,
    if pinging www.google.com works then dns resolving _does_ work. Why would you want to ping http://something?
    You should try opening http://whatever in a browser not pinging it from command line.
    Or am I missing something obvious?
    Yes, for instance, all mirror list for pacman is in "http://...." or "ftp://...." form. I could easily change the repository list, but I'm not sure if it'll have same problem in future with other program.  Also, if it work in ubuntu and windows, why not arch.

Maybe you are looking for