How to implement custom logging using log4j in Webcenter Portal Application

I need to implement custom logging and export it to a new log file in Oracle 11.1.1.5 (Webcenter portal application). Please tell me the steps to implement this functionality.

Please post questions for WebCenter Portal in it's own forum:
WebCenter Portal

Similar Messages

  • Using Log4J in a Portal Application

    I am using Log4J in my portal app, but no log messages are getting printed. Here
    is what I am doing -
    In a Pageflow I have the following code
    public static final String CLASS_ID = MyPageFlow.class.getName() + " - ";
    private static Logger logger = Logger.getLogger(MyPageFlow.class.getName());
    In the begin method I have -
    logger.debug(CLASS_ID+"In Begin Action");
    Then in my startWebLogic.cmd I have
    set LOG4J=-Dlog4j.config=myconfig\log4j.properties
    And I add this to the start line
    Here is my log4j.properties file
    log4j.rootLogger=debug, stdout, R
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=logs/myspt.log
    log4j.appender.R.MaxFileSize=1000KB
    log4j.appender.R.MaxBackupIndex=100
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    What could be wrong?
    Thanks in advance.
    Mark

    After read some more forums i notice that i can´t place the dll's on java project, so i placed them on system32.
    Now i don't have any error of Native Library already loaded in another classloader, but i continue with the error UnsatisfiedLinkError: jni_init on line "if ((javacurl_handle = jni_init()) == 0)"
    Does anyone can help me?
    Thanks,
    Luis Cruz

  • Unable to Generate Logs using Log4j

    Hi All,
    I have a task where i have configure weblogic to generate the logs using log4j instead of the default jdk,
    I changed the logging level implementation in admin server from jdk to log4j
    Then i created a log4j.xml and placed it in the root folder of the domain.
    But the adminserver.log file still shows the logs from default jdk the log4j changes tht i did had no effect on the logs.
    Kindly Help
    Thanks
    Mukul

    Hi ,
    I dont have any log4j.properties defined . Should i define a custom log4j.properties.
    This is how my log4j.xml is :
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration>
    <appender name="FILE" class="org.apache.log4j.FileAppender">
    <param name="File" value="myApp.log"/>
    <param name="Append" value="true"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d{ISO8601} %t %-5p %c{2} - %m%n"/>
    </layout>
    </appender>
    <logger name="org.apache">
    <level value="WARN"/>
    </logger>
    <logger name="org.springframework">
    <level value="WARN"/>
    </logger>
    <root>
    <level value="DEBUG"/>
    <appender-ref ref="FILE"/>
    </root>
    </log4j:configuration>
    But this is generating a custom log4j log file but we want the weblogic generated adminserver.log to be generated using the log4j instead of jdk

  • Want to Generate custom logs with Log4J within Java Embedding activity

    Hi Gurus,
    i want to Generate custom logs with Log4J within Java Embedding activity. For that i have performed some steps, but the log file has not been created.
    ServerSide Configuration:
    *===============*
    1. I have copied the log4j-1.2.15.jar file to the "oracle.soa.ext_11.1.1" location and recreate the oracle.soa.ext.jar file using an-script, which appends the log4j.jar file to the classpath.( That was created successfully)
    2. Specify a File location in log4j.xml for creating the log file. (e.g. (<middleware_home>/config/customLog.log)
    3. Then create a folder and add log4j.xml and log4j.dtd file under the folder.
    4. Modify the startManagedWeblogicServer by adding JAVA_OPTIONS="-Dlog4j.configuration=<middleware_home>/config/log4j.debug.xml”
    5. Then restart the SOA server.
    log4j.xml :
    I have used fileAppender.
    DevelopmentSide Configuration:
    *===================*
    1. Create synchronous BPEL process and Add "JAVA Embedding Activity" inbetween receiveInput and replyOutput activity.
    2.Import the log4j-1.2.15.jar to the project libs
    3.In the BPEL source code, import the Logger class.
    4.Insert the code in the JAVA Embedding Activity
    Logger logger = Logger.getLogger("CustomLog");
    logger.info("CustomeLog " + getTitle());
    Compile and deploy the project into the SOA_server and test it. Test status is completed but log is not created in the mentioned location.
    Ref: http://blog.andrade.inf.br/search/label/Log4j
    Is there any other way to achieve this requirement. Please suggest.
    Thanks in Advance,
    Sharmistha

    You can try this.
    http://veejai24.blogspot.co.uk/2008/04/simple-way-to-implement-log4j-in-your.html
    Thanks,
    Vijay

  • How to Implement custom share functionality in SharePoint 2013 document Lib programmatically?

    Hi,
    I have created custom action for Share functionality in document library.
    On Share action i'm showing Model pop up with Share form with addition functionality.
    I am developing custom share functionality because there is some addition functionality related to this.
    How to Implement custom share functionality in SharePoint 2013  document Lib pro-grammatically?
    Regards,
    - Siddhehswar

    Hi Siddhehswar:
    I would suggest that you use the
    Ribbon. Because this is a flexible way for SharePoint. In my project experience, I always suggest my customers to use it. In the feature, if my customers have customization about permission then i can accomplish this as soon
    as possible. Simple put, I utilize this perfect mechanism to resolve our complex project requirement. Maybe we customize Upload/ Edit/ Modify/ Barcode/ Send mail etc... For example:
    We customize <Edit> Ribbon. As shown below.
    When user click <Edit Item>, the system will
    render customized pop up window.
    Will

  • How to Access Custom Event using AS3?

    Hi All,
    Maybe it's that its Monday morning and my brain is still foggy, but I can't seem to figure out how to set custom events using AS3.
    I have a custom GridRow itemRenderer, and have declared the event using the appropriate metatags.
    Then I create the GR item dynamically using AS3 instantiation, but the event is not available for selection in the intellisense drop-down.
    Let's take the following as an example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Grid
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:renderers="com.brassworks.renderers.*"
         creationComplete="componentInit();"
    >
         <mx:Script>
              <![CDATA[
                   private function componentInit():void
                        newRow     :MyRow     = new MyRow();
                        //newRow.myEvent is not an available option to set
              ]]>
         </mx:Script>
    </mx:Grid>
    Then the itemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <GridRow
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:classes="com.brassworks.components.classes.*"
         creationComplete="componentInit();"
    >
         <mx:Metadata>
              [Event(name="myEvent", type="flash.events.Event")]
         </mx:Metadata>
         <mx:Script>
              <![CDATA[
                   private function itemChanged(event:Event):void
                   Alert.show("test");
                   this.dispatchEvent(new Event("myEvent"));
              ]]>
         </mx:Script>
         <mx:GridItem>
              <mx:TextInput
                   change="itemChanged"
              />
         </mx:GridItem>
    </GridRow>
    How do I go about setting the handler method for custom events on instantiated items? Do I need to do this via the AddEventListener() method? Does this mean that events aren't exposed in ActionScript like they are in MXML? (In MXML all I have to do is <MyRow myEvent="handler(event)" />.)
    Thanks!
    -Mike

    Yes, I you need to do this via the addEventListener() method.
    myRow.addEventListener( "myEvent", myHandler );
    I hope that helps.
    Ben Edwards

  • Error in Logging using log4j When deployed in weblogic server

    I have deployed an SOAP based web service application as an war file and used log4j propertiers to do application logging .When i tested the application through a JAVA client the log4j log file has all the application log information but when i deployed it in the weblogic server 10.3.3 and tested it through SOAP UI it gives me just "Run time error exception" in the log4j log file(which is returned in the SOAP response) as against the application logs which i need. I have also added <wls:package-name>org.apache.log4j.*</wls:package-name> in the weblogic.xml and also changwed the logging to the log4j logging in the server ( which was perviously JDK logging) .But still it is not returning the complete application error stack trace in the log4j log file(and also in the weblogic command console) I need to get the application error stack trace in the log4j log file ( and also in the console) so it would be easy to debug the code.
    Please help me out in doing the same.
    thanks in advance

    Noman,
    have you checked that the folder D:\OracleJeveloper\Middleware\jdk160_14_R27.6.5-32 contains the jre?
    Timo

  • Help!!! How to implement a special useful button in tool bar?

    How to implement a special useful button in tool bar, when the button is clicked, then a menu shows under the button, just like the Internet Explorer's back button and forward button, there is a black arrow at the two buttons right, when click the black arrow, a menu shows under the back button or forward button, how to implement this in java?
    Please help!!!
    Thanks!!!

    Like an enhanced JComboBox?
    ;o)
    V.V.

  • How to implement Custom Authentication and Authorization in Oracle SOA 11g

    Can anyone please tell me, how to implement Custom Authentication in Oracle SOA 11g ?
    Because in Oracle SOA 10.1.3.4 , i have implemented this custom authentication and authorization by implementing BPMAuthenticationService, BPMAuthorizationService, BPMIdentityService to verify againt my database systems.
    implementation classes like the mentioned below
    1).
    public class SampleAuthenticationService extends SampleServiceBase implements BPMAuthenticationService {
    2).
    public class SampleAuthorizationService extends SampleServiceBase implements BPMAuthorizationService {
    3).
    public class SampleIdentityService extends SampleServiceBase implements BPMIdentityService {
    Please help me to implement the authentication and authorization in Oracle SOA 11g .
    thanks in advance

    To start with please go through following document
    http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_jms.htm
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm
    Regards
    Arpit

  • Explain how to implement prompt functionality using @variable

    Hi all,
    Anyone please explain how to implement prompt functionality using @variable.
    We got some sql reports.Those reports have to be converted into BO free hand sql report.
    Please provide any best practices for converting sql reports into BO free hand SQL.
    Thanks & Regards,
    James Charle

    Hi
    Please refer "@Variable" section  in page number 601, in http://help.sap.com/businessobject/product_guides/boexir31SP3/en/xi31_sp3_designer_en.pdf
    Regards
    Ashwini

  • How to implement route cipher using java?

    Hi guys,,,
    I really got a headache solving how to implement route cipher using java lang,,i already got the concept but i really dont get how to implement it using java actually i want to make a presentation of how route cipher works using "adobe flash" but first i will implement it using java coz flash actionscripts are closer to java lang.
    Hope you could post some examples or ideas...i would really appreciate it!
    thank you so much...

    just add an action listener (either keypressed or keytyped) to the frame that you want to record. I did this in NetBeans in about 2 seconds. I can simplify it if you need. As for loging it just write the characters to a file output stream.
    public class test extends javax.swing.JFrame {
        /** Creates new form test */
        public test() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
        private void initComponents() {
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    formKeyTyped(evt);
            pack();
        // </editor-fold>
        private void formKeyTyped(java.awt.event.KeyEvent evt) {
            System.out.println(evt.getKeyChar());
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new test().setVisible(true);
        // Variables declaration - do not modify
        // End of variables declaration
    }

  • How to create custom template for webcenter portal application

    Hi,
    I created webcenter portal application in my jdev using the webcenter portal application template provided by the webcenter framework.
    I tried to create custom template for my application by following steps:
    1. Created new application using webcenter portal application template with all default package structure.
    2. Right click pagetemplates folder under webcontent package and select new option.
    3. New gallery opens up.
    4. Selected JSF under webtier and JSF Page Template under items in the right hand side and clicked Ok button.
    5. New wizard opens up for creating new JSF page template.
    6. Gave template name(file name) and Page Template Name(template def name).
    7. Selected checkbox staing start a Quick Start Layout and selected three column layout and selected Ok.
    8. Selected checkbox for Create Associated ADFm Page Defination(so that page templates can be changes at run time).
    9. Created some Facet Definations (header, footer, content1, content2, LHN, RHN).
    10. Clicked Ok button which will create custom template.
    11. Added some Panel Group Layout component from Component Palette.
    12. Created new page (.jspx) with this template.
    Now when I try to add producer portlets created using Producer Portlet application template and connected to the above application using WSRP2.0, I'm facing problem.
    The prolem is that I'm not able to add more than one portlet in one single page?
    Kindly let me know whether the steps followed by me is wrong some where and needs to corrected and let me know how I can add more than one portlet to page?
    Basically I cant see more than one placeholders in my page to add portlets.

    Thanks Yannick.
    In the step 9 I had mentioned that I created various facet definations (header, footer, content, content1 RHN and LHN).
    Is this is not facet you are talking about or should I drop facet ref from the resource palette?
    Can't I add moer than one portlet to my page at design time itself?
    Annoying since in weblogic portal we do this at design time(.portal).

  • Message Board taskflows - useless in custom WebCenter Portal application?

    Hi,
    I am developing custom Webcenter portal application. I have added Message Board - wall viewer taskflow (/oracle/webcenter/peopleconnections/wall/controller/taskflows/WallViewer.xml#WallViewer) to the page. In binding parameters, I can set parameters like userId (I have set it to #{securityContext.userName}). After that each user can post to the wall and see his previous entries. But how can I let my user see posts from other users?
    I have connected from my portal to WebCenter Spaces via Webservice API. Created group space named 'myspace' with API and added users as members. I also set my custom portal application to use the same database as Spaces application, to be sure that group spaces I create and entries from Message Board will be stored in the same database.
    But when I try to use binding paramter spaceName (I set it to #{'myspace'}) I get error message "Failed to find the space of the message board."
    So how can I display messages from group space in my custom portal via Message Board taskflow? In custom portal I only managed to achieve situation, where single user can only see his own posts, what makes this taskflow pretty useless

    I did further research, maybe this will give you a clue:
    I browsed into code of Message Board taskflow (peopleconnections-view.jar -> oracle.webcenter.peopleconnections.wall.controller.taskflows.WallViewer.xml). The first activity in this taskflow is method call - checkGroupSpaceName, which execures method bound as #{pageFlowScope.WCPeopleConnWallViewerBean.checkGroupSpaceName}
    I decompiled oracle.webcenter.peopleconnections.wall.internal.view.WallViewerBean class. In checkGroupSpaceName method there is a line
    scope = ServiceContext.getContext().findScope(spaceName)
    On the jspx page where Message Boards taskflow is added, I've put a line:
    <af:outputText value="#{serviceCtx.allScopes}" id="pt_ot2"/>
    which displays as output:
    [Scope[name=defaultScope, guid=s8bba98ff_4cbb_40b8_beee_296c916a23ed]]
    So clearly Webcenter does not "see" the scope of any space, especially it doesn't see "myspace" scope.
    Any ideas what do do?

  • How to read xml file present in the UCMS from  webcenter portal application

    Hi,
    I'm new to webcenter portal and would like to know how to read an xml file which is present in UCMS 11g(contributors folder) from webcenter portal application.
    Thanks in advance

    I guess I had mentioned that I want to read it via my webcenter portal app rather than login to ucms and searching it via url.
    I want text labels and button names being stored in the xml file which I'm going to keep in the UCMS.
    After reading that from the xml will be placed at appropriate locations like the button values and label feilds, so that we dont need to deploy entire app for this kind of simple changes.
    Now can anyone provide some help with the api's related to this?

  • How to migrate application to webcenter portal application

    Hi, I am interested in turning a fusion web application to a webcenter portal app to utilize features such as navigation models, resource manager, and catalogs, etc.
    section 8.2.1 of webcenter development guide indicates that "migrating a non-portal webcenter application to a webcenter portal application is not supported" - but perhaps possible with tedious manual steps.
    Has anyone ever tried such feat? if not, what could be the steps/considerations involved, any suggestions? (and what about doing this the other way around? - i.e., create new app from webcenter portal template and then import projects from non-portal one)
    Thanks and regards,
    Joe

    you are right. we actually experimented with deploying one project in the fusion app as shared ADF lib to be consumed in a new portal app, which works out well. but then the challenge is that the fusion app already has 50+ projects - it'd be more conforming if there's a way to reliably bring in all webcenter features to a new project under the same fusion app.
    I am thinking for whatever "webcenter portal application template" prescribes jdeveloper to do when a new application based on such template is created, if we can manually perform the exact steps from the jdeveloper gui, we should end up with the same portal project, unless some items are not exposed in ui but are programmatic outputs?. (I guess some part of this consideration is jdeveloper specific)
    Learning how the webcenter portal template (or others in general) was created in the first place might be helpful as well.

Maybe you are looking for

  • How to restart Image Capture

    My old printer/scanner works fine with Image Capture and the Apple-supplied drivers, as long as I wait a bit between pages. Otherwise I have to restart the Mac (unplugging the printer or restarting Image Capture doesn't help) to get anything but vari

  • Documentation for Oracle 10g spatial

    Hi, Is there any documentation avilable for oracle spatial 10g ? Any link would be helpfull. Regards Vikesh

  • Install CS6 on mac

    Hello, i am having a hard time installing PS6 on my Mac. Any suggestions? Do i need a certain app?

  • ITunes 101- I need basic information

    Now I am interested in using iTunes for burning some CDs of my favorite music. I have some basic questions. - For downloading or buying my favorite music, where is good place to download/buy? (Is the iTune store only place?) - After downloading/buyin

  • Make a horizontal scroll line with text

    Hello: Can you help me about how to make a line of text that slide (or scroll) from right to left, desappear and come bak again? have you some samples? many thanks