JDBC gives error if accessing Package Synonym

Calling a stored procedure in a package using JDBC...
Where we are using a synonym for our package (given all permissions are OK - I've even tried SYSDBA) rather than calling procedures directly in the package, we get the error 'table or view does not exist'.
This error only occurs for procedures in the package which return ref cursor type (i.e. a recordset), otherwise the procedure seems to execute fine.
The same procedures can happily be used via ODBC and OLEDB using the synonym, so I suspect it is JDBC at fault.
We do need to use a synonym (I like to keep nice clean tidy schemas!) so if anyone knows how to get around it or whether the bug will be fixed shortly please let us know.
Regards
Jason.
null

Hi,
Returning refcursors from Java stored proc feature is planned for JDBC 8.2.
Hope this helps,
-Kishore

Similar Messages

  • JDBC - CallableStatement - Error in Accessing Stored Procedure of MS SQL

    Dear Friends,
    The following is the code to access a stored procedure of MS SQL Server 7.0 sp4,
              try
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall("{call backupdb[?,?]}");
                   cstmt.setString("db_name","SBIREMITLIVE");
                   cstmt.setString("path", "c:\testing.bak");
                   cstmt.executeQuery();
                   System.out.println("Stored Procedure called successfully");
              catch(SQLException se)
                   System.out.println(se.toString());
    when i execute this i am getting the error as " MS ODBC-MS SQL Server Syntax error or Access Violation "
    What's the problem exactly ? anybody came across this issue..if so...kindly help me....
    Here is my MS SQL Server stored procedure.....for reference
    create procedure backupdb(@db_name varchar(40), @path varchar(100)) as
    Backup database @db_name to disk = @path
    Regards,
    V.Prasanna

    Dear DigitalDreamer,
    Yes, as per your suggestion, it's working fine...thanks a lot...
    here is the code...
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall(" exec backupdb ?,? ");
                   cstmt.setString(1,"SBIREMITLIVE");
                   cstmt.setString(2, "c:\\testing.bak");
                   cstmt.execute();
    Regards,
    V.Prasanna

  • Loading big XML files using JDBC gives errors

    Hi,
    I've created a XMLType table using binary storage, with the restriction that any document stored has a (any) schema:
    CREATE TABLE XMLBIN OF XMLTYPE
    XMLTYPE STORE AS BINARY XML
    ALLOW ANYSCHEMA;Then I use JDBC to store a relatively large document using the following code:
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    String connectionString = "jdbc:oracle:thin:@host:1521:sid";
    File f = new File("c:\\temp\\big.xml");
    Connection conn = DriverManager.getConnection(connectionString, "username", "password");
    XMLType xml = XMLType.createXML(conn,new FileInputStream(f));
    String statementText = "INSERT INTO xmlbin VALUES (?)";
    OracleResultSet resultSet = null;
    OracleCallableStatement statement = (OracleCallableStatement)conn.prepareCall(statementText);
    statement.setObject(1,xml);
    statement.execute();
    statement.close();
    conn.commit();
    conn.close();Loading a file of 61Mb (real Mb, in non-IT Mb (where 1Mb seems to be 10^6) it is 63.9Mb) or less doesn't give any errors, loading a file bigger then that gives the following error:
    java.sql.SQLRecoverableException: Io exception: Software caused connection abort: socket write error
            at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101)
            at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:458)
            at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:960)
            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
            at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3482)
            at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3856)
            at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1373)
            at jdbctest.Tester.main(Tester.java:60)A succesful insert of a 63Mb file takes about 23 seconds to execute. The 70Mb file fails already after a few seconds, so I'm ruling out any time outs.
    I'm guessing there are some buffers that need to be enlarged, but don't have a clue which ones.
    Anyone any idea what might cause the problem and how to resolve?
    My server runs Oracle 11g Win32. The client is Windows running Sun Java 1.6, using ojdbc6.jar and Oracle 11g Client installed.
    Cheers,
    Harald

    Hi Mark,
    The trace log in the OEM shows me:
    Errors in file d:\oracle11g\app\helium\diag\rdbms\helium\helium\trace\helium_ora_6948.trc  (incident=7510): ORA-07445: exception encountered: core dump [__intel_new_memcpy()+613] [ACCESS_VIOLATION] [ADDR:0x0] [PC:0x6104B045] [UNABLE_TO_WRITE] []  If needed I can post the full contents (if I find out how, am still a novice :-))
    Cheers,
    Harald

  • SP which returns error cannot access rows from a non-nested table item.

    Dear Experts
    I have an SP which gives error " cannot access rows from a non-nested table item ". But here the strange thing is, it works fine with one query. But I write union query with another table, only then it gives error.
    CREATE OR REPLACE PROCEDURE SP_MONTHLYSALESUMMARY (
    P_TRANSACTIONMONTH VARCHAR2,
    P_LEDGERID VARCHAR2,
    O_RESULTSET OUT TYPES.CURSORTYPE)
    AS
    BEGIN
    OPEN O_RESULTSET FOR
    -- POINT OF SALE
    SELECT
    L.DESCRIPTION LEDGERNAME,
    LS.DESCRIPTION LEDGERSUBGROUPNAME,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO
    AS ID,
    C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
    SUM(CASE
    WHEN PB.EMPLOYEE_ID IS NOT NULL
    AND T.ISCREDITTRANSACTIONMODE = 2
    THEN
    PB.TAXAMOUNT
    ELSE
    0
    END)
    EMPLOYEEDEBITCARDTAXAMOUNT,
    L.PRINTNO
    FROM POINTOFSALEBILL PB
    INNER JOIN POINTOFSALEBILLDETAIL PD
    ON PB.POINTOFSALEBILL_ID = PD.POINTOFSALEBILL_ID
    INNER JOIN TRANSACTIONTYPE TY
    ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
    INNER JOIN TRANSACTIONMODE T
    ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
    INNER JOIN LEDGER L
    ON L.LEDGER_ID = PD.LEDGER_ID
    INNER JOIN LEDGERSUBGROUP LS
    ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
    LEFT JOIN CORPORATE C
    ON C.CORPORATE_ID = PB.CORPORATE_ID
    LEFT JOIN EMPLOYEE E
    ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
    LEFT JOIN AFFILIATEMEMBER AF
    ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
    LEFT JOIN MEMBER M
    ON M.MEMBER_ID = PB.MEMBER_ID
    WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
    AND (P_TRANSACTIONMONTH IS NULL
    OR P_TRANSACTIONMONTH =
    TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
    AND (P_LEDGERID IS NULL
    OR L.LEDGER_ID IN
    ( (SELECT COLUMN_VALUE
    FROM TABLE(GET_ROWS_FROM_LIST1 (
    P_LEDGERID,
    GROUP BY L.DESCRIPTION,
    LS.DESCRIPTION,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO,
    C.NAME || E.NAME || AF.NAME || M.NAME,
    L.PRINTNO;
    END SP_MONTHLYSALESUMMARY;
    GET_ROWS_FROM_LIST1 is a function, which i am using to pass " IN " to oracle. There is no problem with this, since it works fine with one query
    REATE OR REPLACE FUNCTION BCLUB1868.GET_ROWS_FROM_LIST1
    (L IN LONG DEFAULT NULL, SEP IN VARCHAR2 DEFAULT ',')
    RETURN MYVARCHARTABLE1 PIPELINED
    AS
    L_POS INT := 1;
    L_NEXT INT;
    L_PART VARCHAR(500);
    BEGIN
    SELECT INSTR( L, SEP, L_POS) INTO L_NEXT FROM DUAL;
    WHILE (L_NEXT>0)
    LOOP
    SELECT SUBSTR(L, L_POS, L_NEXT - L_POS) INTO L_PART FROM DUAL;
    PIPE ROW(L_PART);
    SELECT L_NEXT + 1, INSTR( L, SEP, L_POS)
    INTO L_POS, L_NEXT FROM DUAL;
    END LOOP;
    SELECT SUBSTR(L, L_POS) INTO L_PART FROM DUAL;
    PIPE ROW(L_PART);
    RETURN;
    END;
    Request help from you all experts in the forum

    Here it is
    CREATE OR REPLACE PROCEDURE SP_GRCS (
    P_TRANSACTIONMONTH VARCHAR2,
    P_LEDGERID VARCHAR2,
    O_RESULTSET OUT TYPES.CURSORTYPE)
    AS
    BEGIN
    OPEN O_RESULTSET FOR
    -- Point of sale
    SELECT *
    FROM ( SELECT L.DESCRIPTION LEDGERNAME,
    LS.DESCRIPTION LEDGERSUBGROUPNAME,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO
    AS ID,
    C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
    SUM(CASE
    WHEN PB.EMPLOYEE_ID IS NULL
    AND T.ISCREDITTRANSACTIONMODE = 1
    THEN
    PB.BILLAMOUNT
    ELSE
    0
    END)
    MEMBERDEBITAMOUNT,
    L.PRINTNO
    FROM POINTOFSALEBILL PB
    INNER JOIN POINTOFSALEBILLDETAIL PD
    ON PB.POINTOFSALEBILL_ID = PD.POINTOFSALEBILL_ID
    INNER JOIN TRANSACTIONTYPE TY
    ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
    INNER JOIN TRANSACTIONMODE T
    ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
    INNER JOIN LEDGER L
    ON L.LEDGER_ID = PD.LEDGER_ID
    INNER JOIN LEDGERSUBGROUP LS
    ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
    LEFT JOIN CORPORATE C
    ON C.CORPORATE_ID = PB.CORPORATE_ID
    LEFT JOIN EMPLOYEE E
    ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
    LEFT JOIN AFFILIATEMEMBER AF
    ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
    LEFT JOIN MEMBER M
    ON M.MEMBER_ID = PB.MEMBER_ID
    WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
    AND (P_TRANSACTIONMONTH IS NULL
    OR P_TRANSACTIONMONTH =
    TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
    AND (P_LEDGERID IS NULL
    OR L.LEDGER_ID IN
    ( (SELECT COLUMN_VALUE
    FROM TABLE(GET_ROWS_FROM_LIST1 (
    P_LEDGERID,
    GROUP BY L.DESCRIPTION,
    LS.DESCRIPTION,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO,
    C.NAME || E.NAME || AF.NAME || M.NAME,
    L.PRINTNO
    UNION ALL
    -- Guest Registration
    SELECT L.DESCRIPTION LEDGERNAME,
    LS.DESCRIPTION LEDGERSUBGROUPNAME,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO
    AS ID,
    C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
    SUM(CASE
    WHEN PB.EMPLOYEE_ID IS NULL
    AND T.ISCREDITTRANSACTIONMODE = 1
    THEN
    PB.BILLAMOUNT
    ELSE
    0
    END)
    MEMBERDEBITAMOUNT,
    L.PRINTNO
    FROM GUESTREGISTRATION PB
    INNER JOIN GUESTREGISTRATIONDETAIL PD
    ON PB.GUESTREGISTRATION_ID = PD.GUESTREGISTRATION_ID
    INNER JOIN TRANSACTIONTYPE TY
    ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
    INNER JOIN TRANSACTIONMODE T
    ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
    INNER JOIN LEDGER L
    ON L.LEDGER_ID = PD.LEDGER_ID
    INNER JOIN LEDGERSUBGROUP LS
    ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
    LEFT JOIN CORPORATE C
    ON C.CORPORATE_ID = PB.CORPORATE_ID
    LEFT JOIN EMPLOYEE E
    ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
    LEFT JOIN AFFILIATEMEMBER AF
    ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
    LEFT JOIN MEMBER M
    ON M.MEMBER_ID = PB.MEMBER_ID
    WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
    AND (P_TRANSACTIONMONTH IS NULL
    OR P_TRANSACTIONMONTH =
    TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
    AND (P_LEDGERID IS NULL
    OR L.LEDGER_ID IN
    ( (SELECT COLUMN_VALUE
    FROM TABLE(GET_ROWS_FROM_LIST1 (
    P_LEDGERID,
    GROUP BY L.DESCRIPTION,
    LS.DESCRIPTION,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO,
    C.NAME || E.NAME || AF.NAME || M.NAME,
    L.PRINTNO)
    ORDER BY PRINTNO;
    END SP_GRCS;
    I have even tried adding L.Ledger_ID in select statement.

  • Access Denied Error:5 Adding Package to .WIM with DISM

    I am trying to add .CAB packages to a custom .wim file.  I am able to mount the image, but upon trying to add .cab packages to the image, it gives me an error like:
    An error occurred - Package_for_KB2588516 Error:  0x80070005
    Error:  5
    Access is denied.
    Here is a segment of the DISM.log.  I can post the full Logfile if needed.  I am running the command prompt with elevated privileges.
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: LastError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: LastError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to persist status for package: Package_for_KB2588516~31bf3856ad364e35~x86~~6.1.1.1 [HRESULT = 0x80070005
    - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: ExtendedError [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to query sources for package: Package_for_KB2588516~31bf3856ad364e35~x86~~6.1.1.1 [HRESULT = 0x80070005
    - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to persist package: Package_for_KB2588516~31bf3856ad364e35~x86~~6.1.1.1. [HRESULT = 0x80070005 -
    E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete registry value: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]
    2012-02-10 11:58:45, Info                  CBS    Failed to delete store object value named: LastProgressState [HRESULT = 0x80070005 - E_ACCESSDENIED]

    Hi,
    If you plan on using DISM to install a .cab file, it is recommended that you use the WUSA.exe tool to extract the files to a directory first.
    Make sure that the permission setting of the temp folder that save the mounted image allows the user to modify.
    Make sure that you run the command lines in a prompt window with Administrator privilege.
    If the issue persists, you’d better consider to change with another image.
    The following operating-system-package servicing options are available for a mounted offline image:
    DISM.exe /image:<path_to_mounted_image_directory> [/Get-Packages | /Get-PackageInfo | /Add-Package | /Remove-Package ] [/Get-Features | /Get- FeatureInfo | /Enable-Feature | /Disable-Feature ]
    The following operating system package servicing options are available for a running operating system:
    DISM.exe /online [/Get-Packages | /Get-PackageInfo | /Add-Package | /Remove-Package ] [/Get-Features | /Get-FeatureInfo | /Enable-Feature | /Disable- Feature ]
    Pay attention to the following please.
    1. You cannot use a network share location as a scratch directory to expand a package (.cab or .msu file) for installation. The directory used for extracting files for temporary usage during servicing must be a local directory.
    2. If subsequent actions are requested, they cannot be processed until the previous pending online action is completed.
    3. If a package is in the “installed requested” state and then you stage the package, the package state is set to “uninstall requested”. This is because it must be uninstalled before it can be staged.
    4. Some packages require other packages to be installed first. Because of this dependency requirement, you should use an answer file if you are installing multiple packages.
    Hope that helps.

  • While installing itunes i am getting error "this installation package could not be opened.verify that the package exists and that you can access it,or contact the appliacation vendor to verify that this is a valid windows installer package"

    While installing itunes i am getting error "this installation package could not be opened.verify that the package exists and that you can access it,or contact the appliacation vendor to verify that this is a valid windows installer package"

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • How to fix error: This installation package could not be opened. Verify that the package exists and that you can access it, or contact the applikcation vendor to verify that this is a valid Windows Installer package."

    ERROR: This installation package could not be opened. Verify that the package exists and that you can access it, or contact the applikcation vendor to verify that this is a valid Windows Installer package." I have tried everything which I found on google and apple community. Does anybody have the exact solution? PLEASE HELP!

    What has this to do with the application Front Row which this forum covers?
    What are you trying to install, on what Mac, with what version of OS X?

  • JDBC driver error to connect to an MS Access DB

    Hi All,
    We have created a file to JDBC scenario on XI 3.0. My XI server is on a Linux server and the db the receiver CC is trying to connect to is an MS Access 2007.
    The CC parameters are configured as follow:
    JDBC Driver: jdbc.odbc.JdbcOdbcDriver
    Connection: jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=
    xxxxxx\xxxxx\Test.mdb
    On the communication monitoring we are getting the following error message:
    Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=
    xxxxxx\xxxxx\Test.mdb': java.lang.NullPointerException
    In regards with the above message and after reviewing several posts, I have two questions I would like to confirm with you:
    a- Do I have to perform a JDBC driver deployment to connect to a MS Access DB? If so, which one.
    b- Is there a suitable JDBC driver on Linux to connect to a MS Access DB? If there is not such a driver, Is there any available workaround for this?
    Please, let us know your recommendations about this or what I should check to identify the cause of the above error.
    Thanks and best regards

    Hi All, in order to discard any possible issue between Linux and MS access connection, we are currently in the process on configuring a J2SE Plain Adapter Engine on a Windows environment. However, after configuring a JDBC receiver scenario we are getting the following error message in the adapter logs:
    Classname=com.sap.aii.messaging.adapter.ModuleXMB2DB
    Version=30
    Mode=XMB2DB_XML
    XI.httport=xxxx
    XI.httpService=/db/receiver
    db.jdbcDriver=sun.jdbc.odbc.JdbcOdbcDriver
    db.connectionURL=jdbc:odbc:Driver={Microsoft Acces Driver (*.mdb)};=<Path to the mdb file>
    Error log
    15:50:23 (4311): ERROR: Attempt to access JDBC connection failed with "[Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented"
    Attempt to initialize JDBC adapter failed
    15:50:23 (4340): JDBC adapter initialized with database error. Proceed
    15:50:23 (4303): JDBC adapter listener started
    Then, the Mode parameter was changed to XMB2DB and the error log is as follow:
    15:36:14 (4315): ERROR: Attempt to initialize transform class com.sap.aii.messaging.adapter.Payload2DBBinding  failed with exception com.sap.aii.messaging.adapter.trans.TransformException: Error 'com.sap.aii.messaging.adapter.trans.TransformException: Error: Parameter 'db.table' missing' initializing class payload2DBBinding
    15:36:14 (4304): Unable to start JDBC adapter (not initialized)
    According to our scenario the required mode would be XMB2DB_XML. Could you please let us know the cause of the u201COptional feature not implementedu201D error message is?
    The following data may be helpful:
    OS version: Windows 2003 Server SP2
    JRE (1.6.0_16-b01)
    Weu2019ll wait for your recommendations.
    Thanks and best regards

  • Trying to execute a stored procedure gives: Syntax error or access violatio

    Hi,
    I have a stored procedure that runs fine in sqplus:
    EXEC load_image('distribuido.JPG', '1');
    When i try to execute it in PHP it gives me this error:
    [Oracle][ODBC]Syntax error or access violation.
    In php i'm using ODBC functions, with the same user configured in dsn. The sql i run in php is 100% equal...
    What's the problem and how should i run this procedure in php (or maybe grant more privileges to this user??)
    The procedure is:
    CREATE OR REPLACE PROCEDURE load_image( filename VARCHAR2, vid_membro INTEGER )
    AS
    file_lob BFILE;
    binary_lob BLOB;
    mime_type fotografia.foto_tipo%type;
    extension_pos NUMBER;
    BEGIN
    extension_pos := INSTR( filename, '.' );
    mime_type := 'image/' || SUBSTR( filename,
    extension_pos + 1,
    LENGTH( filename ) );
    INSERT INTO fotografia (id_foto, id_cat, id_membro, nota_media, num_votos, foto_tipo, fotografia)
    VALUES (fotografias_id.nextval, 1, vid_membro, 0, 0, mime_type, empty_blob())
    RETURNING fotografia INTO binary_lob;
    file_lob := BFILENAME( 'IMAGES', filename );
    dbms_lob.fileOpen ( file_lob, dbms_lob.file_readOnly );
    dbms_lob.loadFromFile( binary_lob,
    file_lob,
    dbms_lob.getLength( file_lob ) );
    dbms_lob.fileClose ( file_lob );
    END;
    /

    'exec' is an sqlplus directive. If you run this query in PHP, try:
    $query = "BEGIN
    load_image('distribuido.JPG', '1');
    END;";
    (you may have to remove the ; after 'END')

  • I tried updating iTunes to version 11.1.1, but installation fails each time even when I did it manually as was suggested.  The message I receive is: "The installer has encountered an unexpected error installing this package.  This may indicate a problem"

    I tried updating iTunes to version 11.1.1, but installation fails each time even when I did it manually as was suggested.  The message I receive is: "The installer has encountered an unexpected error installing this package.  This may indicate a problem with this package.  The error code is 2324."

    Hi hongkongpom,
    Just wanted to say that after posting the problem, I had a chat with an iTunes' Tech Support, her name is Rebekah.  My problem was resolved after that.  Will list the chat history below in hopes that it may help you as well.
    Good luck!
    Samia  
    Chat Transcript
    Friday, October 4, 2013 05:55 AM
    Duration: 81 minutes 28 seconds
    Rebekah:
    Welcome to AppleCare chat support. Please give me a moment to look over your information.
    Rebekah:
    Hi, Samia! My name is Rebekah. If we get disconnected, please chat us back. http://www.apple.com/support/ipod/contactEnter the case number from the initial email we sent you. This gives the next advisor you chat with immediate access to your case history.
    Rebekah:
    Could you please confirm your serial number? I want to be sure we provide the best service possible for you, Samia!
    SAMIA:
    Sure, it's 8L8395UY2C5
    SAMIA:
    My problem is with iTunes.
    Rebekah:
    Thanks for that confirmation. Just a heads up, this is iOS Tech Support. We do support iPod touches, iPads, and iPhones, but not the iPod classic. But no worries! I can get you in touch with a phone Advisor who can get you in touch with the department that specializes in iPod classics and would be able to better assist you. Would that be OK?
    SAMIA:
    I wasn't able to install the new version of iTunes (version 11.1.1). The installation keeps failing. The they suggested the I install it manually and that failed too. I will attach the message I received.
    SAMIA:
    I don't have a problem with iPod.
    SAMIA:
    Just iTunes
    Rebekah:
    No problem! We can certainly troubleshoot iTunes as much as possible. It may come to the point that you may have to transferred, but we can do as much as possible during this chat!
    Rebekah:
    Thanks for the screenshot. It is a bit small so I am unable to fully see the message that you are receiving. What is the error message you are receiving?
    SAMIA:
    This is the message I received in case you weren't able to open the attachment: "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2324."
    Rebekah:
    Thanks for that info!
    SAMIA:
    Pleasure!
    Rebekah:
    What version of Windows (XP, Vista, 7) do you have?
    SAMIA:
    Windows 7
    SAMIA:
    Windows 7 Home Premium
    Rebekah:
    Thanks for that confirmation. I do apologize for the delay, Samia. I am researching this error code now. You mentioned trying to install iTunes manually. To be sure I am on the same page, what steps did you take to do that?
    SAMIA:
    Well when the indsatalltion failed I was given instructions to select Download Only from Tools and then install manually. When I did it, I window popped up with the following items: - AppleApplicationSupport
    SAMIA:
    - AppleMobileDeviceSupport64
    SAMIA:
    - Bonjour64
    SAMIA:
    iTunes64
    SAMIA:
    SetupAdmin
    SAMIA:
    I selected Repair in all of them instead of Remove and all worked but iTunes64
    SAMIA:
    That's when I received the message that I sent you earlier.
    SAMIA:
    By the way, this is the fir st time something like this occured. I never had problems with installation before.
    Rebekah:
    I completely understand what you're saying. Since that Repair did not resolve the issue, our best option is to uninstall iTunes and its components and redownload it. To do this, we will follow the steps in this article: Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    Rebekah:
    First, we will want to quit iTunes and/or Apple Software Update if those are open at this time.
    SAMIA:
    Rebekah, the instructions you gave says, "For Windows XP, follow these steps to remove and reinstall iTunes and other software components for Windows XP."
    SAMIA:
    I closed all applications
    SAMIA:
    Also, my iTunes doesn't open anymore after the new failed installation.
    Rebekah:
    The section that says "For Windows XP…" is in case we opened up the wrong article, as we have the one for Windows Vista, 7, or 8. There is a link to click ("these steps") in those directions that would take us to the article for uninstalling on a Windows XP.
    Rebekah:
    So no worries! We have the right article!
    Rebekah:
    On the computer, we will want to click on Start > Control Panel. In Control Panel, we will click the "Uninstall a program" link.
    SAMIA:
    I thought so after doing a little exploration.
    SAMIA:
    done
    Rebekah:
    Alright, we'll want to select iTunes from the list of currently installed programs. Then we will click Uninstall. When asked if you would like to remove iTunes, let's click Yes.
    Rebekah:
    After the uninstallation is complete, we don't want to restart your computer if you're prompted.
    SAMIA:
    Done
    Rebekah:
    Then if you see other iTunes entries on the list, we'll want to remove them the same way.
    Rebekah:
    Then we will remove all instances of Apple Software Update the same way you removed iTunes.
    SAMIA:
    Okay, but do I have to remoce iCloud as well?
    SAMIA:
    Rebekah, I received the same error message again when uninstalling
    Rebekah:
    We actually do not need to remove iCloud. After the Apple Software Update, we will want to remove all instances of Apple Mobile Device Support
    Rebekah:
    How strange! Are you able to click past that and allow the process to continue or has it stopped it completely?
    SAMIA:
    I am unable to uninstall iTunes either
    SAMIA:
    Stopped completely
    SAMIA:
    I treied clicking Repair
    Rebekah:
    Alright, after trying the Repair option, let's see if it will allow us to continue uninstalling or not.
    SAMIA:
    I tried that but unfortunately, it isn't working. I still get that same message with error code 2324.
    Rebekah:
    This error code is not something that I am finding in my sources, Samia. So there is a chance that it is being caused with the Windows computer itself. However, I did find a link that may be able to help with uninstalling iTunes from Windows' support site: http://support.microsoft.com/mats/Program_Install_and_Uninstall
    SAMIA:
    Rebekah, you're a genius! It worked! iTunes is no longer there. What next?
    Rebekah:
    Awesome! I'm glad that worked!
    Rebekah:
    To be sure I am on the same page, what was the last component we uninstalled?
    SAMIA:
    iTunes
    SAMIA:
    Shall I remove the Apple Application Support, Apple Mobile Device Support, and Apple Software Update
    Rebekah:
    That is correct! However, we do want to uninstall it in the order I mentioned above. So Apple Software Update first, Apple Mobile Device Support next, and then Apple Mobile Device Support.
    SAMIA:
    Got it, but is the second one to uninstall Apple Mobile Device Support OR Apple pplication Support?
    Rebekah:
    The second one is Apple Mobile Device Support.
    Rebekah:
    The Application Support will be the last component we uninstall.
    SAMIA:
    Thanks! I'm on it.
    SAMIA:
    Done! ll 3 are gone, well 4 with iTunes. Now what?
    Rebekah:
    Awesome! Also, I just noticed that I accidentally typed Apple Mobile Device Support twice, I do apologize for any confusion! Now we will remove all instances of Bonjour and then remove all instances of Apple Application Support.
    SAMIA:
    There was only 1 instance with Bonjour. I don't know what the instances are for Apple Application Support
    Rebekah:
    Yes, Bonjour is often only listed once. Is the Apple Application Support listed at all?
    SAMIA:
    No
    SAMIA:
    Since I removed it
    Rebekah:
    Oh, perfect! If it was removed, we should be set!
    Rebekah:
    We have removed iTunes and its components now! From here, our next step is to restart the computer. Then once you reboot, you can redownload iTunes from apple.com/itunes
    Rebekah:
    That should allow you to download iTunes!
    SAMIA:
    Shall I downloaad the latest vesion?
    Rebekah:
    You will want to first restart the computer as shown in the article. That will ensure that this process goes smoothly and that everything was removed correctly! Then you can try downloading iTunes again.
    SAMIA:
    Okay, thanks Rebekah!
    Rebekah:
    You're very welcome! I'm glad I could help! And of course if you have any issue after the reboot and download, you can always chat us back, as chat is open 24 hours! You will just need to give your case number and the next Advisor would have all my notes!
    SAMIA:
    Thanks again for all your help, for I couldn't have managed with out it. Have a nice day!
    Rebekah:
    You're very welcome! I know how important iTunes is and I'm glad we could get you on a path to resolution!
    Rebekah:
    I hope you have a lovely day!
    Rebekah:
    It's been a pleasure speaking with you! Thanks for chatting with us Samia. If you don't have any more questions, select End Chat from the upper left corner of the chat window.
    SAMIA:
    Will do, thanks.

  • JDBC Refcursor error

    I am trying to access a procedure returning refcursor. It works great in TOAD.
    Except when I try to access JDBC driver throws wierd error stating. This error shows at the execute statement
    java.lang.StringIndexOutOfBoundsException: String index out of range: 37
    at java.lang.String.charAt(String.java:444)
    at oracle.jdbc.driver.OracleSql.handleODBC(OracleSql.java:1123)
    I had turned the debug on and the messages give very little information.
    Here is the sample
    OracleCallableStatement stmt =
    (OracleCallableStatement)connection.prepareCall(
    "{call my_test1.process_orders(?)"; );
    stmt.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR);
    stmt.execute();
    Thanks for your replies
    Message was edited by:
    saro28

A: JDBC Refcursor error

Hi,
Is this line of code correct?
"{call my_test1.process_orders(?)"; );It should read something like:
"{call my_test1.process_orders(?)}" );The code shown here is missing the closing brace and has an extra semi-colon.
- Mark

Hi,
Is this line of code correct?
"{call my_test1.process_orders(?)"; );It should read something like:
"{call my_test1.process_orders(?)}" );The code shown here is missing the closing brace and has an extra semi-colon.
- Mark

  • Error activating deployable package

    Hi,
    I am getting the following error when I am trying to deploy my package.
    ORA-20151: RE_LOADER.ACTIVATE_PACKAGE: Error activating deployable package, ID (22), last build timestamp (14-OCT-2005 00:55:32). ORA-06512: at "RE.RE_LOADER", line 2437 ORA-20164: RE_LOADER.START_DATA_SYNC_JOB: Error starting data synchronization job. ORA-06512: at "RE.RE_LOADER", line 1690 ORA-20164: RE_LOADER.START_DATA_SYNC_JOB: Error starting data synchronization job. ORA-06512: at "RE.RE_LOADER", line 2465 ORA-06512: at line 1
    Stack 1 Return to Top
    java.sql.SQLException: ORA-20151: RE_LOADER.ACTIVATE_PACKAGE: Error activating deployable package, ID (22), last build timestamp (14-OCT-2005 00:55:32). ORA-06512: at "RE.RE_LOADER", line 2437 ORA-20164: RE_LOADER.START_DATA_SYNC_JOB: Error starting data synchronization job. ORA-06512: at "RE.RE_LOADER", line 1690 ORA-20164: RE_LOADER.START_DATA_SYNC_JOB: Error starting data synchronization job. ORA-06512: at "RE.RE_LOADER", line 2465 ORA-06512: at line 1 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java) at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java) at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java) at oracle.dmt.op.workflow.DeployWorkflowClass.main_method(Unknown Source) at oracle.dmt.op.workflow.DeployWorkflowClass.DeployWorkflowJava(Unknown Source)
    Any idea how to get around this issue?
    Any pointer would be appreciated.
    Thanks,
    Mayank

    >
    PLS-00323: subprogram or cursor 'F_STRING_SPLITS' is declared in a package specification and must be defined in the package body
    >
    The packabe body has this definition for the function.
    function F_string_splits ( v_querystring VARCHAR2, v_delim VARCHAR2)
    RETURN strings ASWhat is the definition in the package spec?
    >
    PLS-00363: expression 'V_QUERYSTRING' cannot be used as an assignment target
    >
    You have this defined as a IN parameter
    v_querystring IN varchar2,but try to give it a value
    v_querystring := 'CUST_ID:102893|EMAIL:[email protected]|FIRST_NAME:chris|LAST_NAME:west';

  • Can't access packaged object type in Java

    Hi
    I am getting the following error while accessing an oracle packaged object type. Can You please give me an advise..!!
    java.sql.SQLException: invalid name pattern: XXGW_RMA_CREATION_PKG.XXGW_RMA_RECRegards

    HI
    I am not asking how to search in google. If You know how to resolve my problem..then help me. I don't what this kind of answers.
    This is my problem
    Error in java.
    java.sql.SQLException: invalid name pattern: XXGW_RMA_CREATION_PKG.XXGW_RMA_REC
    This is my package
    create or replace package xxgw_rma_creation_pkg
    is
    type xxgw_rma_rec is record (dealer_name varchar2(40), dealer_desc varchar2(300));
    type xxgw_rma_line is table of xxgw_rma_rec; --(item_name varchar2(40), item_desc varchar2(300)) index by binary_integer;
    xx_rma_rec  xxgw_rma_rec;
    xx_rma_line xxgw_rma_line
    procedure xxgw_rma_creation (p_rma_rec in xxgw_rma_rec ,p_rma_line in xxgw_rma_line,p_rma_no out varchar2);
    end;
    create or replace package body xxgw_rma_creation_pkg
    is
    procedure xxgw_rma_creation (p_rma_rec in xxgw_rma_rec ,p_rma_line in xxgw_rma_line,p_rma_no out varchar2)
    is
    l_rma_rec xxgw_rma_rec := p_rma_rec;
    l_rma_line xxgw_rma_line := p_rma_line;
    begin
    dbms_output.put_line(l_rma_rec.dealer_name||'  '||l_rma_rec.dealer_desc);
    for i in  l_rma_line.first..l_rma_line.last loop
    dbms_output.put_line(l_rma_line(i).dealer_name||'  '||l_rma_line(i).dealer_desc);
    end loop;
    p_rma_no := '20';
    end;
    end;Rekha

  • Error while accessing discver report

    Hi,
    I am getting error while accessing a shared report from my colleague.
    1)Item "Project Overview Project Type" used by the workbook is missing. Would you like to continue
    2)Item dependency "not found in the EUL. Attempt to open workbook failed.
    Could you please give my the workaround for this.
    Thanks

    hi,
    the link is:
    Discoverer
    Regards
    Cosimo

  • Error while accessing secure store

    Hi Team,
    We are on EP 7.0 on SQL server 2005 . Iam facing one problem , in sometimemy IRJ pOrtal site stops giving error " Java iView Runtime " .At this time what happens that in my usr/sap drive , the sap folder is not shown as shared its share goes away and that time when i connect to visual admin tool the authentication fails and that time config tool gives error
    #1.5#00188B417A01007E0160B338000008FC00045DE876A4C303#1229152911187#com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl##com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl#Guest#2####f168def0c8c411dd9a2100188b417a01#SAPEngine_Application_Thread[impl:3]_29##0#0#Error##Plain###ManagedConnectionFactoryImpl.createManagedConnection(): SQLException occured while creating ManagedConnection: com.sap.sql.log.OpenSQLException: Error while accessing secure store: File "
    musaprd
    sapmnt
    PWC
    SYS
    global
    security
    data
    SecStore.properties" does not exist although it should..#
    #1.5#00188B417A010085015AAAF5000008FC00045DE876A4C207#1229152911187#com.sap.sql.connect.OpenSQLDataSourceImpl##com.sap.sql.connect.OpenSQLDataSourceImpl#Guest#2####09e36ed0c8c711dd93b200188b417a01#SAPEngine_Application_Thread[impl:3]_39##0#0#Error#1#/System/Database/sql/connect#Java#com.sap.sql_0019##Exception of type com.sap.sql.log.OpenSQLException caught: Error while accessing secure store: File
    When i check in this path SecStore.properties is there , also i have checked the permissions .....................please revert the reason of this error  . 
    Main part of this all is that after taking a reboot everything becomes fine , this happens every few days .
    Please revert to this .
    Regards,
    Somya

    Hi,
    This error crops up when the the folder usr/sap folder sharing is lost .  We  have recently faced this problem this is Windows OS level problem you can ask your OS admin. Applying a security patch will do.
    Regards,
    Vamshi.

  • Maybe you are looking for

    • Lenovo G40-70 : Dual boot windows 8.1 and fedora 22

      Buenas tardes Estimados, recurrí al foro porque no puedo ingresar a mi partición de W 8,1 que trae instalada de fábrica la laptop, por motivo que instalé Fedora 22  (en otra partición)Quizas mi error fue instalar Fedora en modo legacy,y cambiar la bi

    • Why are my replies to emails being sent as attachments instead of continuous threads?

      When I reply to or forward an email it is being sent as an attachment instead of a thread. I want people to be able to read all the replies without having to open an attachment. I don't have this problem when I use I.E. 9 or 10. Can't find any settin

    • Frustration with Safari

      Is anyone else totally frustrated with an inability to save or print PDFs using Safari 6.0.3?  I'm tired of opening a PDF in Safari to see if it's something I want to print, and then having to reopen the same PDF in Firefox or another browser to prin

    • Nor any of its super class is known to this context ...problem

      hi all i have simple complex object in jave that looks like this : @XmlAccessorType(XmlAccessType.FIELD) public class MyID{     @XmlAttribute     public short dbnum = (short)0;     @XmlAttribute     public short usernum= (short)0;     @XmlAttribute  

    • After converting to numbers I can't open xls files

      I get the following message: "You can't open the application Microsoft Excel because PowerPC applications are no longer supported." I don't see why it wouldn't automatically convert this as my .doc files get coverted in Pages. Does this mean I've los