REST GET PL/SQL: Worked in 4.2.1 and 2.0.1 isn't in 4.2.5 and 2.0.6

Hello

I have asked this in the forum of the APEX, but I was wondering if this could be the best location.

I have a REST to GET PL/SQL call that verifies an authorization header, performs a routine package which inserts data and then sets the location to a new URL where the customer collects the results of another call from PL/SQL GET REST:

DECLARE
  l_ref        NUMBER;
  l_authorized BOOLEAN;
  l_body       BLOB := :body;
BEGIN

  IF rest_util.authorized(:authorization) THEN

    rest_interface.handler(p_content_type => :contentType
                          ,p_body         => l_body
                          ,p_ref          => l_ref
                          ,p_status       => :status);

    :location := 'results/' || l_ref;

  ELSE
    :status := 401;
  END IF;

END;




This works very well in my 4.2.1 instance, but in a 4.2.5 instance it fails with the following text:

Caused by: java.sql.SQLException: ORA-06550: line 1, column 8:
PLS-00103: Encountered the symbol "" when expecting one of the following:

   begin function package pragma procedure subtype type use
   <an identifier> <a double-quoted delimited-identifier> form
   current cursor




I also note that the ToolTip for the Type of Source says:


PL/SQL - Executes an anonymous PL/SQL block and transforms any OUT or IN/OUT parameters into a JSON representation. Note that this option is only available when the HTTP method selected is one of the following: DELETE, PUT, POST.



I was just lucky in 4.2.1 or is a documentation error and I should be looking at something else?

Another thought... my work version uses 2.0.1 ADR and ADR 'broken' a 2.0.6. Is the java.sql.SQLException generated by the receiver or the APEX?

Patched APEX and ADR on the system of 'work' to match that of "broken" and it still works! Now, the only difference I see is that work, we're on a database 11g and the other is 10 g?

Post edited by: AndyH the same message of Type Source appears to 4.2.1 and 4.2.5

Post edited by: working version AndyH corrected to match to broken - still works.

It's a possible 10g known 'feature' - If you change a resource on a 10g database you will get the error the «» It seems that the routine that executes the PL/SQL cannot deal with carriage returns. The solution is to remove all your transport returns so the block is a single line. I'll find the bug number when I return to the office.

On the plus side, you can import the restful service to another instance without problem.

Bug 17695075 : RESTFUL SERVICES - CHANGE the error CAUSE CODE

Tags: Database

Similar Questions

  • Can't get iCloud Keychain work after log you in and once again

    Hi I have a very frustrating experience - my AirDrop has stopped working and tried to fix one of the possible solutions is to disconnect from my iCloud on my Mac and iPhone. I did it, reconnected but when I tried to check my bunch of my iPhone, I couldn't! I asked to send me a message to my old phone number and I no longer use it and it is not an advanced option in IOS 9.2.1 to change the phone number and no option to do so since the Mac as well. So I'm in trouble and very frustrated!

    On the Mac, go into System Preferences/iCloud/Keychain/Options and change there.

  • How to get the Bluetooth works on Satellite U300-155 and Linux Kubuntu 8.04

    I bought Toshiba Satellite U300-155 and I have Kubuntu 8.04 languages, but I don't see bluetooth when I turn it on.
    How can I use bluetooth under kububtu 8.04?

    Check if the antenna of your laptop switch is on. I think that the graphic tool should exist to manage the bluetooth. However if you're familiar with the linux console
    Then, you can also try the following command to activate bluetooth:

    sudo toshset - bluetooth module Bluetooth to connect to the USB bus
    sudo hciconfig hci0 upward
    sudo lsmod toshiba_apci-online background of access keys (+)
    sudo tail-f/var/log/acpi
    module installation sudo modprobe toshiba_acpi if not already available
    Press + to turn Bluetooth on or off. Check the acpi log output
    sudo hciconfig hci0 Bluetooth peripheral power

  • (Suddenly) Gets slow SQL queries, caused by high CPU and buffer high

    Hi all

    We lack a database of Oracle 11 g Enterprise Edition Release 11.2.0.3.11 - 64 bit Production.

    As a scheduled task, we lack a query:


    SELECT *

    DE (

    SELECT T. * , LAG( DATE_FROM, 1, NULL ) OVER (PARTITION BY OUR_ID ORDER BY DATE_TO ) AS PREV_FROM, LAG( DATE_TO, 1, NULL ) OVER (PARTITION BY OUR_ID ORDER BY DATE_ FROM ) AS PREV_TO, LEAD(DATE_FROM, 1, NULL ) OVER (PARTITION BY OUR_ID ORDER BY DATE_FROM) AS NEXT_FROM

    DE STOCK_A T

    OUR_ID = :B1 )

    WHERE DATE_FROM = : B2


    This query has run every minute for 3 years. The size of the STOCK_A table has increased some over the years: thousands of records go, no record out.


    Since last Sunday, we have huge performance problems. The query had a runtime of 0.02 seconds. Now it's up to 1.4 seconds. Since it must deal with thousands of lines, this considerable increase in execution time is problematic.


    When this query parsing, we discovered that the CPU has increased enormously. About 20% of the 90% of the runtime execution time. This is probably caused by the enormous increase of receives it from the buffer. Of thousands to millions. Given that we have not made any changes to the database instance, we're stuck as to how this performance problem suddenly appeared. It's literally from one day to the next.


    Someone at - it experience with this problem? Any help would be much appreciated.


    Kind regards


    Lupker

    I took a little longer than expected, but we have finally solved the problem.

    He seems to have been a bug in the application currently running on the database. A process in the application began to write many lines in the table as before. This behavior was expected, but what was not expected was the volume of 'same' records that were written in the table. So finally, we analyzed the data and indexes, and of course, the effectiveness of the index was strongly fell because of the unique, indexed values. Once we cleaned the duplicate lines and rebuild the indexes, we got our previous performance back after removal of the bug in the application of course. Simple enough, but we were so focused on a vice of the Oracle that we have overlooked the possibility that data could have been the cause of our problems. Who it was.

    Problem solved!

    Thanks to all those responding to this thread. Your help is very appreciated.

  • I NEED ASSISTANCE WITH MY ETHERNET DRIVER. HOW CAN I GET THIS TO WORK NEW TI?

    Original title: driver ethernet

    I NEED ASSISTANCE WITH MY ETHERNET DRIVER.  HOW CAN I GET THIS TO WORK NEW TI

    Download and install it

    The driver should be available in the manufacture of computers site

    Use the snid on a label on the computer to search with while you're there

    Or if the motherboard came with a disc to load and the reader will be on it.

  • REST: GET using PL/SQL does not not in 4.2.5 OK in 4.2.1

    Hello

    I have a REST to GET PL/SQL call that verifies an authorization header, performs a routine package which inserts data and then sets the location to a new URL where the customer collects the results of another call from PL/SQL GET REST:

    DECLARE
      l_ref        NUMBER;
      l_authorized BOOLEAN;
      l_body       BLOB := :body;
    BEGIN
    
      IF rest_util.authorized(:authorization) THEN
    
        rest_interface.handler(p_content_type => :contentType
                              ,p_body         => l_body
                              ,p_ref          => l_ref
                              ,p_status       => :status);
    
        :location := 'results/' || l_ref;
    
      ELSE
        :status := 401;
      END IF;
    
    END;
    
    
    
    

    This works very well in my 4.2.1 instance, but in a 4.2.5 instance it fails with the following text:

    Caused by: java.sql.SQLException: ORA-06550: line 1, column 8:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin function package pragma procedure subtype type use
       <an identifier> <a double-quoted delimited-identifier> form
       current cursor
    
    
    
    

    I also note that the ToolTip for the Type of Source says:

    
    PL/SQL - Executes an anonymous PL/SQL block and transforms any OUT or IN/OUT parameters into a JSON representation. Note that this option is only available when the HTTP method selected is one of the following: DELETE, PUT, POST.
    
    
    
    
    

    I was just lucky in 4.2.1 or is a documentation error and I should be looking at something else?

    Another thought... my work version uses 2.0.1 ADR and ADR 'broken' a 2.0.6. Is the java.sql.SQLException generated by the receiver or the APEX?

    Ok... Now I have patched my 4.2.1 system to match the 4.2.5 i.e. same APEX and ADR... and it works very well.

    Now, the only difference is that the work system is running on an Oracle 11 g server and the broken one running on Oracle 10 g - is this a problem?

    Any other ideas?

    Post edited by: query AndyH added about the version of ADR.

    Post edited by: AndyH the same message of Type Source appears to 4.2.1 and 4.2.5

    Post edited by: AndyH Patched 4.2.1 system to match 4.2.5

    It's a possible 10g known 'feature' - If you change a resource on a 10g database you will get the error the «» It seems that the routine that executes the PL/SQL cannot deal with carriage returns. The solution is to remove all your transport returns so the block is a single line. I'll find the bug number when I return to the office.

    On the plus side, you can import the restful service to another instance without problem.

    Bug 17695075 : RESTFUL SERVICES - CHANGE the error CAUSE CODE

  • Unable to get FaceTime to work on my IPhone 4.

    I could not yet get FaceTime to work on my IPhone 4.  I have read and followed the many corrections suggested, but to no avail.  Someone submitted it might have to do with my A T & T package.  I use a "" Pay As You Go "plan."  Is this relevant?

    Thanks for all the suggestions.

    IF you try to use the cell data for a FaceTime call using an iPhone 4, it won't work. With this model, and can use WiFi for FaceTime.

    Use FaceTime with your iPhone, iPad or iPod touch - Apple Support

  • How can I get FireFox to work on the first Google ChromeBook addition? He repeats to me upgrade and when I do it says does not support?

    How can I get FireFox to work on the first version of the Google ChromeBook? Everytime I open it it said to update or upgrade to FireFox and make it your main page. So I downloaded it and it's open once it is installed, but then a message appears that says "can't stand" search for an application that supports FireFox and its software, or something of the sort. I was sitting here with a full battery when I started and now it is dead... and I still don't have FireFox on my ChromeBook.

    What do I do now or how do I get it to work? And if it just simply won't work on a CHromeBook then they need to have that riht out in the open.
    

    Hello

    I had a peek in this and was informed that Firefox does not work on Chrome OS.

    It is designed and done a little differently from the likes of Windows and Linux and will not support another browser being installed.

  • I can't get firefox to work

    I tried on my pc and tablet to get fire fox to work but I can't, and there is support on your help as his attacking all straight and I desperately need a better search engine and then google for both, me and my search for partners for university graduates because to call Google shit would be humiliating to shit because it has many uses in the garden and gives good results then just google reproduces more of himself in between the sale you guessed more shit, im old and but only reasonably "geek" would desperately love to use your product because it is as good as you say and make search much easier, has soon dave [email deleted ed]

    The most reliable way to get Firefox on an Android device is to use the Google game store. https://play.Google.com/store/apps/details?ID=org.Mozilla.Firefox

  • How can I get FF to work with organizing Mod (for the mods used with ARE: Skyrim)? I get an error message that it cannot understand the given address.

    I am a big fan of the Elder Scrolls and uses the new 2.2.9 STEP Setup. They went to the organizer of the Mod (MO) and I can't seem to get my FF working with the mod download things part. I click on the icon "Earth", that takes me immediately to the page file Nexus Mod, but when I choose a file to download after clicking on "Download Manager" I get this error message:
    The address was not included
    Firefox doesn't know how to open this address, because one of the following protocols (nxm) is not associated with any program or is not allowed in this context.
    You may need to install additional software to open this address.

    The address when clicking "Download Manager" begins with nxm://Skyrim/mods/ the address is such because trying to download with the Manager.

    Any help will be greatly appreciated! I pulled out my hair for the last few hours trying to find a solution. I disabled Adblock, other popups blockers and activated the main address in my exception rules. It simply doesn't get it. Ugh!

    Thank you in advance!

    In order to use nxm: / / links, Nexus Mod Manager must be installed and associated with the Protocol nxm .

    Problems with this program to third parties, please see the support forum:

  • Update to Firefox ver 19A thwarted my ability to get java to work

    I know that there were MANY messages and answers about java since 7_U_11. At one point, using Windows 7, FF 18 and 7_U_13 java, I was able to get java to work by adding a registry entry pointing to the dll plugin NextGen. However, now that 7_U_15 is out, I again could not get the NextGen plugin to be recognized. I tried just to let java settle and that has not worked. I entered then registry entries appropriate as I did before, and that has not worked. Somewhere in this mess FF upgraded to v 19, and now I can't even 7_U_13 to work as before. I have an XP laptop that is FF v 19 and java 7_U_15 and it works fine.

    Is it a Windows 7 problem; a FF issue; or a java problem. I don't have any idea what to try next under the name of all the solutions seem to fail.

    Well, apparently, I solved the problem with a registry entry for the next generation plugin. As in the past, the installation of java program could not enter the correct location of the java plugin for mozilla. In versions of java prior to 7_U_15, the incorrect path variable was placed in the entrance of registry HKLM/software/mozillaplugins. However, with 7_U_15 worm the incorrect path variable was placed in the entrance of registry HKLM/software/WOW6432node/mozillaplugins. Once the correct path has been entered, the next generation plugin has been successfully installed after the system restarts.

  • I installed jZip, it crashed Firefox and does not start again; How can I get Firefox to work once again, preferably without uninstalling?

    I installed jZip and it crashed Firefox, I tried to restart Firefox, but it wouldn't. I uninstalled jZip, Firefox didn't work; I restarted the computer and it still does not work. I can't use even run Windows to pull up the profiles. Is there something I can do to get Firefox to work again without reinstalling? I really like to use the session restore but its so erased its uninstalled.

    Yes to aid,

    Start > Search > firefox.exe /ProfileManager {ENTER}

    I got to the profiles.

    I'm fed up and uninstalled Firefox, when he asked if I wanted to erase all data associated with Firefox I did not and when I reinstalled it straight last session here, I assume that this sort of program file has been damaged and has stopped working. Put it back, fixed everything that was wrong.

  • How can I get javascript to work with version 18 - all boxes checked but still problem

    I have WINDOWS 8 (for 2 weeks), Firefox v18. I try to use a banking site that requires javascript, but when I try to use the site, I get "javascript not working (or available).
    If I go into Youtube, any video that I take is unable to run - instead I get Flash video screen
    I put active Javascript but not difference.
    can someone point me in the right direction.
    I've reloaded Firefox and reset problem persists

    Hello, you can try to reproduce this behavior when you start firefox in safe mode, once? If not, perhaps an addon intrudes here...

    Troubleshoot extensions, themes, and issues of hardware acceleration to resolve common problems of Firefox

  • I no longer get suggested words when composing a message text on my iphone 5.  How to get back to get this function works

    I no longer get suggested words when composing a message text on my iphone 5.  How to get back to get this function works

    Make sure that the text is on. You can do this on the keyboard (if you have several) by pressing and holding down the button to change between them.

    Alternatively you can go to settings > general > keyboard and make sure predictive is turned on (the switch must be green).

    If you see the image below, press the small white bar above the buttons T and Y and slide upward slightly.

  • Satellite A210-19Z: could not get internet to work with Windows XP installed

    Hello

    When I install Windows XP on my Satellite I can not get Internet to work

    Do I have to install drivers or so?
    Please post links to the drivers if so.

    Christian

    Of course you need readers.

    If you have connected your router with a LAN cable, then you will need to install the LAN driver. If you want to use the network WiFi WLan driver must be installed also.
    If your computer laptop doesn t supports the WLan card then the WLan driver is not required

    All the drivers (if available) XP can be downloaded from the European driver Toshiba page!

Maybe you are looking for

  • What is smax4pnp.exe?

    What is smax4pnp.exe? He takes over at the start.

  • This system was gave me with nothing on it. What should I do to install Windows?

    has been given a computer completely annihilated. What do I need get the computer What do I need get the computer running after it was cleaned?

  • error 0000057

    for these last days, I was unable to download important updates on my vista 32 Home premium xwith the code 0000057 showing when I'm asked update failed

  • BlackBerry Smartphones typing while it is plugged

    When I tap on the private when it's plugged in, it is funny and you can't get more than a few letters and damage and I must correct. I was hoping updated fix it but didn't. Is there something I can adjust to make it work better? Thank you

  • Creating a menu with button rollover images

    Hello I am building a menu with buttons rollover images. It is the 5 buttons, one under the other. I built a class with a background image that changes between the development and the status of non-focus, to make the transfer. To enable the active st