BC4J/JSP Dynamic JDBC Username Audit Trail

I have implemented a BC4J/JSP login page as per the How To "How To Support Dynamic JDBC Credentials". It all works very nicely thank you.
How can I retrieve the application module's username (passed through from the login page) from within the doDML() method of an EntityImpl?
I need to do this in order to maintain an audit trail of db updates.
Thanks,
James

I think I should be able to use something like:
oracle.jbo.ApplicationModule am = oracle.jbo.client.Configuration.createRootApplicationModule
("package.AppModule", "AppModuleLocal");
oracle.jbo.ConnectionMetadata cm = am.getTransaction().getConnectionMetadata();
String uname = cm.getUserName();
But when I use this I get the error below. Any ideas?
Error Message: JBO-30003: The application pool (rabc4j.Rabc4jModule) failed to checkout an application module due to the following exception:
Error Message: null
JBO-30003: The application pool (rabc4j.Rabc4jModule) failed to checkout an application module due to the following exception:
java.lang.NullPointerException
     java.lang.Object java.util.Hashtable.put(java.lang.Object, java.lang.Object)
     void rabc4j.RaConnectionStrategy.connect(oracle.jbo.ApplicationModule, oracle.jbo.common.ampool.SessionCookie, oracle.jbo.common.ampool.EnvInfoProvider)
     void oracle.jbo.common.ampool.ApplicationPoolImpl.connect(oracle.jbo.ApplicationModule, oracle.jbo.common.ampool.SessionCookie)
     oracle.jbo.ApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(oracle.jbo.common.ampool.SessionCookie)
     oracle.jbo.ApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(oracle.jbo.common.ampool.SessionCookie, boolean)
     oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(boolean, long)
     oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(boolean)
     oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule()
     oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String, oracle.jbo.common.ampool.EnvInfoProvider)
     oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String)
     void rabc4j.RaActionPlanImpl.doDML(int, oracle.jbo.server.TransactionEvent)
     void oracle.jbo.server.EntityImpl.postChanges(oracle.jbo.server.TransactionEvent)
     void oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(oracle.jbo.server.TransactionEvent, com.sun.java.util.collections.ArrayList, com.sun.java.util.collections.HashMap, com.sun.java.util.collections.ArrayList, boolean, boolean)
     void oracle.jbo.server.EntityImpl.postChanges(oracle.jbo.server.TransactionEvent)
     void oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(oracle.jbo.server.TransactionEvent, com.sun.java.util.collections.ArrayList, com.sun.java.util.collections.HashMap, com.sun.java.util.collections.ArrayList, boolean, boolean)
     void oracle.jbo.server.DBTransactionImpl.postChanges(oracle.jbo.server.TransactionEvent)
     int oracle.jbo.server.DBTransactionImpl.commitInternal(boolean)
     void oracle.jbo.server.DBTransactionImpl.commit()
     int oracle.jbo.html.jsp.datatags.CommitTag.doStartTag()
     void DataHandlerComponent.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
     void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.GetParametersRequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.EvermindPageContext.include(java.lang.String)
     int oracle.jbo.html.jsp.datatags.ComponentTag.doStartTag()
     void AplanRpropFkLink.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
     void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
     boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
     void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
     void com.evermind.util.ThreadPoolThread.run()

Similar Messages

  • Can not view audit trail of BPMN Process instance in Enterprise Manager

    I can not view the audit trail of BPMN Process instance in Enterprise Manager. When I try to click on BPMN process link inside process instance flow trace a NoClassDefFoundError error occurs. How can I fix this?
    ####<Jan 23, 2014 1:44:24 AM MSK> <Error> <oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator> <vm-vtb-04> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <ab53c740f435f6de:-43ee6bbc:143bbd0bbe7:-8000-0000000000000319> <1390427064715> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #2
    javax.servlet.ServletException: java.lang.NoClassDefFoundError: oracle/bpm/draw/diagram/ProcessDiagrammer
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:342)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:102)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:131)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
            at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
            at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:181)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:183)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
            at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
            at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
            at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
            at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
            at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused By: java.lang.NoClassDefFoundError: oracle/bpm/draw/diagram/ProcessDiagrammer
            at java.lang.Class.getDeclaredMethods0(Native Method)
            at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
            at java.lang.Class.privateGetPublicMethods(Class.java:2556)
            at java.lang.Class.getMethods(Class.java:1412)
            at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1284)
            at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1158)
            at java.beans.Introspector.getBeanInfo(Introspector.java:408)
            at java.beans.Introspector.getBeanInfo(Introspector.java:167)
            at javax.el.BeanELResolver$BeanProperties.<init>(BeanELResolver.java:153)
            at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:574)
            at javax.el.BeanELResolver.getValue(BeanELResolver.java:281)
            at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
            at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
            at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
            at com.sun.el.parser.AstNot.getValue(AstNot.java:59)
            at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
            at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
            at oracle.adfinternal.view.faces.renderkit.rich.GoLinkRenderer.getDisabled(GoLinkRenderer.java:506)
            at oracle.adfinternal.view.faces.renderkit.rich.GoLinkRenderer.isDisabled(GoLinkRenderer.java:681)
            at oracle.adfinternal.view.faces.renderkit.rich.GoLinkRenderer.handleInaccessibility(GoLinkRenderer.java:584)
            at oracle.adfinternal.view.faces.renderkit.rich.GoLinkRenderer.encodeAll(GoLinkRenderer.java:131)
            at oracle.adfinternal.view.faces.renderkit.rich.CommandLinkRenderer.encodeAll(CommandLinkRenderer.java:158)
            at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
            at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
            at oracle.adfinternal.view.faces.renderkit.rich.BreadCrumbsRenderer._renderLink(BreadCrumbsRenderer.java:420)
            at oracle.adfinternal.view.faces.renderkit.rich.BreadCrumbsRenderer._renderNode(BreadCrumbsRenderer.java:322)
            at oracle.adfinternal.view.faces.renderkit.rich.BreadCrumbsRenderer._renderContent(BreadCrumbsRenderer.java:269)
            at oracle.adfinternal.view.faces.renderkit.rich.BreadCrumbsRenderer.encodeAll(BreadCrumbsRenderer.java:162)
            at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
            at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:538)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
            at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChild(PanelGroupLayoutRenderer.java:499)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$100(PanelGroupLayoutRenderer.java:30)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:659)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
            at oracle.adfinternal.view.faces.taglib.region.IncludeTag$FacetWrapper.processFlattenedChildren(IncludeTag.java:675)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:160)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
            at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
            at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
            at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChild(PanelGroupLayoutRenderer.java:499)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$100(PanelGroupLayoutRenderer.java:30)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:659)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
            at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
            at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
            at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelBorderLayoutRenderer.renderSideFacet(PanelBorderLayoutRenderer.java:316)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelBorderLayoutRenderer._encodeAllWithSideFacets(PanelBorderLayoutRenderer.java:163)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelBorderLayoutRenderer.encodeAll(PanelBorderLayoutRenderer.java:83)
            at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
            at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
            at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
            at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
            at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)

    Hi Matt
    Till you get exact answer, try indirect approach. I did view page source and could not find the details in the source code. Then I clicked on image to show in new browser and thats when I got this link: You can dig into this imageRenderer.jsp file that can be found in one of the WAR files shown below. Look into EARs also that my have WARs with this jsp. Mostly there should be some sort of Servlet also to display the audit trail. I just checked from bpm/workspace Process Tracking Tab. I did not looked from EM Console tracking tabs though.
    beaHome\Oracle_SOA1\soa\applications\OracleBPMWorkspace.ear has a OracleBPMWorkspace.war file. See if this direction helps
    http://devlinux04:8001/bpm/workspace/jsf/instance/imageRenderer.jsp?imagePath=/tmp/1pLcNmhd77v9XnLCrpNs6dyby3Vzpv4QR1LdPTTf6hpCTp8Fh2KH!-206223496!1302780477267/GraphicalAuditTrail1328100234265306320.png
    Thanks
    Ravi Jegga

  • Questions about example "Dynamic JDBC Credentials for Model 1 and Model 2"

    Hello,
    i am trying to set up dynamic JDBC authentication in my ADF BC application - i want that it'll work like in Forms - a dababase user with the proper priveleges can log into my ADF BC application using his database login and password, and work with application.
    I've read the paper "How To Support Dynamic JDBC Credentials" at
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    and test the very useful example, created by Steve Muench, which i've got from
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#14
    The example works, but when i'm transfer its realisation in my application - it doesnt work the right way. The problems is the following:
    1. I can connect and work successfully only under the owner of the schema - the username and password of which i've wrote in the "jbo.server.internal_connection" string of the AM configuration.
    2. When i'm connecting under other users, which have all the rights to work with the db objects, used by application, i got the main page with the "Access Denied" message - as i have no priveleges to the tables.
    3. The big surprise is that if i am entering the fake username and password - the random letter combination - then i am getting the same behavior as in p.2 - the main page with the "Access Denied" message!
    And the last question is:
    4. Is it possible to set up the dynamic jdbc authentication using the build-in JDeveloper functions - i mean not to use that additional code, not override the ADF Binding Filter, and so on, but set up the similar behaviour (users log in using their db names and passwords) in several minutes following the standart documentation?
    Thanks in advance!

    One more question:
    I have 2 independent Application Modules in my application - to make the 2 transactions independent one form another, when working with different parts of project - and while using dinamic JDBC authentification, the user connects only in the first AM under the username he's entered, but the 2nd AM works under the predefined earlier (during development) connection for that AM.
    How can i make the 2nd AM to be connected under the logging in user (same as the 1rst AM)?

  • How to use CHANGEDOCU functions for audit trail?

    Hi,
    I have a report screen that requires audit trails on the changes made to the data dic fields on the screen.
    Which CHANGEDOCU functions should I use for audit trail? And where should I implement the functions? In the 'save' subrountine that I create?
    Any samples? Thanks.

    Hi Kian,
               You should wtite the change docu functions in the "SAVE" subroutine. The following changedocu functions should be used. I am attaching an example if it below.
    CALL FUNCTION 'CHANGEDOCUMENT_OPEN'
        EXPORTING
          OBJECTCLASS             = 'ZSCHEMES'
          OBJECTID                = OBJECTID
          PLANNED_CHANGE_NUMBER   = PLANNED_CHANGE_NUMBER
          PLANNED_OR_REAL_CHANGES = PLANNED_OR_REAL_CHANGES
        EXCEPTIONS
          SEQUENCE_INVALID        = 1
          OTHERS                  = 2.
      CASE SY-SUBRC.
        WHEN 0.                                   "OK.
        WHEN 1. MESSAGE A600 WITH 'SEQUENCE INVALID'.
        WHEN 2. MESSAGE A600 WITH 'OPEN ERROR'.
      ENDCASE.
      IF UPD_ZIRD_P_SCHEMES NE SPACE.
        CALL FUNCTION 'CHANGEDOCUMENT_SINGLE_CASE'
          EXPORTING
            TABLENAME              = 'ZIRD_P_SCHEMES'
            WORKAREA_OLD           = O_ZIRD_P_SCHEMES
            WORKAREA_NEW           = N_ZIRD_P_SCHEMES
            CHANGE_INDICATOR       = UPD_ZIRD_P_SCHEMES
            DOCU_DELETE            = 'X'
          EXCEPTIONS
            NAMETAB_ERROR          = 1
            OPEN_MISSING           = 2
            POSITION_INSERT_FAILED = 3
            OTHERS                 = 4.
        CASE SY-SUBRC.
          WHEN 0.                                "OK.
          WHEN 1. MESSAGE A600 WITH 'NAMETAB-ERROR'.
          WHEN 2. MESSAGE A600 WITH 'OPEN MISSING'.
          WHEN 3. MESSAGE A600 WITH 'INSERT ERROR'.
          WHEN 4. MESSAGE A600 WITH 'SINGLE ERROR'.
        ENDCASE.
      ENDIF.
      CALL FUNCTION 'CHANGEDOCUMENT_CLOSE'
        EXPORTING
          OBJECTCLASS             = 'ZSCHEMES'
          OBJECTID                = OBJECTID
          DATE_OF_CHANGE          = UDATE
          TIME_OF_CHANGE          = UTIME
          TCODE                   = TCODE
          USERNAME                = USERNAME
          OBJECT_CHANGE_INDICATOR = OBJECT_CHANGE_INDICATOR
          NO_CHANGE_POINTERS      = NO_CHANGE_POINTERS
        EXCEPTIONS
          HEADER_INSERT_FAILED    = 1
          OBJECT_INVALID          = 2
          OPEN_MISSING            = 3
          NO_POSITION_INSERTED    = 4
          OTHERS                  = 5.
      CASE SY-SUBRC.
        WHEN 0.                                   "OK.
        WHEN 1. MESSAGE A600 WITH 'INSERT HEADER FAILED'.
        WHEN 2. MESSAGE A600 WITH 'OBJECT INVALID'.
        WHEN 3. MESSAGE A600 WITH 'OPEN MISSING'.
       WHEN 4. MESSAGE A600 WITH 'NO_POSITION_INSERTED'.
    do not abort, if positions are not inserted!!!
        WHEN 5. MESSAGE A600 WITH 'CLOSE ERROR'.
      ENDCASE.
    Reward me points if you found it useful.
    Thanks
    Abhishek Raj.

  • Audit Vault 12.1.1 error creating audit trail with TRANSACTION LOG

    Hi,
    i installed AV 12.1.1 , the DB target is with Data Guard.
    when i run the script oracle_user_setup with the mode REDO_COLL the final message is that was succesfull , but when i go to the AV console and try to create an audit trail with TRANSACTION LOG the AV console shows me an error and the log shows me this :
    [2013-10-16T03:37:18.593-05:00] [collfwk] [ERROR] [] [] [tid: 10] [ecid: 192.168.56.8:78800:1381912639433:0,0] RedoCollector : runSourceScript : Error while running script on source for REDO collector.
    [2013-10-16T03:37:19.528-05:00] [collfwk] [ERROR] [] [] [tid: 10] [ecid: 192.168.56.8:78800:1381912639433:0,0] OAV-8004: Failed to start collector {0}:{1}CollectionFactory : createCollection : Exception while creating collection. [[
    Failed to start collector {0}:{1}
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.runSourceScript(RedoCollector.java:816)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.sourceSetup(RedoCollector.java:579)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.setup(RedoCollector.java:454)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.startCollector(RedoCollector.java:216)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollectorManager.startTrail(RedoCollectorManager.java:199)
                    at oracle.av.platform.agent.collfwk.impl.factory.CollectionFactory.createCollection(CollectionFactory.java:504)
                    at oracle.av.platform.agent.collfwk.impl.factory.CollectionFactory.createCollection(CollectionFactory.java:354)
                    at oracle.av.platform.agent.StartTrailCommandHandler.processMessage(StartTrailCommandHandler.java:63)
                    at oracle.av.platform.agent.AgentController.processMessage(AgentController.java:325)
                    at oracle.av.platform.agent.AgentController$MessageListenerThread.run(AgentController.java:1859)
                    at java.lang.Thread.run(Thread.java:679)
    Nested Exception:
    java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges
    ORA-06512: at line 1
                    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
                    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
                    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
                    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
                    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
                    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
                    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
                    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1044)
                    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
                    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
                    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3685)
                    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1376)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:616)
                    at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:230)
                    at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124)
                    at $Proxy2.execute(Unknown Source)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.runSourceScript(RedoCollector.java:747)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.sourceSetup(RedoCollector.java:579)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.setup(RedoCollector.java:454)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.startCollector(RedoCollector.java:216)
                    at oracle.av.platform.agent.collfwk.impl.redo.RedoCollectorManager.startTrail(RedoCollectorManager.java:199)
                    at oracle.av.platform.agent.collfwk.impl.factory.CollectionFactory.createCollection(CollectionFactory.java:504)
                    at oracle.av.platform.agent.collfwk.impl.factory.CollectionFactory.createCollection(CollectionFactory.java:354)
                    at oracle.av.platform.agent.StartTrailCommandHandler.processMessage(StartTrailCommandHandler.java:63)
                    at oracle.av.platform.agent.AgentController.processMessage(AgentController.java:325)
                    at oracle.av.platform.agent.AgentController$MessageListenerThread.run(AgentController.java:1859)
                    at java.lang.Thread.run(Thread.java:679)
    i don't understand why the issue because the user has the privileges given by the script and i tried with grant as sysdba but without any result
    i don't understand what are the privileges that the collector needs.
    any idea?
    thnks for any help

    Hi
    Just run the script $AV_AGENT/av/plugins/com.oracle.av.plugin.oracle/config/oracle_user_setup.sql  USER_NAME REDO_COLL
    This will grant the user some privileges and roles like DBA and CREATE Database Link
    I hope this answer your question
    Thanks
    Ahmed Moustafa

  • REDIRECT JDBC URL WHEN USING DYNAMIC JDBC CREDENTIALS SO NOT HARDCODED

    I have taken over an application that uses row-level security and ADF (using
    dynamic JDBC Credentials). I have been able to set the internal_connection to
    a JDBCDatasource, but cannot set the Connection Type in the Oracle Business
    Component Configuration to a JDBCDatasource. When I do, I receive errors that
    tables are not found. When I set the value back to a JDBC URL, everything
    works fine again.
    I am looking for a solution where the userid and password are not hardcoded in
    the BC4J.xcfg or a way to redirect this information, as we change our system
    passwords every nighty days. Otherwise, I will have to redeploy the
    application every nighty days.
    I did not create this application, but I am sure that you could simply follow
    the "How to Support Dynamic JDBC Credentials" article. From that point, you
    will probably be where I am, where I have the internal_connection set to a
    JDBCDataSource and working properly, but cannot set the Connection Type to
    anything where the userid and password will not be hardcoded or cause failure.
    I wanted to let you know that I have
    found the updated How to Support Dynamic JDBC Credentials
    (http://www.oracle.com/technology/products/jdev/howtos/bc4j/howto_dynamic_jdbc.h
    tml) and was going to run through the "Advanced: Supporting Dynamic JDBC URLs",
    but once I was done keying in
    env.remove(ConnectionStrategy.DB_CONNECT_STRING_PROPERTY); I received a
    depreciation message on the DB_CONNECT_STRING_PROPERTY. (Note: I am coding in
    JDeveloper 10.1.3, so this may be depreciated as of then, but the ADF Libraries
    for JDeveloper 10.1.3 are on our Oracle 10gAS 10.1.2 server.)
    I thought maybe this would resolve my issue, but I can't be sure as the
    deprecation message leads me to believe that this solution may not be viable in
    the future.
    UPDATE
    =======
    The article you are referencing is definitely an older version.
    There is a newer article for 10g at:
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    Please see if that helps.
    I have already reviewed this article.
    In fact, I have reviewed many versions of this document. I have not seen one
    created yet for 10.1.3 though (especially without JSF as our 10.1.2 AS server
    will not support it). I need to find an example or documentation that shows
    how we can keep from having the JDBC URL stored in the BC4J.xcfg or a way to
    use dynamic JDBC credentials with a JDBCDataSource. We do not want to store
    the userid and password in the application, rather, we would like to setup
    something that can be configurable from the application server.
    I think we need to use the dynamic JDBC credentials because we are using the
    row-level security, where we setup a database context for the user and only
    allow certain records of a database table to be returned to the browser based
    on that context.
    Might there be a way to still use the JDBCDataSource?

    I understand that the user provides the userid and password and that these values are setup using the Configuration class.
    However, when I am to deploy the ADF Business Module with my application, I have to specify either a JDBC URL or a JDBC DataSource in the Oracle Business Component Configuration.
    When I use JDBC DataSource, the code does not work properly, almost like the user's credentials are not used for the connection (I get errors like table or view does not exist).
    When I use the JDBC URL, the bc4j.xcfg stores a reference in the JDBCName attribute to a ConnectionDefinition in the same file. It is in this tag of the bc4j.xcfg where the userid, sid, and password (encrypted) is stored and used when retrieving the initial context of the ADF business components.
    It is these values that I want to have stored else where so that the application does not have to be redeployed in order for the password (or sid, or other connection information) to be change.

  • ADF 11g: Dynamic JDBC Credentials, how to postback paramters

    I am currently trying out dynamic jdbc example from Steve. An additional implementation I am trying to accomplish is to retain the username in the input field upon a failed login without having it displayed on the url (the example passes parameters back by putting it on the url followed by redirect). Typically this can be done by setting a new request attribute and using a forward instead of redirect, but the example has some interesting code which explicitly avoids a request forward (See below).
        private void forwardToLoginPage(ServletRequest request, ServletResponse response) throws ServletException,
                                                                                                 IOException {
            HttpServletResponse responseHttp = (HttpServletResponse)response;
            responseHttp.sendRedirect(loginPageRedirectName());
    ...Can anyone shed some light on why this is?
    -Wes

    I am currently trying out dynamic jdbc example from Steve. An additional implementation I am trying to accomplish is to retain the username in the input field upon a failed login without having it displayed on the url (the example passes parameters back by putting it on the url followed by redirect). Typically this can be done by setting a new request attribute and using a forward instead of redirect, but the example has some interesting code which explicitly avoids a request forward (See below).
        private void forwardToLoginPage(ServletRequest request, ServletResponse response) throws ServletException,
                                                                                                 IOException {
            HttpServletResponse responseHttp = (HttpServletResponse)response;
            responseHttp.sendRedirect(loginPageRedirectName());
    ...Can anyone shed some light on why this is?
    -Wes

  • BC4J, JSP, Apache: Deployment to web-inf

    I'm trying to deploy a BC4J JSP application to a web-inf directory. In other words I'm using the OracleJSP extensions that support the globals.jsa application/session context.
    When I place my application's BC4J jar file in the \approot\web-inf\lib directory it doesn't work. When I try a simple app with no BC4J its works. ie. My JSP works and it can load classes from both \approot\web-inf\classes and \approot\web-inf\lib\??.jar.
    If I place the application BC4J jar file in \approot\web-inf\lib it can't find files such as \bc4jpackage\common\bc4j.xcfg. Therefore I think OracleJSP will load classes from \web-inf but because its not really in the JServ classpath BC4J wont find any other files.
    Anyone tried this? Is there a workaround?

    Hi,
    I am yet another victim of the age-old error JBO:33001 bc4j.xcfg file not found in class path, When i have my BC4JApp.jar in Tomcat Web-inf/lib directory. All the other jar files and class files in my webserver-application web-inf classes and lib directory works.
    But Tomcat server is not able to read this bc4j.xcfg file. I can see in my jar file that this bc4j.xcfg exists and in the specified package directory. still the problem persists. My BC4JApp.jar is perfectly working when i use JDeveloper. but not when i use tomcat4.0 and call a JSP using BC4JApp.jar from browser (My environment is Jdeveloper3.2, Tomcat4.0+IIS in middle tier and oracle 8i as DB, everything on windows2k)
    I have gone through almost all the threads possible that relates to this error in this form. None of them have a answer except to say "put the file in classpath". and last reply is "will fix in jDeveloper 9i. So what happens to us who are working in Jdeveloper 3.2?
    1. I have this file in my jar file.
    2. I also tried creating a seperate directory manually, with the same name as my package under web-inf/classes, web-inf/lib , just under web-inf directory and atlast under approot directory also. I tried having my package directory containing bc4j.xcfg in these folders one at a time and also tried having this directory in all these folders at the same time.
    Still no solution.
    Itz frustrating that neither proper documentation nor a right url page nor i am aware of available addressing this. page links given in above threads only gives me the wonderful page of ie's "Page cannot be displayed".
    Is there a answer to this error and my problem. If this doesn't work, then i have to all the way develop from scratch creating my jsp using JDBC calls and Stored packages etc.
    I don't want to give up on this Jdeveloper at this final moment because if this bc4j.xcfg file is found, my application will work perfectly. on these final moments, if this doesn't work, i am frightened to imagine to develop my application in standard way. Atlast, if thatz the option left,we have to do that bcos our production date is close by.
    Please can some one in this forum or Jdeveloper help me to solve this problem. I am desperate and very urgent.
    Waiting for a reply from Jdev team very much...
    Thanks
    Hari(2/3/02)

  • Deployment of BC4J JSP in Java web Server2.0

    I'm presently trying to deploy a BC4j Jsp into the Java Webserver , I have copied all the class , java and the JSP files in the JWS2.0 , but the error I get is as follows :
    Package oracle.jbo.* not found in import ,
    Package javax.naming.* not found in import ,
    Package oracle.jdeveloper.html.* not found in import etc.
    I tried to copy all the JDeveloper class files in the JWS2.0 but no luck ,but here I was able to deploy sucessfully an simple jsp application using a session bean.
    Secondly, I'm not able to use the internal web server of JDeveloper3.0 to run my JSP's , if I try to run, the browser is not able to contact the port no. 7070 and it gives an TCP error / connection error.
    Please also suggest how to include the Jdbc driver in the classpath.
    Thanks in advance ,
    regards,
    Ekta

    Please see the online help for deploying JSP web applications. The instructions are under User Guides, Developing Web Applications, Developing JSPs and Servlets...
    There are a number of dependency archives that need to be deployed to your webserver in order for the BC4J JSPs to run correctly.
    IF you look at the Project Properties for your JSP project, you will see a number of them such as Connection Manager, ORacl e8.1.5 JDBC, etc. EAch of these libraries is based on one or more .jar or .zip files which need to be present in your webserver.
    Which ones you deploy somewhat depends on how you have deployed your Business Components app module. The online help provides more details.
    The Oracle JDBC classes are all located in <JDEV_HOME>/jdbc/lib/oraclex.x.x/classes111.zip. Where x.x.x is the version of the drivers. 8.1.5 is the default in JDev 2. and 3.0.
    Laura

  • For those who used the solution by Steve Muench,Dynamic JDBC Credentials

    hi every body
    is there any body used the solution by Steve Muench, Dynamic JDBC Credentials .
    thanks
    Yaser
    Edited by: 842127 on Mar 13, 2011 9:24 AM

    Hi,
    in the login page i have a button to make login which work perfect
    How can you say ?
    Whenever i click any control in the login page i see this message invalid username/passowrd . i do not why i face this problem ?I have tried changing the username,password and database using http://www.oracle.com/technetwork/developer-tools/jdev/dynamicjdbchowto-101755.html which works perfect.
    refer my thread
    Changing the database for a particular user session
    Regards,
    Santosh
    Edited by: Santosh Vaza on Mar 17, 2011 11:29 AM

  • BC4j/JSP Application not responding after some time - when deployed on 9ias

    Hi,
    We are using BC4j/jsp application on 9ias. The application is not responding
    after some time. We have installed 9ias on PIII(384MB RAM). We tried to accesses
    with 10 users, and server is not responding to BC4J/JSP application.
    However the server could able to publish the JSP pages with standerad JDBC code even after that.
    many many thanks in advance
    null

    When the application deployed by BC4J/JSP not responding, does the sample JSP application still works? i.e. does any other application respond? Does 1 user respond? Is the database source (JDBC), running Oracle 8.1.7? What is the platform running the database (e.g. local NT database)?

  • BC4j/JSP Application not responding after some time - when deployed on 9ias BC4j/JSP

    Hi,
    We are using BC4j/jsp application on 9ias. The application is not responding
    after some time. We have installed 9ias on PIII(384MB RAM). We tried to accesses
    with 10 users, and server is not responding to BC4J/JSP application.
    However the server could able to publish the JSP pages with standerad JDBC code even after that.
    Please....help us.........
    many many thanks in advance

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Is there any mechanism that cleans up these connections (back down to the initial or some other minimum I would guess) or do they hang around until either the app server or database shuts down?<HR></BLOCKQUOTE>
    There is currently no mechanism for reducing the connection pool size after a period of high activity. Recently this has been frequently requested and as such will be implemented in the next production release.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>We have verified this in manual testing. However, when the load tool script exits it doesn't seem to release resources. We know this because we keep seeing our database connections go up and up as more tests are run. Further, we also seem to see more than one connection per "virtual user". For example, when I connect 5 users to the app in manual testing, I get 5 connections. But, when we run a test using the tool, we get 395 database sessions for 200 users. We are having a bit of difficulty understanding why the behavior is different.<HR></BLOCKQUOTE>
    Assuming that the you are performing your manual testing against the same instance of the application on which you are performing your load testing, I would assume that the connections are being released to the pool at the end of the request. One possible reason for the approximate 2:1 ratio between connections and virtual users may be BC4J's use of internal connections. What version of BC4J are you using?
    BC4J requires an internal connection to support state management and spill to disk. The internal connections are pooled with the transaction connection and only held for the duration of the persistence operation. However, if the web server is very busy then a large number of synchronous persistence requests may be received which would explain the eventual 2:1 ratio in the pool's high water mark.
    If the user start times and think times are staggered in order to reduce the incidence of synchronous persistence requests does the ratio of connections to web sessions stabilize at some lower number (i.e. 1.5:1)

  • Java Portlet built with BC4J JSP

    Dear Forum,
    The BC4J JSP tag "jbo:ApplicationModule" creates a stateful session by storing a sessioncookie: When this cookie is found, the application module object will be re-used across webpages.
    When a Java Portlet is built using BC4J-JSP, this portlet plants a cookie in its client (the portal). This seems however not to be possible. This means that the portlet can only be stateless.
    Has anyone a clue how to plant a cookie in the portal; thus enabling stateful sessions?
    Kind regards,
    Edwin Grosmann

    It looks like WebSphere is wrapping the Oracle JDBC driver with it's own classes (like com.ibm.ejs.cm.proxy.OraclePreparedStatementProxy).
    On Step 1 of the Business Components Project Wizard, change the SQL Flavor toSQL92 and the Type Map to Java.
    This is the same type of thing required with talking to non Oracle databases (in short, it tells BC4J not to cast things to Oracle classes and just talk against java.sql.*)
    Hope this helps,
    Rob
    Team JDev

  • Apex - Audit Trail With External Database

    I'm currently trying to setup a primitive audit trail that allows me to record create data, create user, update date, update user. I currently have 3/4 however I can't get the username into database as V('APP_USER') is within Apex and the database is in Oracle 10G elsewhere.
    Any suggestions or alternative ideas?

    f1f7a787-7f56-4451-8300-5a9a0215226b
    So v() and apex_application.g_user are unavailable in the trigger code on the external database.
    But procedures and package variables from the external database are available on the database running APEX.
    What I would do is create a package with a package variable that will hold the apex user. ( in the external database)
    Then in application definition > Database session> initialization PL/SQL code set this package variable to the apex user.
    Clear the package variable again in the cleanup code.
    Using a package variable will mean that the value is aviable during the whole database session but not outside of is.
    In apex every page load or submit and following page load is a database session.
    Now the package variable will be set when it is a apex user and null when it is a database user.
    Using a nvl round the package variable with user as alternative will give the apex user when the action was done by a apex user and the database user when not.
    Nicolette
    Ps changing your handle or at the very least signing your post will result in a more friendly greeting.

  • OAV-9016 - Audit Vault 12.1.1 error creating audit trail with TRANSACTION LOG

    Hey guys,
    I bumped into this problem when trying to start an audit trail with TRANSACTION LOG.
    Oracle Audit Vault and Database Firewall 12.1.1.1
    Oracle 11gR2 RAC two nodes, OEL x64.
    Connection String:
    jdbc:oracle:thin:@//192.168.1.139:1521/orcl
    I have already ran the sql setup for a REDO_COLL user.
    Any ideas?
    I have created secure target for each node.
    (host01)(oracle@orcl1):log> pwd
    /u01/app/oracle/agent/av/log
    (host01)(oracle@orcl1):log> cat av.collfwk-8311-0.log
    [2013-12-12T17:16:49.855-02:00] [collfwk] [ERROR] [] [] [tid: 22] [ecid: 192.168.1.109:27132:1386867392018:0,0] OAV-9016: Target database global_name is not correct. global_name must include the domain for transaction log collection. Please configure the target database with the correct global_name.CollectionFactory : createCollection : Exception while creating collection. [[
    Target database global_name is not correct. global_name must include the domain for transaction log collection. Please configure the target database with the correct global_name.
            at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.checkDBName(RedoCollector.java:1480)
            at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.verifySource(RedoCollector.java:1278)
            at oracle.av.platform.agent.collfwk.impl.redo.RedoCollector.startCollector(RedoCollector.java:215)
            at oracle.av.platform.agent.collfwk.impl.redo.RedoCollectorManager.startTrail(RedoCollectorManager.java:199)
            at oracle.av.platform.agent.collfwk.impl.factory.CollectionFactory.createCollection(CollectionFactory.java:504)
            at oracle.av.platform.agent.collfwk.impl.factory.CollectionFactory.createCollection(CollectionFactory.java:354)
            at oracle.av.platform.agent.StartTrailCommandHandler.processMessage(StartTrailCommandHandler.java:63)
            at oracle.av.platform.agent.AgentController.processMessage(AgentController.java:325)
            at oracle.av.platform.agent.AgentController$MessageListenerThread.run(AgentController.java:1859)
            at java.lang.Thread.run(Thread.java:722)
    (host01)(grid@+ASM1):~> lsnrctl status
    LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 12-DEC-2013 17:27:34
    Copyright (c) 1991, 2011, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
    Start Date                12-DEC-2013 16:58:03
    Uptime                    0 days 0 hr. 29 min. 31 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
    Listener Log File         /u01/app/grid/diag/tnslsnr/host01/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.109)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.139)(PORT=1521)))
    Services Summary...
    Service "+ASM" has 1 instance(s).
      Instance "+ASM1", status READY, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
      Instance "orcl1", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
      Instance "orcl1", status READY, has 1 handler(s) for this service...
    The command completed successfully
    (host01)(grid@+ASM1):~>
    (host01)(grid@+ASM1):~> cat /u01/app/11.2.0/grid/network/admin/listener.ora
    LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
    LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3))))                # line added by Agent
    LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2))))                # line added by Agent
    LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON                # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON                # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
    (host01)(grid@+ASM1):~>

    Hi
    Just run the script $AV_AGENT/av/plugins/com.oracle.av.plugin.oracle/config/oracle_user_setup.sql  USER_NAME REDO_COLL
    This will grant the user some privileges and roles like DBA and CREATE Database Link
    I hope this answer your question
    Thanks
    Ahmed Moustafa

Maybe you are looking for