Database Validation Function Question - ORDS, SODA & JSON in the Database

In Page 37 from the APEX_listener_v1.pdf, it mentioned that we can create a function "check_valid_procedure".
I guess it is similiar to the EPG version, wwv_flow_epg_include_mod_local.
My problem is the admin screen won't accept it.
Request could not be processed due to error:
Wed Jul 14 09:58:48 EDT 2010
Database Validation Function CHECK_VALID_PROCEDURE is invalid.
Which schema should I use to create this function? 

You'll have to prefix the proc with the schema unless you've granted to public and have a public syn your using.
-kris 

Yes, it works. Just for the record, you need to grant execute to public as well.

Related

Direct procedure call cached?

Hi, running Listener 2.0.2.133.14.47 under WLS.I have asked a similar question before but was not given a good answer, https://forums.oracle.com/thread/2292910 I have a packaged procedure that prints a web page using htp.p().Sometimes (I cannot reproduce at will) the procedure's result is not updated when I refresh the page in the browser.That is, pressing F5 (or Ctrl+F5) gives an old result. I wrote and granted to apex_public_user this package: 
CREATE OR REPLACE PACKAGE BODY callpack AS
PROCEDURE calltest (param varchar2 default null) IS
BEGIN
  htp.p('<div>You gave me "'||nvl(param,'<null>')||'". The time is '||to_char(sysdate,'HH24:MI:SS')||'</div>');
  for i in 1..1000 loop
    htp.p('<div>1000 rows of meaningless content</div>');
  end loop;
END calltest;
END callpack;
/
 I called this from my browser like this: http://server/apex/my_schema.callpack.calltestInitially I got a new time with every update (F5). After leaving it for a few minutes and trying again it got "stuck". Every refresh now gives me the same response.The response header for this apparently cached page looks like this
Accept-Ranges    bytes
Age    1250
Connection    Keep-Alive
Content-Encoding    gzip
Content-Length    423
Content-Type    text/html; charset=UTF-8
Date    Thu, 07 Nov 2013 10:20:22 GMT
Vary    Accept-Encoding
X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d03396
X-Powered-By    Servlet/2.5 JSP/2.1
 I have also compiled and granted the above packaged procedure as standalone. This has (yet) not been cached. The response headers there:
Connection    Keep-Alive
Content-Length    49
Content-Type    text/html; charset=UTF-8
Date    Thu, 07 Nov 2013 10:20:08 GMT
X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d04f52
X-Powered-By    Servlet/2.5 JSP/2.1
 Besides from restarting the server, the only way I know of to make the listener actually call the procedure when caching is to change case in the url.So if http://server/apex/my_schema.callpack.calltest is cached, I can get a new page using http://server/apex/My_schema.callpack.calltestOr I can add a parameter (?param=X) that I change when I want new content. Has anyone noticed this?Is there some caching mechanism in the listener (when doing direct pl/sql-calls)? Or is it WebLogic doing something... sometimes... Kind regards Tomas Albinsson
After having a call being cached I left the window open, and a few hours later came back and just did a refresh (F5).Now the page was redrawn once, just to be cached again at the next refresh. Feels like a time-out of some sort or a session swap perhaps. So my packaged procedure above seems to be "cache-prone" but not the stand-alone procedure, this has never been cached yet.  Tomas
Here is the latest news on this subject: procedures get cached depending on their output! I took my stand-alone procedure and added the meaningless content-loop. Before this every refresh (F5) gave a new time.After adding the loop every refresh gives the same (old) time. Until I change the parameter value sent in or change some caSinG in the url. So I now commented out the loop in the packaged procedure and recompiled. F5 still gave the 1000 lines and old time.When I changed case of one letter in the url I got the time-only result and now I get a new time with every F5. I took the url for the package, changed back the cas to original all-lower and opened it in Internet Explorer (as opposed to my usual Firefox).I got a 10 minute old time stamped page with 1000 rows. Change one letter case and the page is just the time and it updates with every F5 here as well. I have been told the load balancer does no caching for this server. In that case there is only Weblogic or the Listener left.  Tomas
TomasAlbinsson wrote:
 
Hi,
 
running Listener 2.0.2.133.14.47 under WLS.
The response header for this apparently cached page looks like this
Accept-Ranges    bytes  Age    1250  Connection    Keep-Alive  Content-Encoding    gzip  Content-Length    423  Content-Type    text/html; charset=UTF-8  Date    Thu, 07 Nov 2013 10:20:22 GMT  Vary    Accept-Encoding  X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d03396  X-Powered-By    Servlet/2.5 JSP/2.1  I have also compiled and granted the above packaged procedure as standalone. This has (yet) not been cached. The response headers there: Connection    Keep-Alive  Content-Length    49  Content-Type    text/html; charset=UTF-8  Date    Thu, 07 Nov 2013 10:20:08 GMT  X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d04f52  X-Powered-By    Servlet/2.5 JSP/2.1 
The first set of headers seem to indicate that part of your network flow recognizes that the content that it is returning to you was originally generated 1250 seconds ago - so something is caching. Doing the same test on my Glassfish/Listener combination produces the following response heading:
X-Powered-By: Servlet/3.0 JSP/2.2 (Oracle GlassFish Server 3.1.2.2 Java/Oracle Corporation/1.7)
Server: Oracle GlassFish Server 3.1.2.2
Content-Type: text/html;charset=UTF-8
Content-Length: 63
Date: Wed, 20 Nov 2013 12:33:45 GMT
200 OK
 This might indicate that the caching is occurring within your Weblogic setup or some other cache in the network?
Hi Andy, yes, you were right, something was caching.When I used the real server name instead of the official DNS name it no longer cached.Turned out some caching was done by the load balancer that answered on the official name. This has now been turned off and the problem is solved.  Kind regards Tomas

oci cli - 401 "NotAuthenticated"

Dear Gurus, This is my first time trying to use oci cli. I completed the install  and config process from the below URL and everything went fine. https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/cliinstall.htm  Created the API keys , uploaded the key to OCI and Configured the profile. Finger prints matches between public.pem (uploaded to OCI) and private key. Now when i try to issue any command via cli it throws the 401 error irrespective of what I try. I tried on three different machines with different OS (Windows/Linux ). Looks like I am doing something wrong somewhere.   Error Message: [oracle#localhost .oci]$ oci os ns getServiceError:{    "code": "NotAuthenticated",     "message": "The required information to complete authentication was not provided.",     "opc-request-id": "72C5694FDF694AEDA0FA42FBB77E811C",     "status": 401}  Clocks seems to be in sync:curl -s --head https://iaas.us-phoenix-1.oraclecloud.com | grep Date[oracle#localhost ~]$ curl -s --head https://iaas.us-phoenix-1.oraclecloud.com | grep DateDate: Sat, 17 Mar 2018 16:25:08 GMT[oracle#localhost ~]$ dateSat Mar 17 12:25:16 EDT 2018 setup went fine and have necessary permissions for keys:[oracle#localhost .oci]$ ls -lrttotal 12-rw-------. 1 oracle oinstall  451 Mar 17 11:56 oci_api_key_public.pem-rw-------. 1 oracle oinstall 1679 Mar 17 11:56 oci_api_key.pem-rw-------. 1 oracle oinstall  302 Mar 17 11:56 config $cat config[DEFAULT]user=ocid1.user.oc1..aaaaxxxxxxxxxrhbpmiv3vmx3fanyfotrjnfafingerprint=5e:e3:43:c6:b3:64:73:df:a4:e2:a6:a3:35:e6:39:e3key_file=/home/.oci/oci_api_key.pemtenancy=ocid1.tenancy.oc1..aaaaaxjjaryrxflyysgaganbmybmregion=us-"ashburn-1" I am out of ideas and any help in this regard is greatly appreciated.
Hi, Just curious, can you try without the double-quotes for region? From:region=us-"ashburn-1" To:region=us-ashburn-1 Thanks,Vikram
Thanks Vikram for pointing out. Still the same without any quotes.I was desperate and trying different options and tried with quotes. Initial config file created has no quotes and i reverted back what it was. Tried with different region too but no luck.  $cat config[DEFAULT]user=ocid1.user.oc1..aaaaxxxxxxxxxrhbpmiv3vmx3fanyfotrjnfafingerprint=5e:e3:43:c6:b3:64:73:df:a4:e2:a6:a3:35:e6:39:e3key_file=/home/.oci/oci_api_key.pemtenancy=ocid1.tenancy.oc1..aaaaaxjjaryrxflyysgaganbmybmregion=us-ashburn-1 I am out of ideas and any help in this regard is greatly appreciated.
Understood. I also noticed the file timestamp for oci_api_key_public.pem, oci_api_key.pem and config are all the same. So I did not think the config file was manually updated.Was yours an auto install or manual? From documentation, it almost looks like some of your information may be incorrect in the config. Clock, I remember, you mentioned is in sync.  ---- from doc (Ref: https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm#ErrorDetailsandTroubleshooting )html status code: 401Missing or incorrect authentication information. Verify that all the required information (tenant OCID, user OCID, fingerprint, and private key) is provided and accurate. Verify that the public key corresponding to the fingerprint has been uploaded for the user. For more information, see Required Keys and OCIDs.Clock skew. This status code is returned if the client's clock is skewed more than 5 minutes from the server's clock. For more information, see Maximum Allowed Client Clock Skew.API request signature error. This status code is returned if a required header is missing from a signing string. For more information, see Request Signatures. Thanks,Vikram
I did a fresh install on a OCI compute instance just to see if it has anything to do with my install scripts. Anyway I tried with a new user instead of a service administrator and it worked ...YAYYYYYYYYYYYYYYYYYYYY Vikram thanks a lot man for your kind support and help.... Really appreciated. [opc#shaikprod .oci]$ oci os ns get{  "data": "shaikscloud33"}

Problem connecting to MS Active Directory using GSSAPI

Hello dear All,
I have searched through this forum and Java security related forums
and I can't find how to solve the the following problem while trying
connect to Active Directory using GSSAPI:
KrbException: Identifier doesn't match expected value (906)
KDCRep: init() encoding tag is 126 req type is 13
at sun.security.krb5.internal.af.a(DashoA6275:129)
...
...
...
KRBError:
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:378)
at com.sunbay.sunath.KerberosAuth.<init>(KerberosAuth.j
sTime is Tue Jun 03 13:15:34 EEST 2003 10546353
at com.sunbay.sunath.Startup.main(Startup.java:17)
suSec is 26180
error code is 7
KrbException: Server not found in Kerberos database (7)
at sun.security.krb5.KrbTgsRep.<init>(DashoA6275:59)
realm is SUNBAY.CRIMEA
sname is krbtgt/SUNBAY.CRIMEA
at sun.security.krb5.KrbTgsReq.getReply(DashoA6275:217)
....
I have found that some other people have the same problem, not only me,
but their questions left without replies.
I try to switch-off "pre-authentication" in user properties in AD,
synchronize time between my computer and domain controller,
hack krb5.conf and jaas.conf, vary some other JNDI/LDAP/JGGS properties,
but all without success.
Please, could anyone post the complete working example with full sources
and config files (jaas.conf and/or krb5.conf)?
Or may be somebody know the reason of such behaviour (I mean exceptions)
of JNDI/GSSAPI-AD in certain network environemts? 
Hi,
I've been trying (very hard) to get Single Sign-on to work using JAVA JNDI with Kerberos to the Microsoft Active Directory (which talks LDAP).
I have no idea why it doesn't work. I've compiled all I've discovered here at my website
http://www.intercitizen.com/jndiexample/
If you find out how to make it work and can provide an example or have more suggestions please contact me at this website and then I can post the solution here.
Thanks in advance,
Philip

Adding Extended Attributes for Data Exporter

Hi, I'm having trouble in getting an exported attribute to export within the new Data Exporter feature. In fact, once i alter the export schema to include the additional column (ext att), it won't write to that table at all.
I am doing the following per the documentation from Sun, hopefully someone can point out the error of my way.
First I alter the IDM Schema Configuration.xml file to include the additional User extended attribute.
Next, I alter the model-export.xml file under model name='User' within WS_HOME to include the additional attribute here, my entry is as follows:
<field name='employeeId'
type='java.lang.String'
introduced='8.0'
max-length='50'
forensic='User'
queryable='true'
exported='true'
friendlyName='Employee Id'>
<description>The Peoplesoft ID coming over</description>
</field>
Next, I go to the unzipped directory of IDM hence, \exporter and execute: "ant rebuild" and "ant deploy".
The following takes place, The rebuild process regenerates my create and drop schema configuration scripts for MySQL. I run both scripts and
my new column with the newly added extended attribute appears in the EXT_USER table. I also issue the proper permission commands on the tables
I then undeploy my web application from Tomcat and re-deploy the web app.
I start the server, log into IDM and go to the Data Exporter configuration page. Under the User data type, my extended attribute does not show up. Further, what once worked, the scheduler now does not write to the EXT_USER table and gives the following error when I believe IDM is starting up. I have no doubt that this is a clue as to why it is not working:
"StartupServlet: Defining properties from web.xml
Starting: Identity Server...
...Finished starting Startup Servlet
{Model=User, employeeId=[], assignedRoles=[], idmManager=, businessPhone=[], location=[], MemberObjectGroups=[(id=#ID#Top)], lhdis=true, lhlocked=false, controlledObjectGroupsRule=, ACCT_CD=[], lastModDate=Tue Oct 21 16:44:21 PDT 2008, failedPasswordLoginAttemptsCount=0, description=, lastModifier=Configurator, role=[], divisionCode=[], companyMobilePhoneNumber=[], fullname=Anuradha Rao, employeeType=[], CompanyMailingAddress=[], objectClass=[Top, Object, Principal, User], hasCapabilities=false, questionLocked=false, email=jon1#yahoo.com, subtype=, managerId=[], sponsorId=[], contractorLocation=[], jobCode=[], locked=false, failedQuestionLoginAttemptsCount=0, xmlSize=936, res=[], repoMod=Tue Oct 21 16:44:21 PDT 2008, accountId=, textPagerEmailAddress=[], lastname=Rao, lastAuditorScan=, user_resources=[], creator=Configurator, id=#ID#54D7-:3AE94AA9C11:110E5685:2FC0FC1B3DEDDBF6, title=[], idmManagerNameNotFound=, faxNumber=[], facility=[], dis=0, lastPasswordUpdate=Wed Oct 01 15:31:47 PDT 2008, name=definabl, authType=, effectiveDate=[], createDate=Thu Sep 25 10:56:13 PDT 2008, jobTitle=[], prov=2, accounts=[], ControlledObjectGroups=[], costCenter=[], firstname=Anuradha, correlationKey=, primaryObjectClass=User, departmentName=[], roleInfo=[], accountType=, middleInitial=[], departmentId=[], displayName=, cubeNumber=[], disabled=true, }
ex: java.lang.reflect.InvocationTargetException"
java.lang.reflect.InvocationTargetException is thrown which leads me to believe that something is wrong with the javabean that is regenerated under the ant rebuild and the underlying User.hbm.xml file that regenerated as well. I can see from the User.hbm file that the new extended attribute has been added but this is as far as I have gotten. I really don't know where to go from here.
Any and all help is extremely appreciated.
Thank you. Dan

Active Sync not working

I am having an issue with active sync not working. I am looking for updates from my resource every 5 minutes for changes. My enviornment is such:
IdM Version 5
App server: Weblogic 8.1.6
IdM is looking at AD (2003) for changes.
My log files look like such:
2007-02-06T13:20:07.794-0500: Started, paused until Tue Feb 06 13:25:00 EST 2007
2007-02-06T13:25:00.049-0500: Pause completed
2007-02-06T13:25:00.095-0500: Polling
2007-02-06T13:25:00.111-0500: Looking for updates with filter: (objectCategory=person)(uSNChanged>=71766297)
2007-02-06T13:25:01.064-0500: Looking for deletes with filter: (uSNChanged>=33117487)
2007-02-06T13:25:07.767-0500: Poll complete.
2007-02-06T13:25:07.767-0500: SARunner: loop 263
2007-02-06T13:25:07.814-0500: Started, paused until Tue Feb 06 13:30:00 EST 2007
2007-02-06T13:30:00.053-0500: Pause completed
2007-02-06T13:30:00.068-0500: Polling
2007-02-06T13:30:00.084-0500: Looking for updates with filter: (objectCategory=person)(uSNChanged>=71766297)
2007-02-06T13:30:01.240-0500: Looking for deletes with filter: (uSNChanged>=33117487)
2007-02-06T13:30:08.021-0500: Poll complete.
2007-02-06T13:30:08.021-0500: SARunner: loop 264
2007-02-06T13:30:08.084-0500: Started, paused until Tue Feb 06 13:35:00 EST 2007
2007-02-06T13:35:00.057-0500: Pause completed
2007-02-06T13:35:00.088-0500: Polling
2007-02-06T13:35:00.104-0500: Looking for updates with filter: (objectCategory=person)(uSNChanged>=71766297)
2007-02-06T13:35:01.229-0500: Looking for deletes with filter: (uSNChanged>=33117487)
2007-02-06T13:35:08.166-0500: Poll complete.
2007-02-06T13:35:08.166-0500: SARunner: loop 265
2007-02-06T13:35:08.197-0500: Started, paused until Tue Feb 06 13:40:00 EST 2007
2007-02-06T13:40:00.030-0500: Pause completed
2007-02-06T13:40:00.030-0500: Polling
2007-02-06T13:40:00.045-0500: Looking for updates with filter: (objectCategory=person)(uSNChanged>=71766297)
2007-02-06T13:40:01.014-0500: Looking for deletes with filter: (uSNChanged>=33117487)
2007-02-06T13:40:07.795-0500: Poll complete.
When I run these search filters I get results from my AD. When IdM runs the search they are coming back blank. Any ideas?
Thanks,
Chris 
If you have changed environments... or for some other reason, your USN number on the AD resource could be lower than the number passed in the query.
Manually edit a user in AD, and then check the USN number of the object. See if it is lower then the query is passing. If so, you can manually edit the IAPI_ResourceName configuration object and alter the USN number passed in the query. 
BTW...
Lowering the number manually will process any changes after that number, so you should determine the right value since it could potentially cause a lot of processing to occur.

Categories

Resources