How to use commons.logging in weblogic (8.1)?

Greetings,
I'm trying to use commons.logging framework to manage the logs of my
application. With Weblogic I will use an implementation that works with
weblogic.logging package but with other J2EE products I'll use another
native log implementations or frameworks (for instance, for jboss I will
use log4j).
1) I created a class WeblogicLogger which implements the Log interface::
public final class WeblogicLogger implements Log {
I packaged this class in a jar file with a properties file,
commons-logging.properties, which has the property setting my class
below has the default logger:
org.apache.commons.logging.Log=pt.ptinovacao.weblogic.logging.WeblogicLogger
2) My sample code has the following code:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private static final Log log = LogFactory.getLog(
LogTimeStartHandler.class.getName());
something(){
log.info(this.getClass()+" test log");
3) I added the commons-logging jars and my jar with my custom wrapper
weblogic logger in ${WL_HOME}/common/bin/commEnv.sh:
WEBLOGIC_CLASSPATH=
(...)${CLASSPATHSEP}${WL_HOME}/server/lib/weblogiclogger.jar${CLASSPATHSEP}${WL_HOME}/server/lib/commons-logging-api.jar${CLASSPATHSEP}${WL_HOME}/server/lib/commons-logging.jar
However, my loggings still not appear in my weblogic server. Did I miss
something?
thanks,
Pedro Salazar

Did you manage to get this working?
If yes ... what did you do?
I am having the same problem implementing commons-logging with log4j

Similar Messages

  • How to direct commons-logging to jdev console instead of DefaultServer.log

    Hi,
    I have configured commons-logging in my adf 11g application. I added the following line to the commons-logging.properties file:
    org.apache.commons.logging.LogFactory=weblogic.logging.commons.LogFactoryImpl
    I have added the JDev11.1.1.1.0/modules/com.bea.core.weblogic.commons.logging_1.3.0.0.jar as library to my project. If in my weblogic server i set the correct logger settings for my classes i see al log messages in the DefaultServer.log file. How can i make these appear in the JDeveloper console instead?
    Kind Regards,
    Andre

    Hi,
    Found it out by myself so for everybody that wants to do the same.... In the weblogic console logging tab i needed to set the Severity level of Message Destination Standard Out to Debug. Since i now can see all logging in the JDev console i set the Message Destination Log File to warning so the log file does not get to big.
    Kind Regards,
    Andre

  • How to use common resource bundle across all the development components ?

    Hi,
    I am working on SAP NetWeaver Developer Studio - JAVA
    How to use common resource bundle across all the development components ?
    Description :
    I have a requirement of creating a resource bundle (resource.properties) and use that common resource bundle in all the development components.
    Can we create a  development component (war and ear both) and create only resource.properties in this development component( DC ) and create the dependency of the same DC  in all the other DCs ?
    Thanks,
    Neha

    Hello Neha 
    This question is more NWDS related.
    You may have a better chance of someone answering the thread under
    SAP Netweaver -> SAP NetWeaver Development Infrastructure (NWDI, formerly known as JDI) forum
    Thanks
    Kenny

  • How to use Domino LDAP in WebLogic Portal 8.1?

    Hi, all
    I'm trying to solve the problem of how to use Domino LDAP in WebLogic Portal 8.1. Anybody who have this experience please help me.
    Best Regards,
    Sean

    Hi,
    I just spoke to BEA and domino LDAP not supported although they gave me these
    LDAP filters that might help -
    http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_solution&answerpage=solution&page=wls/S-09460.htm
    Sean Lin <[email protected]> wrote:
    Hi, all
    I'm trying to solve the problem of how to use Domino LDAP in WebLogic
    Portal 8.1. Anybody who have this experience please help me.
    Best Regards,
    Sean

  • How to use log4j logging

    Hi all,
    i'm very new to the world of software devlopment.I'm currently working on devloping banking application in JAVA.
    I wanted to log all the exceptions thrown by the code.
    Could any one of you tell me as to how to use log4j logging in my project. Also where to find the jar file. I searched the entire web but i didn't find it anywhere.
    Thanks

    You should find what you need on the Log4j Project Page.

  • EJBC error when using Commons Logging API

    All,
    I am using weblogic 7.0 and Commons with log4j.When I run the
    ejbc I get the following error.
    There is no package called Lorg in my classpath.
    Any suggestions on why this is happening?
    Thanks in Advance,
    Chandrav
    [java] ERROR: Error from ejbc: Class not found: Lorg/apache/commons/logging/Log;
    [java] <Apr 23, 2003 1:59:58 PM PDT> <Warning> <EJB> <010054> <EJB Deploym
    ent: ServiceProviderInterfaceEntityBean has a class com.wisor.validator.servicep
    rovidermanagement.entitybean.ServiceProviderInterfaceEntityLocal which is in the
    classpath. This class should only be located in the ejb-jar file.>
    [java] [EJBCompiler] : Recompiling because no previous hashes found
    [java]
    [java] java.lang.NoClassDefFoundError: Class not found: Lorg/apache/commons
    /logging/Log;
    [java] at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBCompl
    ianceChecker.java:282)
    [java] at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymen
    tInfo(EJBComplianceChecker.java:227)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompile
    r.java:923)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.j
    ava:879)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:23
    2)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
    96)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:459)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
    [java] at weblogic.ejbc.main(ejbc.java:21)
    [java]
    [java]
    [java] ERROR: ejbc found errors
    [java]
    BUILD FAILED

    make sure you have defined the commons logging jar as a Class-Path entry in
    your ejb jar META-INF\manifest.mf file
    \"Chandrasekaran.V" <[email protected]> wrote in message news:<3ea75721$[email protected]>...
    All,
    I am using weblogic 7.0 and Commons with log4j.When I run the
    ejbc I get the following error.
    There is no package called Lorg in my classpath.
    Any suggestions on why this is happening?
    Thanks in Advance,
    Chandrav
    [java] ERROR: Error from ejbc: Class not found: Lorg/apache/commons/logging/Log;
    [java] <Apr 23, 2003 1:59:58 PM PDT> <Warning> <EJB> <010054> <EJB Deploym
    ent: ServiceProviderInterfaceEntityBean has a class com.wisor.validator.servicep
    rovidermanagement.entitybean.ServiceProviderInterfaceEntityLocal which is in the
    classpath. This class should only be located in the ejb-jar file.>
    [java] [EJBCompiler] : Recompiling because no previous hashes found
    [java]
    [java] java.lang.NoClassDefFoundError: Class not found: Lorg/apache/commons
    /logging/Log;
    [java] at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBCompl
    ianceChecker.java:282)
    [java] at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymen
    tInfo(EJBComplianceChecker.java:227)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompile
    r.java:923)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.j
    ava:879)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:23
    2)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
    96)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:459)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
    [java] at weblogic.ejbc.main(ejbc.java:21)
    [java]
    [java]
    [java] ERROR: ejbc found errors
    [java]
    BUILD FAILED

  • How to use security roles in Weblogic server?

    Hello Gurus,
    I am new to Weblogic server and I am trying to investigate how to make
    use of security roles in weblogic server (5.1.0). Can anyone point me
    to some documentation. Specifically, I am looking for instance level,
    and method level security and how to use it.
    Thanks for taking your time to read this e-mail.
    Thank You all in advance,
    Hari.

    You should read the security information in the Servlet 2.2 specification
    that WL 5.1 implements:
    http://java.sun.com/products/servlet/download.html
    Chapter 11 deals with declarative and programmatic security, and includes a
    section on roles:
    11.4 Roles
    A role is an abstract logical grouping of users that is defined by the
    Application Developer or
    Assembler. When the application is deployed, these roles are mapped by a
    Deployer to security
    identities, such as principals or groups, in the runtime environment.
    A servlet container enforces declarative or programmatic security for the
    principal associated with
    an incoming request based on the security attributes of that calling
    principal. For example,
    1. When a deployer has mapped a security role to a user group in the
    operational environment. The
    user group to which the calling principal belongs is retrieved from its
    security attributes. If the
    principal's user group matches the user group in the operational environment
    that the security
    role has been mapped to, the principal is in the security role.
    2. When a deployer has mapped a security role to a principal name in a
    security policy domain, the
    principal name of the calling principal is retrieved from its security
    attributes. If the principal is
    the same as the principal to which the security role was mapped, the calling
    principal is in the
    security role.
    Cameron Purdy
    http://www.tangosol.com
    "Hari" <[email protected]> wrote in message
    news:[email protected]..
    Hello Gurus,
    I am new to Weblogic server and I am trying to investigate how to make
    use of security roles in weblogic server (5.1.0). Can anyone point me
    to some documentation. Specifically, I am looking for instance level,
    and method level security and how to use it.
    Thanks for taking your time to read this e-mail.
    Thank You all in advance,
    Hari.

  • How to use standalone portlets in weblogic 8.1

    I have a pageflow that is pretty simple.
    It begins by forwarding the user to index.jsp that contains a hyperlinked list of available reports.
    When the user clicks on one of the hyperlinked reports, I would like it to forward to an action that initializes that report which in turn forwards to a jsp that opens a new popup window without any look and feel (just a plain white window) and renders the report inside of that window. I would like all of my previously set pageFlow variables to be available within that window.
    From what I have gathered this is called a "standalone" portlet and there is a jsp tag and also a java class that can be used to accomplish this.
    However, I have not had luck with either of these. When I used the JSP tag it opens the portlet in a new window without the look and feel as expected, but the portlet state is "reset", all page flow variables are reset, and the pop up window restarts at the "begin" action and re-displays the hyperlinked list of available reports. When I try to use the StandalonePortletURL class I get a Null Pointer Exception whenever I try to create the URL like this StandalonePortletURL.createStandalonePortletURL(getRequest(), getResponse()).
    The only work-around I have found is to first set the variables I need access to in the session and then manually redirect to the JSP outside of the page flow. When I do this I lose all access to the pageFlow variables so I have to refer back to the session to access the variables I need. This works but seems really sloppy and cumbersome.
    Appreciate any help. Thanks.
    Edited by: user6093557 on Mar 5, 2011 12:58 PM

    Did you manage to get this working?
    If yes ... what did you do?
    I am having the same problem implementing commons-logging with log4j

  • How to configur log4j logging for weblogic 10.1

    Hi,
    I am tried to set log4j logging for my application running in weblogic 10.1. I set a log4j.properties file and loaded the properties by a servlet. Where its load the properties files and configure it by PropertyConfigurator.
    The same logic has worked out in websphere. But in weblogic, it is not working. I set the server logging and domain logging to Log4j in Admin console. Now it is writing all the log statements.
    If i write a property for a package to Error level and root level is Debug. Its not working, all debug statements are getting written.
    Can you please tell me the steps to configure log4j logging in weblogic 10.1.
    Thanks & Regards,
    Nasrin.N

    Did you manage to get this working?
    If yes ... what did you do?
    I am having the same problem implementing commons-logging with log4j

  • How to use RDBMS Realm in Weblogic Commerce Server?

    Hi All,
    Same as the subject.
    Thx
    Ray

    You should read the security information in the Servlet 2.2 specification
    that WL 5.1 implements:
    http://java.sun.com/products/servlet/download.html
    Chapter 11 deals with declarative and programmatic security, and includes a
    section on roles:
    11.4 Roles
    A role is an abstract logical grouping of users that is defined by the
    Application Developer or
    Assembler. When the application is deployed, these roles are mapped by a
    Deployer to security
    identities, such as principals or groups, in the runtime environment.
    A servlet container enforces declarative or programmatic security for the
    principal associated with
    an incoming request based on the security attributes of that calling
    principal. For example,
    1. When a deployer has mapped a security role to a user group in the
    operational environment. The
    user group to which the calling principal belongs is retrieved from its
    security attributes. If the
    principal's user group matches the user group in the operational environment
    that the security
    role has been mapped to, the principal is in the security role.
    2. When a deployer has mapped a security role to a principal name in a
    security policy domain, the
    principal name of the calling principal is retrieved from its security
    attributes. If the principal is
    the same as the principal to which the security role was mapped, the calling
    principal is in the
    security role.
    Cameron Purdy
    http://www.tangosol.com
    "Hari" <[email protected]> wrote in message
    news:[email protected]..
    Hello Gurus,
    I am new to Weblogic server and I am trying to investigate how to make
    use of security roles in weblogic server (5.1.0). Can anyone point me
    to some documentation. Specifically, I am looking for instance level,
    and method level security and how to use it.
    Thanks for taking your time to read this e-mail.
    Thank You all in advance,
    Hari.

  • How to use jndi datasource on Weblogic instead of adding a DB data source

    Hi All,
    version: 11.1.1.4
    I am trying to figure out how in my ADF applications I can use an existing jndi datasource out on our weblogic servers instead of having to bury the Database db source in my adf applications. Like SOA I would like to reference the DB directly during design so I can pull in entities and build view objects, but when I deploy I want it to reference the jndi datasource out on the weblogic server.
    Is this possible? If so I am not sure how to configure it like I would a DB adapter in SOA.
    As always appreciate the info.
    Thanks,
    S

    If you use ADF in the model layer (application modules) you can configure them to use JNDI Datasources. Just right click on the application module and select 'Configurations...'. In the next dialog you see all the configurations currently available (one named xxxxxlocal and one named xxxxxshared at least). Select the local and hit the edit button. This open the DB connect dialog where you can change the connection from JDBC URL to JDBC Datasource (JNDI). Save your work and when you now start the app it will use the JNDI name.
    Timo

  • How to use common access card (CAC) reader with Mozilla Firefox?

    Please provide information on how to update Mozilla Firefox settings to allow common access card (CAC) reader digital certificates, thank you.

    Try this thread:
    * [/questions/752709] Having problems configuring FireFox to use a CAC reader

  • How to use thin Driver in WebLogic 6.1

    How to config in "JDBC Connection Pools"
    (platform:windows 2000 server+WebLogic 6.1 + Oracle Enterprice 8.1.6)
    URL:?
    Driver Classname:?
    Properties:?

    Here is a sample:
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    LoginDelaySeconds="1" MaxCapacity="15" Name="dbPool"
    Properties="user=scott;password=tiger;dll=ocijdbc8;protocol=thin"
    RefreshMinutes="15" Targets="AdminServer" TestTableName="dual" URL="jdbc:oracle:thin:@dbservername:1521:SIDname"/>
    You can either use the info above configure a db pool using weblogic 6.1 web console or directly paste this into config.xml and change it accordingly. I would recommend you use the console.
    Hope this helps!

  • How to use Apache Beehive in WebLogic 10.3?

    Hi
    I want to use Apache Beehive controls in an MDB on WebLogic Server 10.3 but I can not get the controls to be instantiated.
    I want to use a Jdbc control sice they are so easy to use.
    Thanks
    Lucas

    To add some more info about this:
    I have an MDB like this:
    @MessageDriven(messageListenerInterface = javax.resource.cci.MessageListener.class)
    public class MyMDBean implements MessageListener {
    @Control
    private MyJdbcControl mMyJdbcControl;
    @PostConstruct
    public void initialize() {
    public Record onMessage(Record record) {
    mMyJdbcControl.setData(4711, "hello");
    } // end MyMDBean
    and a control extension
    import org.apache.beehive.controls.api.bean.ControlExtension;
    import org.apache.beehive.controls.system.jdbc.JdbcControl;
    @ControlExtension
    @JdbcControl.ConnectionDataSource(jndiName="jdbc/MyDataSource")
    public interface MyJdbcControl extends JdbcControl {
    @SQL(statement="UPDATE MY_TBL SET data = {data} WHERE id = {id}")
    void setData(long id, String data);
    // end MyJdbcControl
    OK the first issue is that the control never get instantiated
    so I then tried to do it myself, e.g. in initialize() adding Controls.initializeClient( null, this, null );
    but then Beehive says that there is nu class like MyMDBeanClientInitializer which of course I do not have.
    I can not see from the code on
    http://beehive.apache.org/docs/1.0/controls/programming.html#Programmatic+Instantiation
    how to create an extension control programmaticly
    Please help
    Lucas

  • How to use oracle log ?

    Hello experts,
    what is oracle logs ? how these are helpful to identify the error and error messages ?
    thanks in advance
    yash

    yash_08031983 wrote:
    i take an example..
    i have a function or procedure, i executed it in some pl/sql block. and its generating some error.
    if i want to check, where is problem or which error generated, can i check it from logs.
    i want to use the oracle logs in daily practice while writing procedure and function or pl/sql pr sql statements.
    That error which is generated by some user-defined program is not an error that would be considered to go into the database logs(alert.log etc) but it would be passed on to the calling environment and based on that environment, that error details would be displayed. Have you not seen such error details shown while doing the coding of such programs? If you need to go more than that you would need to include some additional bits of code like dbms_utility and may have to call it's procedure format_error_backtrace .
    Just my 2 cents.
    Aman....

Maybe you are looking for

  • Not able to access data in Query

    Hi, I have loaded data using DTP from 2 different source systems. One is 3.x emulated datasource and the other is New 7.0 datasource.I have loaded data sucessfully in to DSO.Built a query on same. But when iam executing the query by material as selec

  • Filename of a attachment: *.csv XML IDOC

    Hi folks, our scenario is: 1. are receiving mails with a csv file as an attachment 2. we use a senderChannel with the Mail adapter to get the mails 3. we swap the mail content with the attachment with localejbs/AF_Modules/PayloadSwapBean 4. we transf

  • Where's my "Power On" function?

    I just hooked up my Apple ADC/DVI adapter to link my 20" Cinema Display to my MacPro, and the "Power" glowing button just permanently glows now. I can't turn on my computer using this button anymore like I could with my G4. Is this right? I have chec

  • Problems buying book in Hong Kong

    I am using iphoto6.0.6 on my imac 2.16Ghz, and it doesnt allow me to choose my country... what can i do if i want to buy a photoalbum book i made. Can anyone help?

  • Trying to clean install Leopard 10.5.6 and not having any luck!

    I recently received a Powerbook G4 15 inch from a friend of the family without any OS installed on it. I was told by the tech's at the Apple Store that it would take Leopard OS so I purchased Leopard 10.5.6 and now I'm trying to install the software