I need to get error from sql script launched from class

Hello.
I need to run a bat file (windows xp) inside a PL/SQL procedure and I must check the codes returned by the command.
I am trying with these files:
comando.bat
sqlplus -s fernando/sayaka@ferbd %1
exit /Bkk.sql
whenever sqlerror exit sql.sqlcode rollback
declare
  v_res number;
begin
  select 1
       into v_res
       from dual
   where 1=2;
end;
exit sql.sqlcodeEjecutarProcesoSOreturn.java
import java.lang.Runtime; 
import java.lang.Process; 
import java.io.IOException; 
import java.lang.InterruptedException;   
public class EjecutarProcesoSOreturn
    public static int ejecuta(java.lang.String  arg0, java.lang.String arg1)
        java.lang.String[] args= new String[2];
        args[0]=arg0;
        args[1]=arg1;
        int ret = 0;
        System.out.println("En ejecuta");           
        try
            /* Se ejecta el comando utilizando el objeto Runtime
            y Process */               
            Process p = Runtime.getRuntime().exec(args);      
            try
                /* Esperamos la finalizacion del proceso */                 
                ret = p.waitFor(); 
                //ret = p.exitValue();                
            catch (InterruptedException intexc)
                System.out.println("Se ha interrumpido el waitFor: " +  intexc.getMessage());
                ret = -1;            
            System.out.println("Codigo de retorno: "+ ret);    
        catch (IOException e)
           System.out.println("IO Exception de exec : " +               e.getMessage());              
           e.printStackTrace();          
           ret = -1;            
        finally
           return ret;
    public static void main(java.lang.String[] args)
        System.out.println("En main");  
        System.out.println("args[0] " + args[0]);           
        System.out.println("args[1] " + args[1]);   
        ejecuta(args[0], args[1]);
}  When I launch the script from a console I get:
D:\Ejercicios_Oracle\BATCH_SCRIPTS>comando.bat @kk.sql
D:\Ejercicios_Oracle\BATCH_SCRIPTS>sqlplus -s fernando/sayaka@ferbd @kk.sql
declare
ERROR en lÝnea 1:
ORA-01403: no se han encontrado datos
ORA-06512: en lÝnea 4
D:\Ejercicios_Oracle\BATCH_SCRIPTS>exit /BAnd if I check the errorlevel I get:
D:\Ejercicios_Oracle\BATCH_SCRIPTS>echo %errorlevel%
1403When I run it the class I get:
D:\Ejercicios_Oracle\BATCH_SCRIPTS>java EjecutarProcesoSOreturn comando.bat @kk.sql
En main
args[0] comando.bat
args[1] @kk.sql
En ejecuta
Codigo de retorno: 0And if I check the errorlevel I get:
D:\Ejercicios_Oracle\BATCH_SCRIPTS>echo %errorlevel%
0How can I get the code 1403 returned from the class?
Thanks in advance.

I am trying to extract the error code from the Process.getInputStream() but it seems as if I do not have some privileges.
This is my class right now:
import java.lang.Runtime; 
import java.lang.Process; 
import java.io.IOException; 
import java.lang.InterruptedException;   
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
public class EjecutarProcesoSOreturn
    public static int ejecuta(java.lang.String  arg0, java.lang.String arg1)
        java.lang.String[] args= new String[2];
        args[0]=arg0;
        args[1]=arg1;
int ret = -100;
        //System.out.println("En ejecuta");           
        try
            /* Se ejecuta el comando utilizando el objeto Runtime y Process */     
            Process p = Runtime.getRuntime().exec(args);      
ret = -101;   
            try
                /* Esperamos la finalizacion del proceso */                 
                ret = p.waitFor(); 
                //ret = p.exitValue();
                InputStream bis = p.getInputStream();
                InputStreamReader isr = new InputStreamReader(bis);
                BufferedReader br = new BufferedReader(isr);
                String line = null;
                String msg = null;
                String errCode = null;
                boolean oraError = false;
ret = -102;   
                while ( (line = br.readLine()) != null)   
                  //System.out.println(line);
                  if ((line.length() >= 5) & (!oraError))
                    msg = line.substring(0,4); 
                    if (msg.equals("ORA-"))
                         oraError = true;
                         errCode = line.substring(4,9);
ret = -103;   
                      //System.out.println(errCode);
                      ret = Integer.parseInt(errCode);;
            catch (InterruptedException intexc)
                //System.out.println("Se ha interrumpido el waitFor: " +  intexc.getMessage());
                ret = -1;            
        catch (IOException e)
           //System.out.println("IO Exception de exec : " +               e.getMessage());              
           //e.printStackTrace();          
           ret = -1;            
        catch (Exception e)
           //System.out.println("IO Exception de exec : " +               e.getMessage());              
           //e.printStackTrace();          
           ret = -104;            
        finally
           //ret = -100;   
           System.out.println("Codigo de retorno: "+ ret);
           return ret;
    public static void main(java.lang.String[] args)
        System.out.println("En main");  
        System.out.println("args[0] " + args[0]);           
        System.out.println("args[1] " + args[1]);   
        ejecuta(args[0], args[1]);
}  And when I call the main method with these parameters then I get:
D:\Ejercicios_Oracle\BATCH_SCRIPTS>java EjecutarProcesoSOreturn d:\comando.bat @d:\kk.sql
En main
args[0] d:\comando.bat
args[1] @d:\kk.sql
Codigo de retorno: 1403I have this pl/sql function:
CREATE OR REPLACE FUNCTION FERNANDO.EjecutarProcesoSOreturn (param1 VARCHAR2, param2 VARCHAR2) return NUMBER
AS LANGUAGE JAVA  name 'EjecutarProcesoSOreturn.ejecuta(java.lang.String, java.lang.String) return java.lang.int';I have granted some privileges to the user FERNANDO:
begin
    dbms_java.grant_permission
    ('FERNANDO',
     'java.io.FilePermission',
     'd:\comando.bat',
     'execute');
    dbms_java.grant_permission
    ('FERNANDO',
     'java.lang.RuntimePermission',
     'writeFileDescriptor' );
    dbms_java.grant_permission
    ('FERNANDO',
     'java.lang.RuntimePermission',
     'readFileDescriptor' );
    dbms_java.grant_permission
    ('FERNANDO',                   
     'java.io.FilePermission',    
     'd:\*',               
     'read,write');
end;
/and when I try the function, I get:
SQL> DECLARE
  2    RetVal NUMBER := 0;
  3    PARAM1 VARCHAR2(200);
  4    PARAM2 VARCHAR2(200);
  5 
  6  BEGIN
  7    PARAM1 := 'd:\comando.bat';
  8    PARAM2 := '@d:\kk.sql';
  9 
10    RetVal := EJECUTARPROCESOSORETURN ( PARAM1, PARAM2 );
11    dbms_output.put_line('RetVal: '||RetVal);
12    --ROLLBACK;
13  END;
14  /
RetVal: -102Could you please tell me what my problem is?

Similar Messages

  • Error in SQL script  generated from OWB 10.1.0.4.0 Metadata Export Bridge

    Hi... maybe i´m abusing this forum .. but .. when you have questions .. you have to look for answers
    I use OWB 10.1.0.4 to buid some dimensions and one cube. I validate and generate this object and the result was successful.
    I made the deployment and everithing goes OK !!!.
    The problem appears when i want to generate metadata over this objects. I use the option Project > Metadata > Export > Gridge and use the option "Oracle 9i OLAP" like the product where i want to transfer the metadata .. and i got the SQL script without any errors. I suppose that i take the sql script i run it into SQL*plus ... so i do it.. and i got this errors:
    declare
    ERROR at line 1:
    ORA-06501: PL/SQL: program error
    ORA-06512: at line 119
    ORA-06510: PL/SQL: unhandled user-defined exception
    The same error for any dimension in script..
    Any help .. will be fully valued for me ..
    best regards
    Lisandro.

    But how did you identify that there are no runtime records in all_rt_audit_executions for your PL/SQL procedure?
    I guess you tried to search by procedure name... (but what column you used for searching)
    In my case all_rt_audit_executions and wb_rtv_audit_executions contains the same number of records, so they should be always in sync.
    Oleg

  • Calling a sql script file from a function.

    Hi,
    I need to call a sql script file from a user defined function. Currently i am trying to do this in Oracle SQL Developer. i tried calling with
    @ {filename}, EXECUTE IMMEDIATE etc, but nothing worked. I get the Compiler error.
    Basically my need is to call catldap.sql file so that DBMS_LDAP package gets loaded and then I can call the API functions from this.
    Please let me know if this is possible doing in a PL/SQL function.
    thanks,
    Naresh

    user784520 wrote:
    I need to call a sql script file from a user defined function. Not possible.. and it seems that you do not fully understand the client-server within the Oracle context.
    All SQL and PL/SQL are parsed and executed by an Oracle server process. The SQL and PL/SQL engines each expects a single command block at a time. Neither of these can accept a series of separate commands as a single call and then execute each in turn. The SQL engine expects a single SQL statement at a time. The PL engine expects a single PL/SQL anonymous block at a time.
    This server process also cannot break into the local file system to access script files. Nor can it hack across the network to access script files on the client.
    In order for the server process to access local files, a directory object needs to be created and the current Oracle schema needs read and/or write access on that directory object. As sound security principles apply.
    There's no PL/SQL command to execute a script. You must not mistake SQL*Plus commands (this client has a very limited vocabulary) with PL/SQL commands. SQL*Plus executes its own commands.. and send SQL and PL/SQL commands (a statement block a time) to the Oracle server process to be serviced and executed.
    It is also a very bad idea to execute external script contents from inside an Oracle server process - as that script resides externally and thus outside Oracle's security mechanisms. This means that is is pretty easy for someone to access that script, compromise it, and then have you inject and execute the contents of that script into the database.
    It is not sound security.
    Last issue - it is even worse to have application PL/SQL code dynamically creating (or trying to create) portions of the Oracle data dictionary and PL/SQL call interface.
    The database needs to be installed correctly - and this includes loading and executing the required rdbms/admin scripts during database installation. It does not make sense at all for application code to try and execute such scripts. It raises numerous issues, including having to allow that application code full and unrestricted SYS access to the database instance. A very serious security violation.
    I do not agree at all with the approach you want to use.

  • Getting error message on ungrade install from itunes 10 to itunes 11

    getting error message on ungrade install from itunes 10 to itunes 11

    What does the error message say? (Precise text, please.)

  • Promt from user to proceed in case of error in sql script in sqlplus

    I am using Oracle 10g on Linux platform. I am executing a control.sql script from sqlplus from where i cam calling three *.sql scripts:
    control.sql
    SPOOL test.log
    SELECT 'Start of Control File at:'||systimestamp from dual;
    @00_create_table_scripts.sql
    @01_alter_table_scripts.sql
    @02_insert_scripts.sql
    SELECT 'End of Control File at:'||systimestamp from dual;
    SPOOL OFFI want that whenver there is an error in any of the three sql scripts, a prompt should be displayed asking the user if he wants to continue or not(Y/N). If he presses Y, then the remaining script shall be executed, otherwise execution should be stopped there.
    Can any body guide me how can i do this?
    Thanks.

    I want that whenver there is an error in any of the three sql scripts, a prompt should be displayed asking the user if he wants to continue or not(Y/N). If he presses Y, then the remaining script shall be executed, otherwise execution should be stopped there.If you have toad installed on your machine ,please run control.sql file from your machine .Toad will prompt an alert message saying that so and so error occurred and do you want to continue with that exception or not .
    Thanks,
    Prakash

  • Getting error while calling AME api from the page

    Hi,
    I am calling ame api ame_api2.getallapprovers7 from our custom page.I have written following code-
    public void getapprovers(String transactionid)
    String OutError = "";
    ArrayList al = new ArrayList();
    OADBTransaction trans = getOADBTransaction();
    String insStmnt = "BEGIN " +
    "ame_api2.getAllApprovers7(applicationIdIn => :1,transactionTypeIn =>:2,transactionIdIn =>:3,"+
    "l_processYN =>:4,approversOut =>:5); " +
    "END;";
    OracleCallableStatement stmt = (OracleCallableStatement)trans.createCallableStatement(insStmnt, 1);
    try
    stmt.setString(1, "800");
    stmt.setString(2, "XXXXCWKAPP");
    stmt.setString(3, transactionid);
    stmt.registerOutParameter(4, OracleTypes.VARCHAR);
    stmt.registerOutParameter(5, OracleTypes.ARRAY,"XXXX_APPROVER_TABLE");
    stmt.execute();
    // OAExceptionUtils.checkErrors as per PLSQL API standards
    OAExceptionUtils.checkErrors(trans);
    ARRAY arrayError = stmt.getARRAY(5);
    Datum[] arr = arrayError.getOracleArray();
    for (int i = 0; i < arr.length; i++)
    oracle.sql.STRUCT os = (oracle.sql.STRUCT)arr;
    Object[] a = os.getAttributes();
    System.out.println("Column:" + a[0] + " Value:" + a[1]);
    //OutError = (String)a[1];
    //al.add(new OAException(OutError, OAException.ERROR));
    stmt.close();
    catch(SQLException sqle){
    try { stmt.close(); }
    catch (Exception e) {;}
    throw OAException.wrapperException(sqle);
    if (OutError != null)
    // OAException.raiseBundledOAException(al);
    4 and 5th parameters are out parameters and 5th parameter provides the approver records and it should have the same data type as ame_util.approversTable2. I have created this table type explicitly in oracle by the name XXXX_APPROVER_TABLE but i am getting the error while running the page "java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: "APPS.ETHR_APPROVER_TABLE"". I requirement is to take the 5th parameter in ame_util.approversTable2 data type.
    Please help me urgently.
    Thanks
    Ashish

    Hi Kumar,
    The ETHR_APPROVER_TABLE is custom pl sql indexed table that I have created.following are the parameters of api-
    procedure getAllApprovers7(
    applicationIdIn in number,
    transactionTypeIn in varchar2,
    transactionIdIn in varchar2,
    approvalProcessCompleteYNOut out varchar2,
    approversOut out nocopy ame_util.approversTable2);
    i need a out variable of type ame_util.approversTable2 so get the values.
    I have changed the code and now getting the following error-
    java.sql.SQLException: ORA-03115: unsupported network datatype or representation
    I have only changed this statement.
    stmt.registerOutParameter(5,OracleTypes.PLSQL_INDEX_TABLE);//,"XXXX_APPROVAL_TBL");
    Edited by: user5756777 on Jul 13, 2009 4:17 AM

  • How to accept user inputs from  sql script

    I want to create Tablespace useing sql script , but the location of the data file I need accept from user . (to get the location of the data file ) .
    How can I accept user input from pl/sql .
    Example :
      CREATE TABLESPACE  TSPACE_INDIA LOGGING
         DATAFILE 'H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf'
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
         EXTENT MANAGEMENT LOCAL;here I need to accept location of the datafile from user ie : 'H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf'

    Hi,
    Whenenever you write dynamic SQL, put the SQL text into a variable. During development, display the variable instead of executing it. If it looks okay, then you can try executing it in addition to displaying it. When you're finished testing, then you can comment out or delete the display.
    For example:
    SET     SERVEROUTPUT     ON
    DECLARE
        flocation     VARCHAR2 (300);
        sql_txt     VARCHAR2 (1000);
    BEGIN
        SELECT  '&Enter_The_Path'
        INTO    flocation
        FROM    dual;
        sql_txt :=  'CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
         DATAFILE' || flocation || ' "\SRC_TSPACE_INDI_D1_01.dbf" ' || '
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
         EXTENT MANAGEMENT LOCAL ';
        dbms_output.put_line (sql_txt || ' = sql_txt');
    --  EXECUTE IMMEDIATE sql_txt;
    END;
    /When you run it, you'll see something like this:
    Enter value for enter_the_path: c:\d\fubar
    old   5:     SELECT  '&Enter_The_Path'
    new   5:     SELECT  'c:\d\fubar'
    CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
         DATAFILEc:\d\fubar
    "\SRC_TSPACE_INDI_D1_01.dbf"
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE
    UNLIMITED
         EXTENT MANAGEMENT LOCAL  = sql_txt
    PL/SQL procedure successfully completed.This makes it easy to see that you're missing a space after the keyword DATAFILE. There are other errrors, too. For example, the path name has to be inside the quotes with the file name, without a line-feed between them, and the quotes should be single-quotes, not double-quotes.
    Is there some reason why you're using PL/SQL? In SQL, you can just say:
    CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
    DATAFILE  '&Enter_The_Path\SRC_TSPACE_INDI_D1_01.dbf'
    SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL;though I would use an ACCEPT command to given a better prompt.
    Given that you want to use PL/SQL, you could assign the value above to sql_txt. If you need a separate PL/SQL variable for flocation, then you can assign it without using dual, for example:
    DECLARE
        flocation     VARCHAR2 (300)     := '&Enter_The_Path';The dual table isn't needed very much in PL/SQL.
    Edited by: Frank Kulash on Jan 10, 2013 6:56 AM

  • Runtime error on sql script

    Hi
    i have a filed start_time in table has NUMBER(38).the number is in seconds format. I am converting this into HH24:MI:SS filed.
    in sql, i have statement like this:
    to_char(to_date(start_time,'sssss'),'hh24:mi:ss')
    when i run script i am getting error ORA-01853: seconds in day must be between 0 and 86399           
    I think when start_time exceeds 24:00:00 time period. it is giving error. 1 days = 60*60*24=86400
    If it is bellow 23:59:59 it is working fine. How can i get to run this script evern if start time is more than 24 hours.
    pl help.
    thx, M.

    SQL> with t as (
      2             select 86400 + 1 start_time from dual union all
      3             select 86400 + 3600 + 55 * 60 from dual
      4            )
      5  select  start_time,
      6          trunc(start_time / 3600) ||
      7          to_char(trunc(sysdate)+numtodsinterval(start_time,'second'),':MI:SS')
      8    from  t
      9  /
    START_TIME TRUNC(START_TIME/3600)||TO_CHAR(TRUNC(SYSDATE)
         86401 24:00:01
         93300 25:55:00
    SQL> SY.

  • Urgently need help pls- error in sql

    hi everyone i need some help please. the error is :
    ("select title from book where resource_ID= (select resource_ID from
    resources where mem_ID='"+id+"')");     
    thanking u in advance
    here is the full program.
    <html>
    <head>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*"%>
    <%@ page import="java.util.*"%>
    </head>
    <body background="CLOTH003.GIF">
    <font face="comic sans ms" size="5">
    <br><br>
    <center>
    <center>
    <img border="0" src="search.JPG" width="107" height="30">
    <img border="0" src="edit.JPG" width="106" height="30">
    <img border="0" src="logout.JPG" width="95" height="30">
    <img border="0" src="help.GIF" width="105" height="30">
    <br>
    <br>
    <%
    // define database parameters
    String host="localhost:8080";
    String db="lsib";
    String optionSelected="";
    String conn;
    Statement createStatement = null;
    ResultSet rs = null;
    String user = "kushal";
    String pass = "";
    Class.forName("com.mysql.jdbc.Driver");
    // create connection string
    conn = "jdbc:mysql:" + host + "/" + db + "?user=" + user + "&password=" + pass;
    conn = "jdbc:mysql://localhost/LSIB";
    // pass database parameters to JDBC driver
    Connection Conn = DriverManager.getConnection(conn);
    // query statement
    Statement SQLStatement = Conn.createStatement();
    String id =request.getParameter("mem_ID");
    // generate query
    String sql="select name, fines,from member where mem_ID="+id;
    // get result
    rs= SQLStatement.executeQuery(sql);
    if (rs != null && rs.next() )
         String lname = rs.getString("name");
         int lfines = rs.getInt("fines");
         String ltitle = rs.getString("title");
    %>
         <form method="post" action="renew.jsp">
         <table border = "0" width="400">
         <tr>
         <td><b>hello</b></td><td><input name="logname" type="text" width="30" value="<%= lname           
    %>"></td>
         </tr>
         <tr>
         <td><b>you have a fine of �</b></td><td><input name="logfines" value="<%= lfines
    %>"></td>      
         </tr>
    <tr>
    <td><b>your resources on loan</b></td><td><select name="logtitle">
    <%
    rs= SQLStatement.executeQuery("select title from book where resource_ID= (select resource_ID from
    resources where mem_ID='"+id+"')");     
    if (rs != null)
         while (rs.next()) {
         String title = rs.getString("title");
         if(ltitle==title)
              optionSelected =" selected";
         else
              optionSelected="";
    %>
         <option value='<%= title %>' <%=optionSelected %>>
    <%
         }//end of while
    }//end of if
    %>
    </select></td>
    </tr>
    <tr>
         <td colspan = "2">
              <center>
                   <input type="submit" value=" renew ">
              </center>
         </td>
         </tr>
    </form>
    <%
    else
    out.println("No records found");               
    // close connection
    rs.close();
    SQLStatement.close();
    Conn.close();
    %>
    </table>
    </body>
    </html>

    hi here is the error:
    Error: 500
    Location: /LSIB/login.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: Syntax error or access violation: You have an error in your SQL syntax near 'from member where mem_ID=830099' at line 1
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
         at login_2._jspService(login_2.java:188)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source)
         at org.apache.jasper.runtime.PageContextImpl.forward(Unknown Source)
         at validate_7._jspService(validate_7.java:121)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
         at org.apache.tomcat.core.ContextManager.service(Unknown Source)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:484)
    Root cause:
    java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near 'from member where mem_ID=830099' at line 1
         at com.mysql.jdbc.MysqlIO.sendCommand(Unknown Source)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
         at com.mysql.jdbc.MysqlIO.sqlQuery(Unknown Source)
         at com.mysql.jdbc.Connection.execSQL(Unknown Source)
         at com.mysql.jdbc.Connection.execSQL(Unknown Source)
         at com.mysql.jdbc.Statement.executeQuery(Unknown Source)
         at com.mysql.jdbc.jdbc2.Statement.executeQuery(Unknown Source)
         at login_2._jspService(login_2.java:100)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source)
         at org.apache.jasper.runtime.PageContextImpl.forward(Unknown Source)
         at validate_7._jspService(validate_7.java:121)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
         at org.apache.tomcat.core.ContextManager.service(Unknown Source)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:484)

  • Executing .sql scripts file from command prompt

    I had created the .sql scripts for
    --Create Database
    --Create tables
    --Create Stored procedure
    I am using SQL server 2008.
    Now i want to deploy it into the target server using the command prompt.
    How can I call to execute that script on the target server?

    with few errors as "Incorrect Syntax near "GO"".
    Hello,
    GO is a command, which is only known & interpretted by SSMS + SqlCmd.exe; SQL Server engine / data access components don't know this command, therefore you get an error.
    See
    Query Options Execution (General Page); for SSMS you can change it from GO to any other term.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Getting error while opening Excel document from SharePoint site

    Hello All,
    I am getting following error while opening Excel document from SharePoint site.
    This issue appears when we open Excel document from Windows>> Run using below mentioned command:
    Excel.exe "{File Name}"
    If once I go to Excel back stage and browse for the SharePoint location, then this problem disappears.
    I have a work around for this issue but main problem is that i do not have any work around when i need to open Exel document using Excel COM interop in C#.
    Thanks,
    Amit Bansal
    Amit Bansal http://www.oops4you.blogspot.com/

    Hi Amit Bansal,
    Thanks for posting in MSDN forum.
    This forum is for developers discussing developing issues involve Excel application.
    According to the description, you got an error when you open the document form SharePoint site.
    Based on my understanding, this issue maybe relative to the SharePoint, I would like move it to
    SharePoint 2013 - General Discussions and Questions forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting Error while Execute SSIS Package from Console Application

    Dear All,
    SSIS package working fine directly.
    I got following error while execute SSIS package from C# console application.
    The connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
    Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
    in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
    OLE DB Destination failed validation and returned error code 0xC004800B.
    One or more component failed validation.
    There were errors during task validation.
    Code : 
       public static string RunDTSPackage()
                Package pkg;
                Application app;
                DTSExecResult pkgResults;
                Variables vars;
                app = new Application();
                pkg = app.LoadPackage(@"D:\WORK\Package.dtsx", null);
         Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = pkg.Execute();
    I have recreate the application with again new connection in SSIS.
    Still not working, Please provide solution if any one have.
    DB : SQL Server 2008 R2
    Thanks and regards,
    Hardik Ramwani

    The connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
    Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
    in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
    Are you sure that you are running the same package via .NET which works fine from Visual Studio?
    By reading error message, I can say that you have copied OLEDB task from another package OR you have deleted one OLEDB connection manager. Now when package is run this task tries to use the connection manager and not found thus throws error message.
    Open all OLEDB destination tasks and you find connection manager missing. Connection Manager name should be provided there
    Cheers,
    Vaibhav Chaudhari
    MCSA - SQL Server 2012

  • Getting error "Cannot create a BACPAC from a file that does not contain exported data." from SqlManagementClient.Dac.ImportAsync

    We're trying to import a dacpac to azure via the new SqlManagementClient DacOperations ImportAsync api I get an exception with the error: "Cannot create a BACPAC from a file that does not contain exported data."
    This same dacpac imports fine using an alternate but less friendly API from sql server's tooling. We'd like to use the new management SDK instead for various reasons.

    Hi Kyle A Wilt,
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Getting error with SQL statement

    Hi I am getting these error java.sql.SQLException: Non supported SQL92 at the time time of executing the query.
    select distinct state from cities where country = ${COUNTRY}
    this query is using in my JasperReport tool. Why I am getting this error could any one tell me solution for this error.

    These two articles could also help you...
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/sql_parameters.html
    http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/2/queryeditor.html
    Regards,
    Sakthi

  • Exiting from SQL script

    Hi,
    How do you exit from an sql script?
    e.g
    DECLARE
    VAR1 = VARCHAR2(10);
    VAR2 = VARCHAR2(10);
    BEGIN
    VAR1 := 'hello';
    VAR2 := 'world';
    IF VAR1 != VAR2
    THEN
    DBMS_OUTPUT.PUT_LINE('Variables not equal');
    ## Exit here! <------- HOW?????
    END IF;
    END;
    Cheers,
    Warren

    If I understand correctly, you have a series of anonymous PL/SQL blocks in a script. If some test fails in one of them, then you do not want to run the rest of the script.
    If exiting sqlplus is an acceptable means of failing, then you can do something like:
    WHENEVER SQLERROR EXIT 1;
    DECLARE
    v1 VARCHAR2(20);
    v2 VARCHAR2(20);
    BEGIN
       v1 := 'ABCDE';
       v2 := 'FBCDE';
       IF v1 <> v2 THEN
          DBMS_OUTPUT.Put_Line('Variables Not Equal');
          RAISE NO_DATA_FOUND;
       END IF;
    END;
    DECLARE
    v3 VARCHAR2(20);
    BEGIN
       v3 := 'Second Block';
    END;
    /in your script. As shown, the script will exit sqlplus without executing the second block. You can use any sql error instead of no data found.
    Another possibility if exiting sqlplus is not acceptable would be to do something like this in your script:
    VARIABLE failed NUMBER;
    DECLARE
    v1 VARCHAR2(20);
    v2 VARCHAR2(20);
    BEGIN
       :failed := 0;
       v1 := 'ABCDE';
       v2 := 'FBCDE';
       IF v1 <> v2 THEN
          DBMS_OUTPUT.Put_Line('Variables Not Equal');
          :failed := 1;
          RETURN;
       END IF;
    END;
    DECLARE
    v3 VARCHAR2(20);
    BEGIN
       IF :failed = 0 THEN
          v3 := 'Second Block';
       END IF;
    END;
    /Note, the IF :failed = 0/END IF block should cover all the code in each subsequent anonymous block.
    A third approach would be to re-write the series of anonymous blocks as a package, then create a small driver script to call each procedure in turn unless one returns an error.
    TTFN
    John

Maybe you are looking for

  • Save as JPG problem?

    Hi, I have recently been bugged by a problem when saving as JPG. I go through my usual workflow, convert my file to 8bits sRGB, then "save as", select JPG from the drop down, goto my folder and click save. I get the quality dialogue, select 12, hit s

  • Very slow copying text from microsoft word

    Any idea why copying text from word (office 2004) should be v slow? Copying same text in OS9 no problem (am currently copying text from client supplied documents into other applications ie. Quark, so having to go to another machine running previous O

  • How do I get the windows after effects update to complete without error?

    I run windows 7 home professional. I have CC installed.  Things are fine except for After Effects. I get an update available and attempt to install it. I have removed after effects, run the adobe cleaner, reinstalled, and still get the update availab

  • Post subject: cannot apply filter to the report element

    Hi All, I have a report that has checkbox Input Controls. when the user is viewing the report and try to manuplate the input controls its throwing an error saying cannot apply filter to the report element: DP0.DO1e5 I tried to do the same with an adm

  • Setting a default application

    Hello, every time I double-click on a .doc file it automatically opens in Word 2008 instead of Word 2004. - I have selected a .doc file and hit "get info" then selected "Open this with..." and chose Word 2004. Then I hit the button under it that says