Help on jar file for org.apache.xml.serialize.OutputFormat

Hi all, I need help regarding on org.apache.xml.serialize.OutputFormat
and org.apache.xml.serialize.XMLSerializer. May I know which jar files
contain these? Thanks

After installing jdk 1.5 the problem is now resolved and after prefexing a few of the import statements with com.sun.
There are however some more classes as part of the Xerces 2.7.1 jar file as compared to the JWSDP 1.6 installed and this requires the xercesimpl.jar to be included in the classpath.
Rgds,
Seetesh

Similar Messages

  • Where to download java jar file with org.apache.xml.serialize.OutputFormat?

    Dear Friends,
    I try one program, it import org.apache.xml.serialize.OutputFormat;
    but I cannot fine it after I google a while.
    where can I find and download jar file that contain this:
    org.apache.xml.serialize.OutputFormat
    I use JDK1.6
    Thanks
    sunny

    So, to clear things up, there is no org.apache.xml.serialize.OutputFormat.JAR
    OutputFormat is a class.
    As I said in my previous post if you go at the xerces project home page (here) you will find a compiled version of xerces [here - direct link -> (fool proof)|http://archive.apache.org/dist/xml/xerces-j/Xerces-J-bin.1.4.4.zip]. If you extract the archive you will find a compiled jar called xerces.jar. Open that one with winrar/winzip or whatever, browse to org\apache\xml\serialize\OutputFormat.class and there you go, you have it, just link this xerces library to your project...
    PS. Try searching on Google for "Google tutorial"

  • Jar file for org.apache.taglibs.standard.tag.el.core.SetTag

    hi all,
    i had been trying to debug the jsp code in eclipse. which requires the project to identify few class files. i am not able to find the jar file which has the implementation of the below mentioned files. (i am using jboss as application server)
    org.apache.taglibs.standard.tag.el.core.SetTag
    org.apache.taglibs.standard.tag.el.fmt.BundleTag
    the list is long... but all the class files refer to the same package.
    your help is much appreciated.
    --thanks a lot.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    hello ritu...
    you would require standard-1.1.2.jar .....
    try with that....
    u can download it from -
    http://www.java2s.com/Code/Jar/CatalogJar.htm
    classes contained in standard-1.1.2.jar -
    org.apache.taglibs.standard.tag.el.core.OutTag.class
    org.apache.taglibs.standard.tag.el.core.ParamTag.class
    org.apache.taglibs.standard.tag.el.core.RedirectTag.class
    org.apache.taglibs.standard.tag.el.core.SetTag.class
    org.apache.taglibs.standard.tag.el.core.UrlTag.class
    org.apache.taglibs.standard.tag.el.core.WhenTag.class
    org.apache.taglibs.standard.tag.el.fmt.BundleTag.class
    org.apache.taglibs.standard.tag.el.fmt.FormatDateTag.class
    org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag.class
    regards
    vamsi

  • Import org.apache.xml.serialize.*;

    .java:66: package org.apache.xml.serialize does not exist
    import org.apache.xml.serialize.*;
    ^
    i am getting this error while running a java program, which i downloaded from a open source.
    i am using J Creator.
    i suppose i need to add a class path or package.
    can anybody tell me how to do this.
    and where can i find that package.
    if i can't find that in my system, where can i get it on net.

    .java:66: package org.apache.xml.serialize does notThe org.apache.xml.serialize.* package is part of Xerces:
    http://xml.apache.org/xerces-j/
    http://xml.apache.org/xerces2-j/index.html

  • Which jar file has the org.apache.xml.serialize.*

    classes ?

    found here
    C:\bea\jrockit81sp1_141_03\console\lib\xercesImpl.jar
    and
    also C:\bea\weblogic81\workshop\lib\xerces.jar

  • Org.apache.xml.serialize.XMLSerializer

    Hi,
    I am using Eclipse for Weblogic 10.3.4 (OEPE1111). I imported a j2ee project. It doesn't include xercesImpl jar. Where should I add them in? On the Java Build Path screen, there are so many options. Thanks!

    I added. But I got Classpath Dependency Validator Message warning. Is it normal? I just ignore those?
    I have log4j for every projects. Do I have to add it for each? Is there an easier way to do?
    Thanks!

  • Org.apache.xml

    Hi Guys,
    I'm getting the following error message when I create JAR file of my application and run:
    Caused by: java.lang.ClassNotFoundException: org.apache.xml.serializer.TreeWalkerIf I execute my program from Eclipse then no error shows up. But if I create a JAR and try to run it, only then I get this error. I guess I am missing an external jar for xml. If I'm right, could you guys tell me which jar I will need and where can I find it.
    Thanks in advance.

    Hi all,
    Thanks for all of your cooperation... I think I should let you guys know about my experience(tedious !?!) so that people will be aware of this kind of error from now on....
    Here's what I found...
    The problem was not about apache jar.. The problem was with the xsl files; while I was in Eclipse environment and ran my program it easily finds all my xsl files... I was accessing those xsl file by
    Source xsltSource = new StreamSource(this.class.getResource(factorXslFileLocation).getPath()); no trouble so far....
    BUT when I packaged it as a JAR and run it... it always complain about all kind of different xml/xsltc/xalan jars..
    Then I downloaded all possible jars and added with my manifest file(xalan.jar, xercesImpl.jar, xsltc.jar,serializer.jar). Still didn't work.
    Finally I tried with the following way to access my xsl files and it worked( I had to remove all external jars from manifest file...)
    Source xsltSource = new StreamSource(this.getClass().getResourceAsStream(factorXslFileLocation)); If any one is using jre1.5 or above, then no need to add external jars for any xml or xsl stuff. I found so far what I needed is already built in there.

  • Jar file of org.eclipse.swt.ole.win32.OLE

    Hi,
    Can anyone provide me the jar file for org.eclipse.swt.ole.win32.OLE.
    or can let me know where I will get it..
    Thanks in advanced,
    Sang

    hello ritu...
    you would require standard-1.1.2.jar .....
    try with that....
    u can download it from -
    http://www.java2s.com/Code/Jar/CatalogJar.htm
    classes contained in standard-1.1.2.jar -
    org.apache.taglibs.standard.tag.el.core.OutTag.class
    org.apache.taglibs.standard.tag.el.core.ParamTag.class
    org.apache.taglibs.standard.tag.el.core.RedirectTag.class
    org.apache.taglibs.standard.tag.el.core.SetTag.class
    org.apache.taglibs.standard.tag.el.core.UrlTag.class
    org.apache.taglibs.standard.tag.el.core.WhenTag.class
    org.apache.taglibs.standard.tag.el.fmt.BundleTag.class
    org.apache.taglibs.standard.tag.el.fmt.FormatDateTag.class
    org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag.class
    regards
    vamsi

  • How to use 3rd party jar files for xml transform

    Hi all,
    Am using OAS9.0.4 and I deployed my .ear successfully.
    In my application am using 4 jar files for xml transformation. (xerces.jar, xalan.jar, xml-apis.jar,xercesImpl.jar)
    OAS has its own xmlparserv2.jar file. Its using this jar file for transforming xml data and not even looking for above mentioned 4 jar files.
    In opmn.xml, I provided these 4 jar files in to class path. Then also it didn't effect my output.
    I also tried as put these 4 jar files into j2ee\home\applib directory, but o result.
    Can anybody tell me where should I keep these 4 jar files in OAS and OAS should use these 4 jar files instead of its own xmlparserv2.jar for transforming data.
    Thanks in Anticipation,
    Regards,
    RK

    Add the Xbootclasspath variable in the java-options field. It will somewhat look like the following in your opmn.xml file
    <process-type id="<OC4J Instance Name>" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options value="........... -Xbootclasspath^/a:<location of your jar files>" />
    Ensure to use th ^/a (append) signature
    Regards,
    Chirag

  • Help me out to get the jar files for FileUpload using MyFaces.

    hi,
    Can anyone help to get the jar files for FileUpload using MyFaces.
    I want myfaces-extensions.jar and commons-fileupload-1.0.jar.
    Thank you.

    you can't control the speed of a for-loop.
    you can remove your code from a for-loop and use a function to execute the code in your for-loop and you control how frequently you call the function.

  • Xslt conversion not working: nosuchmethoderror:org.apache.xml.dtm.ref.sax2d

    hi all, iam trying to convert xml file to html using xslt.
    for that iam using xalan implementation 2.6. this was working fine when i checked it from the application, no iam using servet which instantiates a object of the class and calls the method...and it not working now.
    it is giving this errror
    java.lang.NoSuchMethodError: org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.(Lorg/apache/xml/dtm/DTMManager;Ljavax/xml/transform/Source;ILorg/apache/xml/dtm/DTMWSFilter;Lorg/apache/xml/utils/XMLStringFactory;ZIZZ)V
         at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2.(SAX2DTM2.java:1901)
         at org.apache.xalan.xsltc.dom.SAXImpl.(SAXImpl.java:767)
         at org.apache.xalan.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:390)
         at org.apache.xalan.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:267)
         at org.apache.xalan.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:477)
         at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:637)
         at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317)
    ...can anyone tell me what the problem is? iam setting the system property at runtime like,
    java -Djavax.xml.transformer.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl GetTestiam using the standard way of instantiating the trnaformer like
    TransformerFacotry fac= transformerFactory.newinstance() etc.etc.
    is it beaucse iam not specifiying the imlementation in the application???if so how can i do that.
    thankyou.

    found the answer !!!
    i was using a buggy implementation of xalan. on loading the good xalan.jar and xercesImpl.jar files it started working.
    found that there was a memory leak in 2 places. not sure what that meant but some how the virtual machine wasnt getting the right values for the transformer.
    cheers.

  • Deploying war in Weblogic 10 ; NoClassDefFoundError: org/apache/xml/utils/D

    How do I set a jar in setDomainEnv.cmd ? C:\mydirectory\repository\xalan\jars\xalan-2.7.0.jar
    If I set this one, will it resolve?
    <27-Nov-2012 6:08:26 o'clock PM PST> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea10\user_projects\domains\mediation_te
    st\servers\MediationServer\logs\MediationServer.log is opened. All server side log events will be written to this file.>
    <27-Nov-2012 6:08:29 o'clock PM PST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <27-Nov-2012 6:08:31 o'clock PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <27-Nov-2012 6:08:31 o'clock PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <27-Nov-2012 6:08:34 o'clock PM PST> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "tel-reference_ods-usage-web.war".
    java.lang.ExceptionInInitializerError
    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:513)
    at java.lang.Class.newInstance0(Class.java:355)
    Truncated. see log file for complete stacktrace
    Caused By: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: org/apache/xml/utils/DefaultErrorHandler (Caused by java.lang.NoClassDefFoundError: org/apache/xml/utils/DefaultErrorHandler)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    at org.apache.struts.action.ActionServlet.<clinit>(ActionServlet.java:228)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.NoClassDefFoundError: org/apache/xml/utils/DefaultErrorHandler
    at com.tel.framework.config.PropertyNodeTypedXmlParser.parse(PropertyNodeTypedXmlParser.java:106)
    at com.tel.framework.config.PropertyNodeTypedXmlParser.parse(PropertyNodeTypedXmlParser.java:71)
    at com.tel.framework.config.file.FileXmlProvider.loadConfigurationComponent(FileXmlProvider.java:105)
    at com.tes.framework.config.ConfigProvider.loadConfiguration(ConfigProvider.java:120)
    at com.te.framework.config.ConfigContext.init(ConfigContext.java:176)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: org.apache.xml.utils.DefaultErrorHandler
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Truncated. see log file for complete stacktrace
    >
    <27-Nov-2012 6:08:34 o'clock PM PST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'tel-reference_ods-usage-web'.
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "action" failed to preload on startup in Web application: "tel-reference_ods-usage-web.war".
    java.lang.ExceptionInInitializerError
    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:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:225)
    at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:249)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:255)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1869)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)

    how do I SET classpath in setDomainEnv.cmd ? there are many types of classpaths.
    1.PRE_CLASSPATH
    POST_CLASSPATH
    EXT_PRE_CLASSPATH
    EXT_POST_CLASSPATH
    WLP_POST_CLASSPATH
    POST_CLASSPATH
    WEBLOGIC_CLASSPATH
    I used PRE_CLASSPATH for my case, first path worked, but second does not seem to work.
    set PRE_CLASSPATH=C:\myprojects\t91_rds_10_u_dev\vobs\rds_src\rds\ts-refe_ds-us-web\conf\conf-env\dv\;C:\mydirectory\repository\xalan\jars\ xalan-2.7.0.jar;
    How do I add class path to the first one? if i separate by ; will it work?
    If I want to add appCtx.properties C:\myprojects\t91_rds_10_u_dev\vobs\rds_src\rds\ts-refe_ds-us-web\conf\conf-app\appCtx.properties .
    Thanks

  • Jar files for Didgital Signing

    Hi All,
    I have a requirement where I need to Access to Keystore for Digital signing an XML payload. I am using the example in the SAP help link - Link: [Using Digital Signatures|http://help.sap.com/saphelp_nw04s/helpdata/en/a4/d0201854fb6a4cb9545892b49d4851/frameset.htm] 
    I have already imported the following jar files (aii_af_cci.jar,aii_af_cpa.jar,aii_af_mp.jar, aii_af_ms_api.jar, aii_af_ms_spi.jar, aii_af_svc.jar, aii_af_trace.jar, aii_security_lib.jar, aii_security_interface.jar, iaik_jce.jar, tc_sec_ssf.jar).
    The code has the following import statements:
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    import com.sap.aii.af.service.auditlog.*;
    import com.sap.aii.af.service.resource.SAPSecurityResources;
    import com.sap.aii.security.lib.KeyStoreManager;
    import com.sap.aii.security.lib.PermissionMode;
    import com.sap.security.core.server.ssf.SsfProfileKeyStore;
    import com.sap.security.api.ssf.ISsfProfile;
    import java.io.UnsupportedEncodingException;
    But even after the above imports I am still getting errors in resolving the following variables in the code.
      KeystoreManager
      keyStore
    What are import statements or jar files I am missing? and where can i find those jar files for making the example work?
    Thanks and Regards,
    Arunava
    Edited by: Arunava Das on Jun 6, 2008 7:05 PM

    Hi All,
    Im working on code which has
    import com.sap.security.api.ssf.ISsfProfile
    But i couldn't find the jar file for that. I think the the package is "com.sap.security.api.ssf".
    Please help me out, where can i get that jar file...?
    Warm Regards,
    DNK Siddhardha.

  • MBeanMaker is not creating Schema folder in JAR file for custom authenticat

    I have created a custom authentication provider.I am using following code of build.xml to generate jar file for custom authentication provider
    <target name="build.mdf" depends="copyConfigFiles">
    <java classname="weblogic.management.commo.WebLogicMBeanMaker" fork="true" failonerror="true">
    <jvmarg line="-Dfiles=./build/mili -DMDF=./build/mili/MILIAuthenticator.xml -DcreateStubs=true"/>
    <classpath>
    <pathelement path="${java.class.path}"/>
    <pathelement location="./build/mili"/>
    <pathelement location="./lib/weblogic.jar"/>
    <pathelement location="./lib/wlManagement.jar"/>
    <pathelement location="./lib/jcifs-1.2.0.jar"/>
    </classpath>
    </java>
    </target>
    <target name="copySrcFiles" depends="build.mdf">
    <copy todir="./build/mili" flatten="true" overwrite="true">
    <fileset dir="./src/java">
    <include name="**/MILI*.java"/>
    </fileset>
    </copy>
    </target>
    <target name="SecurityProviderJar" depends="copySrcFiles">
    <java classname="weblogic.management.commo.WebLogicMBeanMaker" fork="true" failonerror="true">
    <jvmarg line="-Dfiles=./build/mili -DMJF=./build/MiliSecurityProviders.jar"/>
    <classpath>
    <pathelement path="${java.class.path}"/>
    <pathelement location="./build"/>
    <pathelement location="./lib/wlManagement.jar"/>
    <pathelement location="./lib/weblogic.jar"/>
    <pathelement location="./lib/jcifs-1.2.0.jar"/>
    </classpath>
    </java>
    </target>
    Build.xml is running fine without giving any error,but it is not generating schema folder in the jar file.
    beacause of that my custom authentication provider is not comming in admin console.
    Kindly help me to resolve this.

    Hi Ramesh,
    Try out the following
    1) Copy mediator.jar from SOA_HOME>/soa/modules/oracle.soa.mediator_11.1.1 to <MW_HOME>//soa/modules/oracle.soa.ext_11.1.1/classes
    2) Goto <MW_HOME>//soa/modules/oracle.soa.ext_11.1.1/classes and run the following command:
    a. jar -xvf mediator.jar
    3) Now remove the jar file, i.e., mediator.jar from classes folder.
    4) Restart the server.
    Regards,
    Srijith

  • Need help with log4j logging tool (org.apache.log4j.*) to log into database

    Hi,
    I need help with log4j logging tool (org.apache.log4j.*) to log into database using JDBCAppender. Have look at my logger code and corresponding log4j.properties file stated below. I'm running this program using Eclipse IDE and it's giving me the following error (highlighted in red) at the end:
    log4j: Parsing for [root] with value=[debug, stdout, Roll, CRSDBAPPENDER].
    log4j: Level token is [debug].
    log4j: Category root set to DEBUG
    log4j: Parsing appender named "stdout".
    log4j: Parsing layout options for "stdout".
    log4j: Setting property [conversionPattern] to [%x %d{HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n].
    log4j: End of parsing for "stdout".
    log4j: Parsed "stdout" options.
    log4j: Parsing appender named "Roll".
    log4j: Parsing layout options for "Roll".
    log4j: Setting property [conversionPattern] to [%x %d{yyyy.MM.dd HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n].
    log4j: End of parsing for "Roll".
    log4j: Setting property [file] to [HelloWorld.log].
    log4j: Setting property [maxBackupIndex] to [10].
    log4j: Setting property [maxFileSize] to [20KB].
    log4j: setFile called: HelloWorld.log, true
    log4j: setFile ended
    log4j: Parsed "Roll" options.
    log4j: Parsing appender named "CRSDBAPPENDER".
    {color:#ff0000}
    Can't find class HelloWorld{color}
    import org.apache.log4j.*;
    public class HelloWorld {
    static Logger log = Logger.getLogger(HelloWorld.class.getName());
    public static void main(String[] args) {
    try{
    // Now, try a few logging methods
    MDC.put("myComputerName", "Ravinder");
    MDC.put("crsServerName", "ARNDEV01");
    log.debug("Start of main()");
    log.info("Just testing a log message with priority set to INFO");
    log.warn("Just testing a log message with priority set to WARN");
    log.error("Just testing a log message with priority set to ERROR");
    log.fatal("Just testing a log message with priority set to FATAL");
    catch(Exception e){
    e.printStackTrace();
    ------------------------- log4j.properties file ------------------------------
    #### Use three appenders - log to console, file and database
    log4j.rootCategory=debug, stdout, Roll, CRSDBAPPENDER
    log4j.debug=true
    # Print only messages of priority WARN or higher for your category
    # log4j.category.your.category.name=WARN
    # Specifically inherit the priority level
    # log4j.category.your.category.name=INHERITED
    #### stdout - First appender writes to console
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%x %d{HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n
    #### Roll - Second appender writes to a file
    log4j.appender.Roll=org.apache.log4j.RollingFileAppender
    ##log4j.appender.Roll.File=${InstanceName}.log
    log4j.appender.Roll.File=HelloWorld.log
    log4j.appender.Roll.MaxFileSize=20KB
    log4j.appender.Roll.MaxBackupIndex=10
    log4j.appender.Roll.layout=org.apache.log4j.PatternLayout
    log4j.appender.Roll.layout.ConversionPattern=%x %d{yyyy.MM.dd HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n
    #### CRSDBAPPENDER - third appender writes to the database
    log4j.appender.CRSDBAPPENDER=org.apache.log4j.jdbc.JDBCAppender
    log4j.appender.CRSDBAPPENDER.Driver=net.sourceforge.jtds.jdbc.Driver
    log4j.appender.CRSDBAPPENDER.URL=jdbc:jtds:sqlserver:/arncorp15:1433;DatabaseName=LOG
    log4j.appender.CRSDBAPPENDER.USER=sa
    log4j.appender.CRSDBAPPENDER.PASSWORD=p8ss3doff
    log4j.appender.CRSDBAPPENDER.layout=org.apache.log4j.PatternLayout
    log4j.appender.CRSDBAPPENDER.sql=INSERT INTO LOG (computername, crsservername, logtime, loglevel, threadname, filename, linenumber, logtext) VALUES ('%X{myComputerName}', '%X{crsServerName}', '%d{dd MMM yyyy HH:mm:ss,SSS}', '%p', '%t', '%F', '%L', '%m')
    #log4j.appender.CRSDBAPPENDER.sql=INSERT INTO LOG(COMPUTERNAME,CRSSERVERNAME,LOGTIME,LOGLEVEL,THREADNAME,FILENAME,LINENUMBER,LOGTEXT) select host_name(),'${CRSServerName}${InstanceName}','%d','%5p','%t','%F','%L','%m%n'
    #log4j.appender.CRSDBAPPENDER.sql=INSERT INTO LOG (computername, crsservername, logtime, loglevel, threadname, filename, linenumber, logtext) VALUES ("%X{myComputerName}", "%X{crsServerName}", "%d{dd MMM yyyy HH:mm:ss,SSS}", "%p", "%t", "%F", "%L", "%m")
    ------------------------------- end of log4j.properties file ------------------------------
    Here is the directory structure of my program. My log4j.properties file and HelloWorld.class file are residing in folder HelloWorld\bin.
    HelloWorld\bin
    HelloWorld\lib
    HelloWorld\src
    Please note - The same program works fine for console and file appender when I comment the database appender part in my properties file.
    Thanks
    Ravinder

    try this :
    log4j.appender.PROJECT.Append=false

Maybe you are looking for

  • Regarding datasource in weblogic server

    Hi All, while creating datasource i am getting the following error An error occurred during activation of changes, please see the log for details. weblogic.application.ModuleException: weblogic.common.ResourceException: Could not create pool connecti

  • Files don't open or will only open 'Read Only'. Server reboot resolves issue for 1 day

    Greetings! We have a SharePoint 2010 Foundation server that I recently inherited. I'm a novice at SharePoint, but let me cut to the chase. Users have recently (within the last week) started experiencing a problem where if they open a file, it will er

  • Most efficient way to work with large projects

    I have just purchased Premier elements and need to produce a two hour edited project. Would the best way be to break the task into a few smaller projects and join them up after editing or just to create on long project? Any advice please

  • WebI Combination Chart / Dual Y-Axis

    Hi there, is there still no Dual Y-Axis chart component in WebIntelligence (XI 3.0)? What options and workaround are there to create dual Y-Axis charts in WebI? I thought of implementing Xcelsius-Flashs with Dual Y-Axis, but it's not very satisfying

  • FCP will not open on my new iMac G5 (iSight)

    I have i have FCP 4.5 and just recently accquired a new 20" iMac G5 (iSight). I installed FCP on my new mac and it doesn't want to start up. I get a message that says "Configuration error: This software requires hardware or software which is missing.