How/where to deploy log4j JAR?

I am unable to get log4j working with my enterprise application, and am
wondering if I have the log4j JAR file deployed properly. I am using
WebLogic 8.1 SP2 with log4j 1.2.8.
My application is an exploded enterprise application deployed in the
"applications" directory. The directory structure is as follows:
applications/
myEnterpriseApp/
META-INF/
myWebApp1/
myWebApp2/
I have made the following attempts at deploying log4j-1.2.8.jar and
log4j.properties:
Attempt 1:
- log4j-1.2.8.jar in .../myWebApp1/WEB-INF/lib and in
.../myWebApp2/WEB-INF/lib
- log4j.properties in .../myWebApp1/WEB-INF/classes and in
.../myWebApp2/WEB-INF/classes
Attempt 2:
- log4j-1.2.8.jar in .../myEnterpriseApp/APP-INF/lib
- log4j.properties in .../myEnterpriseApp/APP-INF/classes
Attempt 3:
removed all occurrences of log4j-1.2.8.jar and log4j.properties from the
.../myEnterpriseApp directory tree.
In all three cases, I see no logging output either to the WL Server console
or to my defined log file. Nor do I see any thrown ClassNotFoundException
(expected in attempt 3), so I suspect that log4j is being loaded elsewhere.
What do I have to do in order to have log4j recognize my log4j.properties
file?
Alternately, to what other file(s) can I add my logging preferences?
-- Craig

"Craig Coffin" <craig+1268fbec@nfld-dot-com> wrote:
I am unable to get log4j working with my enterprise application, and
am
wondering if I have the log4j JAR file deployed properly. I am using
WebLogic 8.1 SP2 with log4j 1.2.8.
My application is an exploded enterprise application deployed in the
"applications" directory. The directory structure is as follows:
applications/
myEnterpriseApp/
META-INF/
myWebApp1/
myWebApp2/
I have made the following attempts at deploying log4j-1.2.8.jar and
log4j.properties:
Attempt 1:
- log4j-1.2.8.jar in .../myWebApp1/WEB-INF/lib and in
.../myWebApp2/WEB-INF/lib
- log4j.properties in .../myWebApp1/WEB-INF/classes and in
.../myWebApp2/WEB-INF/classes
Attempt 2:
- log4j-1.2.8.jar in .../myEnterpriseApp/APP-INF/lib
- log4j.properties in .../myEnterpriseApp/APP-INF/classes
Attempt 3:
removed all occurrences of log4j-1.2.8.jar and log4j.properties from
the
.../myEnterpriseApp directory tree.
In all three cases, I see no logging output either to the WL Server console
or to my defined log file. Nor do I see any thrown ClassNotFoundException
(expected in attempt 3), so I suspect that log4j is being loaded elsewhere.
What do I have to do in order to have log4j recognize my log4j.properties
file?
Alternately, to what other file(s) can I add my logging preferences?
-- Craig
Try passing it the path to the properties file as part of the java options in
your startWeblogic script. eg.
-Dlog4j.configuration=file:/d:/bea/user_projects/mydomain/log4j.properties
BEA Users Group -- www.beausers.org

Similar Messages

  • How can I deploy a jar with directory entries using deploy profiles?

    Hi,
    I'm trying to deploy a jar file using deloy profiles, but the jar file deployed contains no directory entry. Why?
    Is it possible to do that using deploy profiles?

    my project looks like this:
    src +
     - test
         +- Main.java
         +- Test.java
    when I create a jar with 'jar -cf‘, I get something like this (with flat folders view):
    META-INF
    test
    Main.class
    MANIFEST.MF
    Test.class
    but when I use deploy profile to deploy a jar, I get this:
    Main.class
    MANIFEST.MF
    Test.class
    The directory entries are missing in the jar file.
    How can I fix this?
    Edited by: zeta on 2013-3-29 上午11:15
    Edited by: zeta on 2013-3-29 上午11:24
    Edited by: zeta on 2013-3-29 上午11:24
    Edited by: zeta on 2013-3-29 上午11:25
    Edited by: zeta on 2013-3-29 上午11:26

  • How do I deploy dependent jars in a standalone soa server?

    Hi,
    I have deployed a webservice on a standalone SOA server. When I try to execute it I see the following message:
    faultstring>JBO-25002: Definition oracle.apps.cdm.tcaModel.parties.core.model.publicEntity.PartyPEO of type Entity Definition not found</faultstring>
    Dev is saying that we need the dependent jar files on the soa server and has given me some jar files? When I put the jar files in the applib folder, I am not able to restart the webservice.
    Can someone help me on how to resolve this with some detailed steps or pointers? Is that the correct location for putting the jar files? Appreciate your help.

    Hi,
    to me the problem appears that you didn't add the class to the WebService as an additional class to load with the Web Service. At least i JAX-RPC services you can tell the WS configuration which additonal classes are needed. In your case the PartyPEO isn't available (make sure its serializable)
    Frank

  • How to deploy custom jar (forms PJC)  file in R12.1.x

    Hi ,
    we need use forms pjc connecting to client pc'com port with ebs form,
    we can deploy with ias standard form server , but EBS 's appsweb.cfg
    was automatically generated by AutoConfig , so i don't know how to config our jar in EBS env.
    i had search document in metalink for serval days , can some help us to solve this problem !
    thanks for any help...
    BR,Nolem

    Hi all, I am confronted by the same problem.
    I have manually added my custom Jar files to the archive=2 section of the appsweb.cfg config file in the $INST_TOP/ora/10.1.2/forms/server and placed the Jar files in the $COMMON_TOP/java/classes/oracle/apps/fnd/jar.
    I know that this is probably not the way to go, as autoconfig will override these settings, but my first priority is getting these jar files to run in Apps Forms without errors. I got as far as that my forms don't error out anymore but not all of them are working as they should. I am also trying to deploy the WebUitl utility in EBS R12. As far as I can tell this should be supported by Oracle as it comes as part of a standard Apps Installation (except for the Jacob.jar) it can be found in: $ORACLE_HOME/forms/webutil directory and the WEBUTIL_CONFIG reference to the webutil.cfg file can be found in the default.env in the same directory as the appsweb.cfg.
    If you want to look at some very good examples of PJC's there is a very good blog: http://forms.pjc.bean.over-blog.com/. You can also look at Francois Degrelle's blog on Read/Write files on the client machine without Webutil.
    Nevertheless information on how to deploy and run these PJC's under EBS is scarce. Metalink offers no solutions except very outdated notes.
    I would appreciate to know how to properly deploy these jar files in EBS
    I am also on 12.1.x. Btw there are more threads on this subject on OTN but most are outdated (threadID=1067917, 686329, 4246525) and don't provide the solution for EBS R12.1.x.
    Any help would be appreciated.

  • How to deploy a jar file in EBS R12

    Hi,
    I have developped an application to load data from a spreedsheat using a jar file. All work fine in JDev.
    I want now to deploy it in the EBS instance.
    How to deploy the jar that i used to be recognised.
    Regards,
    Saad

    Check this link, may help you
    http://www.unitask.com/oracledaily/2012/07/25/how-to-deploy-jar-file-into-r12-server-in-oa/
    thanks

  • How to let Weblogic to load log4j.jar from application?

    Hi all,
    Our company planed to move an application from WebSphere to WebLogic server (10.0.2). I am responsible for the technique aspect on this moving. But this is my first time to work on WebLogic, so it seems everything is new for me. Currently, I am encountering a very tough issue. In our project, it has an old log4j.jar (2001). I put the jar in APP-INF/lib. However, after I deployed the project to server, system always run the new log4.jar from server, and gave exception, as follows. The old log4j.jar has this method, but new log4j.jar doesn't.
    Anybody can give me help? I really appreciate. Thanks.
    ####<Aug 5, 2009 10:28:06 AM CDT> <Error> <HTTP> <msn043074c> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1249486086015> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@1988902 - appName: 'ampi', name: 'ampi', context-path: '/ampi'] Root cause of ServletException.
    java.lang.NoSuchMethodError: org.apache.log4j.Category.getInstance(Ljava/lang/String;Lorg/apache/log4j/spi/CategoryFactory;)Lorg/apache/log4j/Category;
         at com.lilly.atlas.frameworks.logging.AtlasServerCategory.getInstance(AtlasServerCategory.java:182)
         at com.lilly.atlas.frameworks.logging.Log4JAdapter.<init>(Log4JAdapter.java:103)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at com.lilly.atlas.frameworks.logging.AtlasLogger.initialize(AtlasLogger.java:110)
         at com.lilly.atlas.frameworks.logging.AtlasLogger.<init>(AtlasLogger.java:93)
         at com.lilly.atlas.frameworks.logging.AtlasLogger.getInstance(AtlasLogger.java:129)
         at com.lilly.atlas.frameworks.logging.AtlasLogger.info(AtlasLogger.java:329)
         at com.lilly.tox.ampi.actions.LoginAction.perform(LoginAction.java:145)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3404)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1398)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

    Hi David,
    According to the link you posted, I put the following codes in the weblogic-application.xml, then my ear file can be successfully deployed on WebLogic. Thank you soooooo much, I sincerely appreciate it.
    <wls:prefer-application-packages>
              <wls:package-name>org.apache.log4j.*</wls:package-name>
    </wls:prefer-application-packages>
    Best regards,
    Sheng
    Edited by: gus888 on Aug 5, 2009 11:34 AM

  • How to fix the Log4j error due to old version of log4j jar bundled with jre

    Hi,
    We have a webstart application which budles the latest log4j.jar (ver 15), but for some users at startup after the app is downloaded the newer version of the log4j jar is not loaded - We get a NoSuchMethodError when we try to use the trace() method of log4j. Question is how do we ensure that our app always picks up the newer version of log4j jar bundled with the app and not the one in the lib/ext folder of the jre,
    thanks

    I think we both have similar issue Thread
    Do anyone knows why this is happening?

  • How do I deploy a custom plugin jar in OVD11.1.1.5

    Hi all,
    I have created a custom plugin and build the jar. how do I deploy the plug-in jar in OVD11.1.1.5.

    Thanks for the suggestion...I did read up on the count function, but I don't think it will give me what I want. I need a a counter that increments for each payment made to a supplier, not a total of the number of payments made to that supplier.
    Any other suggestions, please?
    Tam.

  • How do I deploy an external JAR file

    Hello,
    How do I deploy an external JAR file?
    I am grateful for every hint.

    Hi Manuel,
      If you read my blog mentioned in the beginning of the thread, you will note that such solution is not supported in our engine due to number of reasons.
      Please, read the blog and use application library shared among these two applications. You will achieve the same effect. Please note that the using application will need run and deploy-time dependencies to the shared library.
      You should not add files to any of the folders manually or manipulate engine's classpath in such situations.
    Best Regards,
    Georgi

  • How to create outside Logging file in osb 11g using log4j.jar?

    Hi all,
    Currently, i am using osb 11g to develop a system. In the system we need to create a log file using log4j.jar library. This sub-program is working in the osb 10g base but fail to work in the osb 11g base. Can anyone give me some advice about this matter? Have anyone created one like this in 11g? Is it successful?

    Sorry path is missing for the above request.
    path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
    please help.
    Saravanan.K

  • Problen when using log4j.jar in my web service application

    Hi, i have a little problem. I have to migrate an existing java application to web services, and this application uses log4j.jar. So i put that jar file in the lib dir in WEB-INF. However, when i try to deploy the application, i get an error saying
    org.apache.commons.LoggingException: No suitable Log constructor [LJava.lang.Class;c492c8 for org.apache.commons.logging.impl.Log4JLogger
    And of course if i remove that jar from the lib dir, the app deploys ok, but it crashes because it can't find the class Logger (located in that jar)
    Any ideas how to solve this?????
    Thank you                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    When is the log4j constructor invoked ?....you said you moved the java application to webservice....in the java application they might have initialized the log4j with the log4j properties file some where when they start the application..
    Have a start up servlet which initializes the lof4j.

  • How i configure the log4j.xml in weblogic server

    hi
    i write a new lg4j.xml and i put this in WEB-INF/classes,i deployed this jar in my remote server,but it not reflected. [i am not specify the server logs, we have some API's which is deployed in server for that API log files is configured using log4j.xml ]
    i saw there is a option in weblogic - setDomain -LOG4J_CONFIG_FILE='here we give the path for log4j.xml'.I think it's only work for local machines not for the remote machines.
    i don't know how to get a log files in weblogic server

    To use Quartz primarily within an application server environment,include the Quartz JAR within the enterprise application (.ear or .war file). However, if you want to make Quartz available to many applications then simply make sure it's on the classpath of your appserver.
    You can also deploy it as a jar file or a library module as required.
    Quartz depends on a number of third-party libraries (in the form of jars) which are included in the distribution .zip file in the 'lib' directory. To use all the features of Quartz, all of these jars must also exist on your classpath.
    -Sandeep

  • How to switch off  log4j trace ...

    Hi,
    I have different behavior of log4j on windows and Solaris.
    Assume I cofigured to have log on a file.
    On window it is fine.
    On Solaris it is fine too. but in later case, there are some traces printed in the screen as:
    *** configurationOptionStr=null
    ** End of LogManager static initializer
    log4j:INFO Creating new logger .....
    How can I remove this kind of information on sonsole as it will confuse our users who have no idea about this?
    Thanks.
    Pengyou

    *** configurationOptionStr=null
    ** End of LogManager static initializer
    log4j:INFO Creating new logger .....I don't know where these come from. But I'd have to assume that if indeed you used the same version of log4j jar(s) on both platforms, and the same log4j configuration, you'd get the same results.

  • Log4j.jar issue under Web Service Security Module

    I am running into an issue with log4j.jar for WebLogic OES PDP. there is a custom appender class that extends org.apache.log4j.AppenderSkeleton, if we packed into one jar file under \bea\ales32-ssm\webservice-ssm\lib\log4j.jar everthing is fine. if we split this class with another jar file(sth like patch.jar) and add a entry in the config file WLESws.wrapper.conf under bea\ales32-ssm\webservice-ssm\instance\WSSM\config and it failed with this error,
    but an error is
    generated when starting the WSSM(Web Service Security Module):
    log4j:ERROR A "com.foo.AuditJMSQueueAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
    log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
    log4j:ERROR [com.bea.security.providers.utils.InverseURLClassLoader@5f7d3f] whereas object of type
    log4j:ERROR "com.foo.AuditJMSQueueAppender" was loaded by [sun.misc.Launcher$AppClassLoader@a18aa2].
    log4j:ERROR Could not instantiate appender named "JMS_AUDIT".
    130
    ARME is started now
    Rendering object type: AuditAtzEvent
    I have tried add java option:log4j.ignoreTCL=true. in this WLESws.wrapper.conf file, but does not work.
    How to resolve this issue, Thanks for your help!

    hi
    Can anyone help with this...

  • Multiple log4j jars of different versions in classpath

    Hi,
    Does having multiple log4j jars in the classpath of different versions cause problem. If I have both log4j-1.2.14.jar and log4j-1.2.15.jar in my classpath will that cause a problem.
    I have a scenario where in the production env. servers hung and when I checked the classpath it had both the above log4j jars. Could it be an reason for server hanging?
    Thanks
    AA

    Hi GP,
    Thanks for all the help again.
    2.How to ensure the existing user updates /new user creations that comes from OID 10g propagate to OID 11g as well? Please suggest the steps likely involved in OIM 11g configuration.
    3.Also need to ensure the password changes propagates from OID 10g to OID 11g after the above configurations. Please suggest ways for this as well.
    ->>>PLease clear your requirement. Do you want to transfer data from OID 10g to OID 11g via OIM? If yes configure OID 11g as trusted source and trusted source reconciliation bring OID 10g data to OIM and OIM will propogate it to OID 11g.
    I think you are looking for LDAPSync between two OIDs. You can refer its documentation to configure LDAP sync, so whatever changes are done in 10g will be propagated to OIM 11g.
    ->>>>>>>>>>Yes I want all the users that were once created in OID 10g should also be propagated on OID 11g under a similar context/orgs. Also if any change / modification in the existing user happens on OID 10g should propagate the changes for the same user on OID 11g. Please guide me how to configure trusted source in OIM 11g?
    Also can you please point LDAPSync document (for propagate changes for user passwords from OID 10g to OID 11g user). I understand that you are suggesting for the same purpose? Please correct me if am wrong.
    Thanks again.

Maybe you are looking for