Help with compilation error

Hello
I have a problem with my jsp developement. When i create a jsp (with no beans) i test it and it runs fine (not good but fine), then when I test it with multiple users at time, it generate a jsp compilation error ie. "missing term }" and I can not figure out why it is getting that error, it has been compilated before! so it should not generate a compilation error, becouse i'm not editing the jsp source. I think that every time the jsp is requested the virtual machine is re-compiling it, but is only what i thing and i don't know why... can any body help me? please.
I apologize for my bad english
Thank you for your time reading this.

Sorry becouse i can't be more espesific with the error that i get, that error is complete apears in a complete randomic way, I mean taht it apears when nerver is expected or doesn't apear when is expected, only thing that i got of that error is that the compiler some time says that are mising semi-colon (;), some time says that are mising quotation marks (") or are mising }, the error is no the same allways no mater the situation, I can run the jsp in my pc but the error doesn't apear, thats very strange becouse the compilation error apear after the jsp was executed with no errors.
this is my jsp:
<%@ page import="java.util.Calendar,java.text.SimpleDateFormat,java.util.Date,java.util.Stack,java.util.Enumeration, java.util.Hashtable,java.sql.*, java.util.Vector" %>
<%@ include file="../incs/dbpool_inc.jsp" %>
<%@ include file="funciones.jsp"%><html>
<head>
<title>Resolver preguntas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../css/0001.css" rel="stylesheet" type="text/css">
</head>
<body>
<% //to get user data from the session.
     String userid = session.getAttribute("idu") != null ? (String)session.getAttribute("idu") : "";
     String asign = session.getAttribute("idHomeAssignatura") != null ? (String)session.getAttribute("idHomeAssignatura"): "";
     String idcuest = session.getAttribute("idcuest") != null ? (String)session.getAttribute("idcuest") : "";
     String secuenc = session.getAttribute("secuenc") != null ? (String)session.getAttribute("secuenc") : "";     
     String secuens = request.getParameter("secuens") != null ? request.getParameter("secuens") : "0";
     //to know if it's aloww to save cahnges in the database
     boolean guardar = request.getParameter("guardar") != null ? (request.getParameter("guardar")).equals("si")? true: false :false;
     if(userid.equals("")|| asign.equals("")){//if 1          
          out.println("</head><body><font face=\"Arial\" size=\"2\" color=\"#000000\"><b>El tiempo de conexi&oacute;n ha expirado. Para ingresar de nuevo al sistema haga click aqu&iacute;.</b></font></body></html>");
     }//fin if 1
     else{//else de if 1          
          try{// try 1
               Connection conn = dbpool.getConnection();
               Statement stmtt = conn.createStatement();
               Statement stmtmod = conn.createStatement();
               Statement stmtresp = conn.createStatement();
               ResultSet rsmodul = stmtmod.executeQuery("select id_modulo from eit_cuestxmat where id_cuestionario="+idcuest);
               String modulo = rsmodul.next()? rsmodul.getString("id_modulo"): "";
               rsmodul.close();
               stmtmod.close();
               int secuencia1 = Integer.parseInt(secuens);
               int secuencia2 = Integer.parseInt(secuenc)+1;
               secuenc = (secuencia1 == secuencia2)? String.valueOf((Integer.parseInt(secuenc)+1)): secuenc;
               session.setAttribute("secuenc", secuenc);               
               if(esAlumno(userid, stmtt, asign)){//if 2
               if(guardar){//if 2.0
                         String idpreg1 = request.getParameter("idpregunta") != null ? request.getParameter("idpregunta") : "";
                         ResultSet rstipop = stmtt.executeQuery("select tipo from eit_pregunta where id_pregunta="+idpreg1);                         
                         String tipop1 = rstipop.next()? rstipop.getString("tipo") : "";
                         rstipop.close();
                         String respuesta = "N/A", correspondencia ="";                         
                         String restado="n";
                         String rcorrecta = "n";
                         if(tipop1.equals("selec")){
                              correspondencia = request.getParameter("rprevia") != null? request.getParameter("rprevia") : "-1";
                              ResultSet rscorrecta = stmtt.executeQuery("select escorrecta from eit_opciones where id_pregunta="+
                                                       idpreg1+" and id_opcion="+correspondencia+" and escorrecta like 's'");
                              if(rscorrecta.next()){
                                   rcorrecta = "s";
                              rscorrecta.close();
                         else{
                              if(tipop1.equals("empar")){
                                   ResultSet rsempar = stmtt.executeQuery("select escorrecta from eit_opciones where id_pregunta="+
                                                            idpreg1+ "order by orden");
                                   int corres = 0;
                                   int correctas = 0;
                                   while(rsempar.next()){                                   
                                             String resp = request.getParameter("selopc"+String.valueOf(corres+1)) != null? request.getParameter("selopc"+String.valueOf(corres+1)) : "";
                                             correspondencia=correspondencia+((corres == 0)? "":",")+resp;
                                             correctas = correctas + (resp.equals(rsempar.getString("escorrecta"))? 1 : 0);
                                             corres++;
                                   rcorrecta = String.valueOf(correctas);
                                   rsempar.close();
                              else{
                                   if(tipop1.equals("complet")){
                                        ResultSet rscomplet= stmtt.executeQuery("select correspondencia from eit_opciones where id_pregunta="+idpreg1);
                                        String complet = rscomplet.next()? rscomplet.getString("correspondencia"):"";
                                        rscomplet.close();
                                        String complet1 = "";
                                        int idxcar = complet.indexOf("$");
                                        respuesta = request.getParameter("comp0") != null ? request.getParameter("comp0") : "";
                                        correspondencia = request.getParameter("comp1") != null ? request.getParameter("comp1") : "";
                                        int corrc =0;
                                        if(idxcar>=0){
                                             complet1 = complet.substring((idxcar+1),complet.length());
                                             complet = complet.substring(0, idxcar);
                                             corrc = (respuesta.equalsIgnoreCase(complet))? 1 : 0;
                                             corrc = (correspondencia.equalsIgnoreCase(complet1))? (corrc+1) : corrc;
                                             rcorrecta = (corrc==2)? "s": (corrc==1)? "m": "n";
                                        }else{
                                             corrc=(respuesta.equalsIgnoreCase(complet))? 1 : 0;
                                             rcorrecta = (corrc==1)? "s": "n";
                                   else{
                                        if(tipop1.equals("abierta")){
                                             respuesta = request.getParameter("respuesta") != null? request.getParameter("respuesta") : "";
                         String guardarResp = "insert into eit_respuesta(id_pregunta, id_cuestionario, id_materia, id_modulo"+
                                                  ", respuesta, correspondencia, rcorrecta, restado, sec_pregunta, codest)"+
                                                  " values ("+idpreg1+", "+idcuest+", '"+asign+"', "+modulo+", '"+respuesta+"', '"+correspondencia+"', '"+rcorrecta+"', '"+restado+"', "+
                                                  String.valueOf((Integer.parseInt(secuenc)-1))+", "+userid+")";
                         String sqlexistencia = "select id_pregunta from eit_respuesta where codest ="+userid+" and id_cuestionario="+idcuest+" and id_materia="+
                                                       asign+" and id_modulo="+modulo+" and id_pregunta="+idpreg1;                         
                         boolean existeResp = (stmtt.executeQuery(sqlexistencia)).next();
                         String editarResp = "update eit_respuesta set respuesta='"+respuesta+"', correspondencia='"+correspondencia+"', "+
                                                  "rcorrecta='"+rcorrecta+"', restado='"+restado+
                                                  "' where codest ="+userid+" and id_cuestionario="+idcuest+" and id_materia like '"+
                                                  asign+"' and id_modulo="+modulo+" and id_pregunta="+idpreg1;
                         //if the page is editing execute string editarResp else execute string guardarResp
                         stmtt.executeUpdate(existeResp? editarResp:guardarResp);
                    String sqlbpu="select p.enunciado, p.tipo, p.titulo, p.id_pregunta from eit_pregunta p, eit_prexcuest pxc where pxc.id_cuestionario="+idcuest+" and pxc.id_pregunta = p.id_pregunta and pxc.secuenc= "+String.valueOf(secuenc);//bupu: buscar pregunta cuestionario
                    //System.out.println("resolvpreg.jsp "+sqlbpu);
                    ResultSet rsbpu = stmtt.executeQuery(sqlbpu);
                    if(rsbpu.next()){ // if 2.1
                         String enunciado = rsbpu.getString("enunciado");
                         String tipo = rsbpu.getString("tipo");
                         String titulo = rsbpu.getString("titulo");
                         String idpreg = rsbpu.getString("id_pregunta");
%>
<h1 align="center"><font color="#0033CC" face="Arial, Helvetica, sans-serif"><%=titulo%></font></h1><br>
<p align="left"><font face="Arial, Helvetica, sans-serif">
<strong>Enunciado:</strong> <%=enunciado%>. </font><br>
<%
     String sqlrespuesta = "select respuesta, correspondencia from eit_respuesta where id_pregunta="+idpreg+
" and id_cuestionario = "+idcuest+" and id_materia like '"+asign+"' and id_modulo="+modulo+" and codest= "+userid;     
     ResultSet rsrespuesta = stmtresp.executeQuery(sqlrespuesta);     
     String sqlopcs= "select opcion, escorrecta, correspondencia, orden from eit_opciones where id_pregunta ="+idpreg+"order by orden";
     ResultSet rsops = stmtt.executeQuery(sqlopcs);          
%>
<%String letras = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     Vector opciones = new Vector();
     Object obj[] = new Object[4];
     while(rsops.next()){
          obj[0] = rsops.getString("opcion");
          obj[1] = "";
          obj[2] = rsops.getString("correspondencia");
          obj[3] = rsops.getString("orden");
          opciones.addElement(obj.clone());
     rsops.close();
%>
<form action="resolverpreg.jsp" method="post" name="Correspondencias">
<%
     String respEmpar = "";
     String respuestap="";
     String respcorres[] = {"",""};
     if(rsrespuesta.next()){     
          respuestap = rsrespuesta.getString("respuesta");
          respEmpar = rsrespuesta.getString("correspondencia");
          respcorres[0]= respuestap;
          respcorres[1]= respEmpar;
     rsrespuesta.close();
     if (tipo.equals("empar")){
%>
<%@ include file="resolvempar.jsp"%>
<%}//fin if tipoPreg = 'emapar'
     else{
     if(tipo.equals("selec")){
%> <%@ include file="reslovselec.jsp"%>
     <%}//fin if tipopreg = 'select'
     else{
          if(tipo.equals("complet")){%>
          <%@include file="resolvcomplet.jsp"%>
     <%}//fin if tipopreg='complet'
     else{
          if(tipo.equals("abierta")){%>
          <%@include file="resolvabierta.html"%>
          <%}//fin if tipopreg='abierta'
          else{%>
               <span class="titolForum">Error: no se ingres&oacute; ning&uacute;n tipo de pregunta
               o se est� accediendo en forma err&oacute;nea a este sitio.</span>
          <%}//fin else de tipopregunta = 'abierta'%>          
     <%}//fin else tipopreg='complet'%>                    
     <%}// fin else de tipopreg = 'select'%>     
<%}//fin else de tipoPreg = 'emapar'%>
<br>
<input name="idpregunta" type="hidden" value="<%=idpreg%>">
<input name="guardar" type="hidden" value="si">
<input name="secuens" type="hidden" value="<%=(1+(Integer.parseInt(secuenc)))%>">
<input type="submit" name="continuar" value="Continuar">
</form>
<%                    rsbpu.close();
                    }//fin 2.1                    
                    else{%>
Ha terminado de realizar la prueba<br>
<a href="elejCuestion.jsp">Continuar</a>
<%}
               }// fin if 2
               stmtt.close();
               stmtresp.close();
               conn.close();
          }// fin try 1
          catch(Exception expt){
               out.println("Error: "+expt);
     }//fin eles de if 1
%>
</body>
</html>

Similar Messages

  • Please help with compiling error

    Hello, I am currently taking a class in Java Programming and need help with an error. I am working on a Mortgage Calculator and when I compile the code I get this error. I have no idea how to fix this. Can anyone help? Thank you.
    '{' expected public class MortgageCalculator
    1 error
    Tool completed with exit code 1
    Here is my code
    import java.io.*;//*java input output
    import java.util.Date;//Date Utility
    import java.util.Formatter;//format Utility
    import java.text.NumberFormat;//*format numbers
    //class MortgageCalculator
    public class MortgageCalculator
    public static void main(String[]args);{
    Date currentDate=newDate();
    DecimalFormat decimalPlaces=newDecimalFormat("0.00");
    //declare Variables
    final double principalBalance=200000;//*$200,000 Loan
    final double monthlyInterest=.06;//*6% interest rate
    final double Term=12*30;//*monthly interest rate
    final double monthlyInterest=((principalBalance*(monthlyInterest/12))/(1-Math.pow(1+(monthlyInterest/12))-(Term)));
    //Display Output
    System.out.println("\t\t" + currentDate);
    System.out.println("\t\tLoan Amount" + principalBalance);
    System.out.println("\t\tInterest Rate" + monthlyInterest);
    System.out.println("\t\tTerm of Loan" + Term);
    System.out.println("\t\tThe Payment will be:" + monthlyInterest);
    System.out.println(decimalPlaces.format(mothlyInterest));
    }

    You need to enclose your class body in { }. You're missing at least one of them

  • Help with compiling error

    Okay, so I've been making a cash register app, and the thing isn't compiling for me. I keep looking over this and I'm not sure why it isn't working, so I was hoping someone could point out what I've done wrong here.
    public class Receipt
            public static void main(String[] args) throws IOException
                    int q;
                    RetailItem retail = new RetailItem("Description", 1, 10.00, 10.00);
                    Scanner keyboard = new Scanner(System.in);
                    System.out.println("Enter quantity: ");
                    q = keyboard.nextInt();
                    CashRegister receipt = new CashRegister(retail, q);
                    FileWriter fwriter = new FileWriter("SalesReceipt");
                    PrintWriter outputFile = new PrintWriter(fwriter);
    "Receipt.java" 31L, 835C                                     1,1           Top
    import java.util.Scanner;
    import java.io.*;
    public class Receipt
            public static void main(String[] args) throws IOException
                    int q;
                    RetailItem retail = new RetailItem("Description", 1, 10.00, 10.00);
                    Scanner keyboard = new Scanner(System.in);
                    System.out.println("Enter quantity: ");
                    q = keyboard.nextInt();
                    CashRegister receipt = new CashRegister(retail, q);
                    FileWriter fwriter = new FileWriter("SalesReceipt");
                    PrintWriter outputFile = new PrintWriter(fwriter);
                    outputFile.println("\tSALES RECEIPT");
                    outputFile.println("Unit Price: $" + retail.getRetail());
                    outputFile.println("Quantity: " + q);
                    outputFile.println("Subtotal: $" + receipt.getSubtotal());
                    outputFile.println("Sales Tax: $" + receipt.getTax());
                    outputFile.println("\nTotal: $" + receipt.getTotal());
            outputFile.close();
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
                                                                                                                                                  1,1           All

    You know, the compiler errors also give you more detail than "isn't compiling for me". Do you expect people here to compile it for you to see the error you're already seeing and witholding?

  • Need help with compile error: externally visible definition

    I am getting the following error on compile:
    "A file found in an source-path must have an externally
    visible definition. If a definition in the file is meant to be
    externally visible, please put the definition in a package."
    Typically this would mean that an actionscript class file is
    not placed in a package, but I am getting the error for a Custom
    MXML ListItemRenderer component I created.
    Does anyone have a clue why this would be happening? It
    happened once before and mysteriously went away after I removed all
    of the code in the file, saved it, pasted it back in and saved it
    again. Unfortunately that is not working this time.
    I would really appreciate any help.
    Thanks,
    shaun

    OK here it is, first i'll give u the Card.java file, it compiles i think:
    public interface Card {
    /** The four suites. */
    public static final byte CLUB = 0, DIAMOND = 1, HEART = 2, SPADE = 2;
    /** The suite of this card. */
    public byte suite();
    * Is 's' a valid suite?
    * @param s a value to check to see if it is a valid suite.
    * @return true iff 's' is a valid suite.
    public boolean validSuite(byte s);
    /** The thirteen standard cards. */
    public static final byte ACE = -1, TWO = -2, THREE = -3, FOUR = -4,
    FIVE = -5, SOX = -6, SEVEN = -7, EIGHT = -8, NINE = -9, TEN = -10,
    JACK = -11, QUEEN = -12, KING = -13;
    /** The face-value of this card */
    public byte value();
    * Is 'v' a valid face-value?
    * @param v the value to check to see if it is a valid face-value.
    * @return true iff 'v' is a valid face-value.
    public boolean validValue(byte v);
    * @param a_card the card to compare
    * @return true iff the suite of this card is identical to the suite
    * of <code>a_card</code>
    public boolean sameSuiteAs(Card a_card);
    * @param a_card the card to compare
    * @return true iff the face value of this card is identical to the
    * face value of <code>a_card</code>
    public boolean sameFaceValueAs(Card a_card);
    * @param a_card the card to compare
    * @return true iff the face value of this card is strictly greater than
    * the face value of <code>a_card</code>
    public boolean greaterFaceValueThan(Card a_card);
    * Whether this card has a greater value than <code>a_card</code> is
    * determined by a given card game's rules.
    * @param a_card the card to compare
    * @return true iff this card has a great value than <code>a_card</code>
    public boolean greaterValueThan(Card a_card);
    * Two cards are equivalent if they are indistinguishable in a given
    * card game's rules.
    * @param a_card the card to compare
    * @return true iff this card and <code>a_card</code> are indistinguishable
    public boolean equivalentTo(Card a_card);
    }

  • Need help with compiler error

    'class' or 'interface' expected
    public static int getNewAmount()
    ^
    Can anyone tell me what to do?
    Thx.

    I solved that problem. Thanks.
    But now I have another error problem.
    Exception in thread "main" java.lang.NumberFormatException: n
    at java.lang.Integer.parseInt(Integer.java:414)
    at java.lang.Integer.parseInt(Integer.java:463)
    at MyInput.readInt(MyInput.java:27)
    at SalaryComputation3.getJobClass(SalaryComputation3.java:85)
    at SalaryComputation3.main(SalaryComputation3.java:61)

  • Procedure created with compilation errors. help?

    SQL> create or replace procedure p_update_audit_log
    2 ( p_audit_id audit_log.audit_id%type
    3 p_grade_update audit_log.grade_update%type
    4 p_grade audit_log.grade%type
    5 sys_date
    6 p_user_id audit_log.user_id%type
    7 is
    8 BEGIN
    9 insert into audit_log (user_id, audit_id, grade, grade_update,
    10 sys_date)
    11 values (p_user_id, p_audit_id, p_grade, p_grade_update, sys_date);
    12 END p_update_audit_log;
    13
    14
    15
    16
    17
    18 /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE P_UPDATE_AUDIT_LOG:
    LINE/COL ERROR
    3/1 PLS-00103: Encountered the symbol "P_GRADE_UPDATE" when expecting
    one of the following:
    := ) , default character
    The symbol "," was substituted for "P_GRADE_UPDATE" to continue.
    4/1 PLS-00103: Encountered the symbol "P_GRADE" when expecting one of
    the following:
    := ) , default character
    The symbol "," was substituted for "P_GRADE" to continue.
    5/1 PLS-00103: Encountered the symbol "SYS_DATE" when expecting one
    LINE/COL ERROR
    of the following:
    := ) , default character
    The symbol ", was inserted before "SYS_DATE" to continue.
    7/1 PLS-00103: Encountered the symbol "IS" when expecting one of the
    following:
    := ) , default character
    The symbol ")" was substituted for "IS" to continue.
    Could anyone help me with this problem?

    These are syntax errors:
    Try this
    create or replace procedure p_update_audit_log
    ( p_audit_id audit_log.audit_id%type,
    p_grade_update audit_log.grade_update%type,
    p_grade audit_log.grade%type,
    sys_date DATE,
    p_user_id audit_log.user_id%type)
    is
    BEGIN
    insert into audit_log (user_id, audit_id, grade, grade_update,
    sys_date)
    values (p_user_id, p_audit_id, p_grade, p_grade_update, sys_date);
    END p_update_audit_log;

  • Warning: View altered with compilation errors. : Please help.

    Hi All,
    Found few views invalid, tried to compile them, but got the following error. It looks like synonyms are calling each other.
    Please help to compile the view.
    =======================
    SQL> alter view APPS.PER_ADDRESSES_AV12 compile;
    Warning: View altered with compilation errors.
    Checked error:
    SQL> SHOW errors VIEW APPS.PER_ADDRESSES_AV12;
    Errors for VIEW APPS.PER_ADDRESSES_AV12:
    LINE/COL ERROR
    0/0 ORA-01775: looping chain of synonyms
    Extracted DDL:
    ==========
    CREATE OR REPLACE FORCE VIEW "APPS"."PER_ADDRESSES_AV12" ("ROW_KEY", "ADDRESS_
    ID", "TOWN_OR_CITY") AS
    SELECT ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES_A WHERE TOWN_OR_CI
    TY IS NOT NULL OR SUBSTR(AUDIT_TRUE_NULLS,12,1)='Y' UNION ALL SELECT 99991231235
    9591111122222 ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES
    Checked synonyms for the base table:
    =======================
    OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME
    PUBLIC PER_ADDRESSES HR PER_ADDRESSES
    APPS PER_ADDRESSES HR PER_ADDRESSES
    XXHRC PER_ADDRESSES APPS PER_ADDRESSES
    Edited by: 784786 on Dec 22, 2011 7:27 AM

    784786 wrote:
    Found few views invalid, tried to compile them, but got the following error. It looks like synonyms are calling each other.
    Please help to compile the view.
    SQL> alter view APPS.PER_ADDRESSES_AV12 compile;
    Warning: View altered with compilation errors.
    SQL> SHOW errors VIEW APPS.PER_ADDRESSES_AV12;
    Errors for VIEW APPS.PER_ADDRESSES_AV12:
    LINE/COL ERROR
    0/0 ORA-01775: looping chain of synonyms
    CREATE OR REPLACE FORCE VIEW "APPS"."PER_ADDRESSES_AV12" ("ROW_KEY", "ADDRESS_
    ID", "TOWN_OR_CITY") AS
    SELECT ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES_A WHERE TOWN_OR_CI
    TY IS NOT NULL OR SUBSTR(AUDIT_TRUE_NULLS,12,1)='Y' UNION ALL SELECT 99991231235
    9591111122222 ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES
    OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME
    PUBLIC PER_ADDRESSES HR PER_ADDRESSES
    APPS PER_ADDRESSES HR PER_ADDRESSES
    XXHRC PER_ADDRESSES APPS PER_ADDRESSESso break the chain by dropping one or of them

  • ORA-24344: Success with compilation error.

    Hi, i got the following error notification mail when the DB job [runs only once in a day at 1 AM] tries to execute the following procedure.
    The mail reads like this ----
    "Condition Raised in: toll_partitions.recompile_invalid_objects
    Short Desc: ORA-24344
    Long Desc: ORA-24344: Success with compilation error.
    Cause: Trigger creation did not successfully complete.
    Solution: Check trigger status for all triggers created in this schema and find out which error caused the failure by querying the user_errors table for the named trigger and Trigger type.
    --- end of mail ----
    === This is the procedure =====
    PROCEDURE recompile_invalid_objects IS
    -- Declare variables
    v_ins_str VARCHAR2(2000);
    cursor_handle NUMBER;
    execute_feedback NUMBER;
    v_unix_str VARCHAR2(200);
         v_object_cnt NUMBER := 0;
         -- Declare cursor objects
         CURSOR curs_obj IS
    SELECT decode( OBJECT_TYPE, 'PACKAGE BODY',
    'ALTER PACKAGE ' || OWNER||'.'||OBJECT_NAME || ' COMPILE BODY',
    'ALTER ' || OBJECT_TYPE || ' ' || OWNER||'.'||OBJECT_NAME || ' COMPILE' )
                   "COMP_OBJECT"
    FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
              AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
    BEGIN
         -- Set Package/Procedure Name for email notification.
         vFacility := cProcName || '.recompile_invalid_objects';
    -- Select invalid object count
    BEGIN
         SELECT count(*)
              INTO v_object_cnt
              FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
                   AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
              -- Recompile invalid objects
              IF v_object_cnt > 0 THEN
              FOR i in curs_obj
                   LOOP
                   v_ins_str := i.COMP_OBJECT;
                        cursor_handle := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(cursor_handle,
         v_ins_str,
                   DBMS_SQL.V7);
    execute_feedback := DBMS_SQL.EXECUTE(cursor_handle);          
    DBMS_SQL.CLOSE_CURSOR(cursor_handle);
    COMMIT;
                   END LOOP;
              END IF;
    END;
    EXCEPTION
         WHEN OTHERS THEN
         -- Log error condition and generate email notification if needed.
    toll_handle.error_condition(vFacility, toll_handle.get_ora_desc(sqlerrm),vErrorID);
         END recompile_invalid_objects;
    ==== end of procedure ====
    I got '0' count when I ran the invalid object count to see the invalid objects. I ran the following code ..and it gave me 0 value.
    SELECT count(*)
              FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
                   AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
    --- end of query ---
    The count 0 means, there are no invalid objects. But it throws daily the same error notification mail at 1 AM[the time job runs]. I compiled the procedure and it reports no errors. I checked the status of the triggers and all are valid and enabled. Please suggest me. Any help in this regard will be of great help to me. Thanks in advance...

    Just some hints. I'm not sure if they help solving your problem.
    1) Don't COMMIT inside a cursor.
    2) Instead of DBMS_SQL you could use DBMS_DDL.ALTER_COMPILE, also see here: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_ddl2.htm#1000604
    3) Check if there are other jobs running during the recompile. Maybe you run into some conflicts.
    4) Output the statement that creates the error. It looks like you could try to put this into your exception handler: toll_handle.error_condition(vFacility, v_ins_str,vErrorID);

  • ORA-24344: success with compilation error While creating workspace

    Hi,
    We had an instance with db 9.2.0.5 and HTML DB 1.56.
    First we upgraded database to to 10.1.0.4.Then we upgraded HTML DB to 1.6.1(Upgraded html db 1.5 to 1.6, Then applied patch 1.6.1 patch - 4173133)
    Logged to the HTML DB as an administrator for creating application developer's workspace. I have got the error "ORA-24344: success with compilation error" while creating the workspace.
    We are able to create the workspace successfully on HTML DB 1.5.
    Any help is highly appreciated.
    Thanks, Venkanna

    Venkanna - Do you think the workspace creation was at least partly successful? I mean, can you login to it, can you see anything about it in the admin app, etc.? It would be useful to get a list of invalid objects in the new workspace's schema. If there are none, then get a list of invalid objects in FLOWS_010600.
    Scott

  • "ORA-24344: success with compilation error" in beginDDL

    Hello,
    I'm facing a really strange problem. When i try to use dbms_wm.beginDDL in one of my versioned tables, i get the error:
    ORA-24344: success with compilation error
    ORA-06512: "WMSYS.LT", line 12178
    ORA-06512: line 2
    I just get the error if i run the procedure from SQLPlus.
    Using PLSQL Developer, for example, I get a normal execution but the LTS table it's not created and the state of the table stays 'VERSIONED'.
    I used this procedure other times in the past and there were no problems.
    Trying to identify the cause of the error, i've tried:
    (1) - run dbms_wm.beginDDL for all the other tables - No Problem
    (2) - verifiy if there were invalid objects - All valid
    (3) - verify the error tables for more details (user_, dba_, user_wm_vt_) - No entries
    (4) - generate a trace file, to search for abnormal executions - Apparently nothing really strange (but obviously I don't know what was supposed to happen)
    Any possible reasons for this to happen?
    Any ideas?
    Some help would be welcome.
    Best regards,
    Pedro Lourenço

    Hi Noel,
    I just found the problem...
    I have a trigger defined on the table that uses a synonym for another user table.
    That synomym was dropped, so the trigger was invalid.
    I didn't notice the problem because the trigger was disabled, so the WM$ procedure wasn't being generated, and there were no "visible errors".
    Recreating the synomyn, the problem was solved.
    Thanks for your help!
    Regards,
    Pedro Lourenço

  • Why procedure created with compilation errors?

    CREATE or REPLACE PROCEDURE AddStudent(
    p_stuID number,
    p_lname varchar2(30),
    p_fname varchar2(20),
    p_major varchar2(5) check(major IN
    ('ACCT','ECT','EET','BIS','BSIT','CIS','TCOM')),
    P_standing varchar2(10) check(standing IN
    ('FRESHMAN','SOPHOMORE','JUNIOR','SENIOR')),
    P_gpa number(3,2) IS
    BEGIN
    INSERT INTO STUDENT (P_STUID, P_LNAME, P_FNAME, P_MAJOR,
    P_STANDING, P_GPA, P_ADVISOR) VALUES
    (STUDENT_SEQ.NEXTVAL, 'SMITH', 'HEATHER', 'CIS', 'JUNIOR', 3.8,
    2);
    INSERT INTO STUDENT (P_STUID, P_LNAME, P_FNAME, P_MAJOR,
    P_STANDING, P_GPA, P_ADVISOR) VALUES
    (STUDENT_SEQ.NEXTVAL, 'ELLIOTT', 'DAVE', 'CIS', 'JUNIOR', 3.65,
    2);
    COMMIT;
    END;
    SQL> /
    Warning: Procedure created with compilation errors.
    any help would be appreciated

    I would guess it's because you can't use CHECK like that (at
    least not in Oracle 8i). If you want to check the validity of
    procedural parameters you'll have to code this sort of thing:
    BEGIN
    IF major NOT IN ('whatever', 'etc') THEN
    RAISE_APPLICATION_ERROR(-22200, 'Invlaid value for MAJOR');
    ELSIF ....
    For future reference you can use the SQL*Plus command SHOW ERR
    to see what went wrong - it gives you line numbers and error
    messages.
    HTH, APC

  • Help with code errors

    Can somebody help me get rid of the following compile errors:
    coreservlets/OrderPage.java:61: setNumOrdereed(int, int) in coreservlets.ShoppingCart
    cannont be applied to (java.lang.String,int)
    cart.setNumOrdered(recordingid, numItems);
    .\coreservlets\shoppingCart.java:44 cannot resolve symbol
    symbol : variable recordingid
    location: class coreservlets.ShoppingCart
    if (order.getrecordingid() == (recordingid)) {
    .\coreservlets\ShoppingCart.java:49: cannot resolve symbol
    symbol : variable recordingid
    location: class coreservlets.ShoppingCart
    itemOrder new order = new ItemOrder(Catalog.getItem(recordingid));I know that not very helpful with out the code but the code is very big so if anyone wants me to post extracts from the code please tell me.

    Thank you i put that code in but now get the following:
    coreservlets/OrderPage.java:40:  incompatible types
    found : java.lang.strgin
    required: int int recordingid = request.getParameter("recordingid")!=null?request.getParameter("recordingid"):1;
    ^/code]
    coreservlets/OrderPage.java:48: addItem(java.lang.String) in coreservlets.ShoppingCart cannot be applied to (int)
    cart.additem(recordingid);
    .\coreservlets\AhoppingCart.java:44: cannot resolve symbol
    symbol: variable recordingid
    location: class coreservlets.ShoppingCart
    if (order.getrecordingid() == (recordingid)) {
    .\coreservlets\AhoppingCart.java:49: cannot resolve symbol
    symbol: variable recordingid
    location: class coreservlets.ShoppingCart
    ItemOrder newOrder = new ItemOrder(Catalog.getItem(recordingid));
    4 errors.
    Also could you explain what the line you added to the code means:
    !=null?request.getParameter("recordingid"):1;
    !=null?request.getParameter("numItems"):"1";and how come you got rid of if (recordingid != null) {Thanks for any help with these errors
    OK I HAVE GOT RID OF ALL THE ERRORS APART FROM THE TOP ONE:
    code]coreservlets/OrderPage.java:40: incompatible types
    found : java.lang.strgin
    required: int
    int recordingid = request.getParameter("recordingid")!=null?request.getParameter("recordingid"):1;
                                            /code]
    Message was edited by:
            ajrobson                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ILM First Time Installation Fails with compilation errors

    I am using database version 10.1.0.4.2, and Apex version 3.0.0.00.20,
    These both are on the same machine.
    I login with sqlplus as sysdba and run
    @ilma_install apex sysaux none
    Following happens after running it:
    - It runs for a while creating different objects
    - then gives warning : view created with compilation error
    - then gives warning : view created with compilation error
    - then gives warning : view created with compilation error
    - then runs for a while
    - then gives error Package body created with compilation errors
    Errors for package body ILM_SYS_TOOLKIT
    Line/col Error
    1646/3 PLSQL: SQL Statement Ignored
    1647/22 PLS-009050 : Object ILM_Toolkit.ILM_Schedular_Steps is invalid
    Then the installation terminates.
    Please help.
    regards

    I am sorry to hear that you are still having difficulties with the installation. I set up a system that is as close to your configuration as I could replicate, with a 10gR1 database and Apex 3.0, and did not have any issue installing the ILM Assistant.
    It is possible that your install kit may have been corrupted during the modifications. I could build a new kit with the proper changes for your setup and send this directly to you if you would like.
    Alternatively, the problem may be with your Application Express installation. Try to verify that this was installed properly, and that the underlying schema account (FLOWS_030000) is unlocked and that you are using its proper password when installing ILM.
    Thanks,
    Adam

  • Warning: Procedure created with compilation errors.

    I am trying to upload a pdf file into a blob column of a table. I get this error with these three ways of doing that:Warning: Procedure created with compilation errors.
    Any ideas why?
    -- THE STORAGE TABLE FOR THE IMAGE FILE
    ALTER TABLE PDM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PDM CASCADE CONSTRAINTS;
    CREATE TABLE PDM (
    DNAME VARCHAR2(30), -- DIRECTORY NAME
    SNAME VARCHAR2(30), -- SUBDIRECTORY NAME
    FNAME VARCHAR2(30), -- FILE NAME
    IBLOB BLOB); -- IMAGE FILE
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE (
    PDNAME VARCHAR2,
    PSNAME VARCHAR2,
    PFNAME VARCHAR2) IS
    SRC_FILE BFILE;
    DST_FILE BLOB;
    LGH_FILE BINARY_INTEGER;
    BEGIN
    SRC_FILE := BFILENAME('PDF_DIR', '266-5210.pdf');
    -- INSERT A NULL RECORD TO LOCK
    INSERT INTO PDM
    (DNAME, SNAME, FNAME, IBLOB)
    VALUES
    (PDNAME, PSNAME, PFNAME, EMPTY_BLOB())
    RETURNING IBLOB INTO DST_FILE;
    -- LOCK RECORD
    SELECT IBLOB
    INTO DST_FILE
    FROM PDM
    WHERE DNAME = PDNAME
    AND SNAME = PSNAME
    AND FNAME = PFNAME
    FOR UPDATE;
    -- OPEN THE FILE
    DBMS_LOB.FILEOPEN(SRC_FILE, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.OPEN(DST_FILE, DBMS_LOB.LOB_READWRITE);
    -- DETERMINE LENGTH
    LGH_FILE := DBMS_LOB.GETLENGTH(SRC_FILE);
    -- READ THE FILE
    DBMS_LOB.LOADFROMFILE(DST_FILE, SRC_FILE, LGH_FILE);
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET IBLOB = DST_FILE
    WHERE DNAME = PDNAME
    AND SNAME = PSNAME
    AND FNAME = PFNAME;
    -- CLOSE FILE
    DBMS_LOB.FILECLOSE(SRC_FILE);
    END LOAD_FILE;
    -- THE STORAGE TABLE FOR THE IMAGE FILE
    ALTER TABLE PDM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PDM CASCADE CONSTRAINTS;
    CREATE TABLE PDM
    FNAME VARCHAR2(1000)
    ,IBLOB BLOB
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE AS (
    SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
    DST_FILE BLOB;
    BEGIN
    -- INSERT A NULL RECORD TO LOCK
    INSERT INTO PDM
    (FNAME, IBLOB)
    VALUES
    ('262-2827.pdf', EMPTY_BLOB())
    RETURNING IBLOB INTO DST_FILE;
    -- OPEN THE FILE
    DBMS_LOB.FILEOPEN(SRC_FILE, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.OPEN(DST_FILE, DBMS_LOB.LOB_READWRITE);
    -- READ THE FILE
    DBMS_LOB.LOADFROMFILE( SRC_FILE, DST_FILE);
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET FNAME = SRC_FILE,
    IBLOB = DST_FILE;
    -- CLOSE FILE
    DBMS_LOB.CLOSE(DST_FILE);
    DBMS_LOB.FILECLOSE(SRC_FILE);
    COMMIT;
    END LOAD_FILE;
    ALTER TABLE IMAGE_TABLE
    DROP PRIMARY KEY CASCADE;
    DROP TABLE IMAGE_TABLE CASCADE CONSTRAINTS;
    CREATE TABLE IMAGE_TABLE (
    ID NUMBER PRIMARY KEY,
    IMAGE ORDSYS.ORDIMAGE);
    CREATE OR REPLACE DIRECTORY IMAGEDIR AS 'C:\cards\';
    GRANT READ ON DIRECTORY IMAGEDIR TO PUBLIC;
    GRANT READ ON DIRECTORY MY_FILES TO twilliam;
    GRANT READ ON DIRECTORY MY_FILES TO tmwillia;
    CREATE OR REPLACE PROCEDURE IMAGE_IMPORT(DEST_ID NUMBER,
    FILENAME VARCHAR2)
    IS
    IMG ORDSYS.ORDIMAGE;
    CTX RAW(64) := NULL;
    BEGIN
    DELETE FROM IMAGE_TABLE
    WHERE ID = DEST_ID;
    INSERT INTO IMAGE_TABLE (ID, IMAGE)
    VALUES (DEST_ID, ORDSYS.ORDIMAGE.INIT())
    RETURNING IMAGE INTO IMG;
    IMG.IMPORTFROM(CTX, 'FILE', 'IMAGEDIR', FILENAME);
    UPDATE IMAGE_TABLE SET IMAGE=IMG WHERE ID=DEST_ID;
    END
    CALL IMAGE_IMPORT(7142,'125-0502.pdf');
    CALL IMAGE_IMPORT(7143,'125-0503.pdf');
    SELECT ID,
    T.IMAGE.GETHEIGHT(),
    T.IMAGE.GETWIDTH()
    FROM IMAGE_TABLE T;
    SELECT ID,
    T.IMAGE.GETFILEFORMAT(),
    T.IMAGE.GETCOMPRESSIONFORMAT()
    FROM IMAGE_TABLE T;
    SELECT ID,
    T.IMAGE.GETCONTENTFORMAT(),
    T.IMAGE.GETCONTENTLENGTH()
    FROM IMAGE_TABLE T;

    In the second load_file procedure you should probably change the update command
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET FNAME = SRC_FILE,
    IBLOB = DST_FILE;into this
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET IBLOB = DST_FILE
    WHERE  FNAME = '262-2827.pdf';but I'm not sure how to explain the eof error message. Usually this happens when you forget an "END;" or "END LOOP;" command.
    Ok I rechecked and the declaration of the second procedure seems wrong
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE AS (
    SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
    DST_FILE BLOB;
    BEGINshould be rewritten as
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE
      AS
      SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
      DST_FILE BLOB;
    BEGIN
    ...I removed one parenthesis which was not closed.
    And for the image_import procedure there is a semikolon missing after the final END.
    END*;*
    Edited by: Sven W. on Nov 24, 2008 5:54 PM.
    Edited by: Sven W. on Nov 24, 2008 5:56 PM
    Edited by: Sven W. on Nov 24, 2008 5:59 PM

  • Installing Elements 11 on Mac. Need help with install error "Setup wants to make changes."

    Installing Elements 11 on Mac 10.8.2. Need help with install error:  Setup wants to make changes. Type your password to allow this."  After entering Adobe password, nothing happens.  Locked from further installation.  Any ideas?  Adobe phone support could not help.

    Just before letting changes (installation in this case) be made on the system, Mac OS prompts for password & this has to be the Mac system password. This password prompt is the system's own native prompt & would accept the system password only. Please make sure it is the right system password (all/admin rights) and the installaion should run.

Maybe you are looking for

  • Booting from alternate disk in Sol 10 x86 1/06

    Hey all-- I'm trying to set up a mirrored root filesystem on an x86 box with two IDE disks. It's running solaris 10 1/06. I've done this plenty of times on sparc boxes, but only once on an x86 box and after the metaroot, I had to edit bootenv.rc to p

  • How to assign transport request for Dynamic selection in SE36

    Hi Friends, Please guide me how to transport or assign a request for the changes made in BRF selecion view. I have assigned and added BKPF-XREF1_HD field for FB03 transaction. Its working fine as per user requirement. I am facing probelm to assing a

  • PRSM Offbox Enable CX Traffic Redirection

    Hi Iv'e got PRSM (Offbox) 9.3 installed. I've imported an ASA5585-X Failover Pair - Each with a CX module in it (great) How on earth do you set a traffic redirection policy to send the traffic through the CX module(s)!! Im pulling my hair out, if you

  • Delete and Rename External User

    I'm trying to delete and rename EXTERNAL (foreign) users in GroupWise via the AdminObject API. I can create them no problem and I can change their attributes no problem (e.g. givenName, sn). However, when I try and delete or rename, the call succeeds

  • Output (Email Config) Settings

    Hi Can any one provide me with a Email configuration Document appreciate some thing like the below link For Sales Order Confirmation print. (BA00). I tried to configure the output type by maintaining the following 1.under general data of the output t