How to stop logging external jar debug statements

Hi,
I am developing a java app which uses FOP to convert xml to PDF. Log4j is used for logging and in my appender's threshold is set to "debug". I only want debug output of my app not the FOP, how can I achieve that. At this stage I get thousands of lines of debug statements from FOP and it is very hard to track debug statements from the app.
Thanks,
Navi

you just need to change the level of FOPs loggers to something less verbose than DEBUG.
for example
log4j.logger.SomeFOPLogger=ERRORI don't know the real name of the loggers but if your output format includes the logger name then it should be simple to find out.
Also try a google search on FOP logging I did that and saw some stuff that might be useful.
@java_jamboree:
A client really should be able to control the logging. I as a writer of some library have no business forcing you to deal with tons ans tons of my debug logging output.
Log4j, and other logging frameworks, make it reasonably easy to set up a situation where you the client program can reconfigure hiw much of my library's logging output is actually produced.

Similar Messages

  • How to include an external jar file in .EAR project

    Hello All,
    I have created a web service through java class in sap netweaver 7.1.
    For database connection i want to add external jar file as reference. could you all please tell me how to do this or can i get some scenario where it is explained.
    Please Help
    Regards,
    Vanita Jain

    Hi Vanita,
    open your project in nwds > right click on the project > click on properties option from the menu > click on java build path from the left-side navigation of the window > and click on libraries in the right side tab > here you'll get a button called add external jars > clicking to this, will open browser window to select a jar file.
    Regards,
    Sen

  • How to stop Iphone from adding United States to my contact list automatically

    I don't know why, but most of the time when i add a phone number to my Iphone 4 contact list, it automatically added United States to the country for Home, other and Work. It is so annoying. Anybody knows how to stop the phone from doing that? I have my regional settings set as Hong Kong, but it still does it.
    Thanks.

    thanks to both for replies. I continued and found the URL expired. client had no clue. so all is well, many thanks.

  • How to stop logging in stored procedure?

    With interactive ISQL ssession, there is a command "stop logging" to stop ase logging for current session.
    How to do same thing for a stored procedure?

    No, each select/into will need to create a new table.
    With some planning/designing you could do something like:
    ==========================
    select ... into mytab1 ...
    select ... into mytab2 ... union all select * from mytab1
    --drop any indexes from mytab1
    truncate table mytab1
    drop table mytab1
    select ... into mytab3 ... union all select * from mytab2
    --drop any indexes from mytab2
    truncate table mytab2
    drop table mytab2
    ==========================
    Obviously you have to make the final decision ... minimize logging with more complicated coding *vs* accept logging overhead with less complicated coding.
    Just saw Kevin's response ... which is a more efficient method assuming each insert can stand on it's own.
    My example assumes some intermediate processing between the INSERTs (eg, insert mytab1, run some queries against mytab1, insert mytab2, run some queries against mytab2, insert mytab3) ... then again perhaps you could use the #temp tables for intermediate processing, too.
    There are a lot of ways to reduce your logging which ultimately depends on your exact requirements.

  • How to use one external jar (SDK) for several apps in WTK?

    Hi,
    I have one external jar (SDK) I use for developing J2ME applications.
    Every time I have no choice but to copy this JAR (SDK) into my current application lib directory.
    I am building a family of MIDlets that I dont want to put into just one huge JAR but rather to have several JAR files for each application.
    In C world I need only to tell the linker where it should pickup ".so" or ".lib" file.
    Is any way to do the same with WTK? Or any other J2ME development tool?
    Thanks in advance,
    Andrew

    Link to wtk2.5 beta has been posted to this forum
    while ago. It's worth to try it It is MSA1.0
    compliant. It has many new JSRs.TomTom,
    Thanks again.
    I tested the WTK2.5BETA and here I ahve strange fact. My application works perfectly on WTK2.1, WTK2.2 WTK2.3 BETA but it crashes with a very weird message on WTK2.5BETA
    Method............: 22482ac 'com/tinyline/app/SVGEventQueue.handleEvent (virtual)'
    Stack Chunk.......: 2216e44
    Frame Pointer.....: 2216e7c
    Current IP........: 224820b = 22481fc + offset 15
    Previous Frame....: 2216e58
    Previous IP.......: 226afd6 (offset 26)
    Frame size........: 3 (2 arguments, 1 local variables)
    Argument[0].......: 20bc0b8
    Argument[1].......: 2216d7c
    ALERT: java/lang/NoSuchMethodError: No such method dispatchEvent.(Lorg/w3c/dom/events/Event;)Z.
    So I thought, OK it was compiled under WTK2.1 may it was the reason of crash.
    I took sources and compile them under WTK2.5 BETA. I came up with the same result - crash.
    Thanks,
    Andrew

  • Toplink Warning - how to stop logging?

    I'm just getting started with JPA and TopLink so I need a little help here.
    Here's the situation. I want to build a simple Rich Client Application and have it use JPA for persistence. I am developing in NetBeans and using the built in Derby database for testing.
    So I've got my Entities all set up and I've started writing a class that'll be using an EntityManager to handle the persistence. The first test I've done is working. However, every time I retrieve the EntityManager from my EntityManagerFactory and Toplink wants to create the tables for all the entities (and it realizes that they're already there), the Toplinks Logger prints this warning for every table:
    +[TopLink Warning]: 2010.04.25 03:36:16.187--ServerSession(16795115)--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException+
    Internal Exception: java.sql.SQLException: Table/View '<table-name>' ist bereits in Schema '<schema-name>' vorhanden.
    Error Code: -1
    Call: CREATE TABLE <table-name> (ID BIGINT NOT NULL, MESSAGE VARCHAR(255), PRIMARY KEY (ID))
    Query: DataModifyQuery()
    I don't know why the warning is in German, but it means: Table/View ... already exists in ...
    I've already tried to disable toplink-logging via persistence.xml which I've posted below. The warnings still show, though.
    I've also tried to stop toplink wanting to create the tables by deleting the +<property name="toplink.ddl-generation" value="create-tables"/>+.
    persistance.xml
    +<?xml version="1.0" encoding="UTF-8"?>+
    +<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">+
    +<persistence-unit name="MovieDBv2.0PU" transaction-type="RESOURCE_LOCAL">+
    +<provider>oracle.toplink.essentials.PersistenceProvider</provider>+
    +<properties>+
    +<property name="toplink.logging.level" value="OFF"/>+
    +<property name="toplink.jdbc.user" value="admin"/>+
    +<property name="toplink.jdbc.password" value="adminadmin"/>+
    +<property name="toplink.jdbc.url" value="jdbc:derby://localhost:1527/movie_db1"/>+
    +<property name="toplink.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>+
    +<property name="toplink.ddl-generation" value="create-tables"/>+
    +</properties>+
    +</persistence-unit>+
    +</persistence>+
    This is my persistence handling class DatabaseLink.java
    package moviedbv20;
    import java.util.List;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import moviedbv20.elements.DatabaseEntry;
    +public class DatabaseLink {+
    EntityManager em;
    EntityManagerFactory emf;
    +public DatabaseLink(){+
    this.getEntityManager();
    +}+
    +public void getEntityManager (){+
    +if (this.emf == null){+
    this.emf = Persistence.createEntityManagerFactory("MovieDBv2.0PU");
    +}+
    +if(this.em == null){+
    this.em = emf.createEntityManager();
    +}+
    +}+
    +protected void createDatabaseEntry(DatabaseEntry entry){+
    em.getTransaction().begin();
    em.persist(entry);
    em.getTransaction().commit();
    +}+
    +protected void editDatabaseEntry(DatabaseEntry entry) {+
    em.merge(entry);
    +}+
    +protected void removeDatabaseEntry(DatabaseEntry entry){+
    em.remove(em.merge(entry));
    +}+
    +protected DatabaseEntry findDatabaseEntry(Object id) {+
    return em.find(DatabaseEntry.class, id);
    +}+
    +protected List<DatabaseEntry> findAllDatabaseEntries() {+
    return em.createQuery("select object(o) from DatabaseEntry as o").getResultList();
    +}+
    +}+

    Hi,
    I tried with below persistence.xml using toplink essentials but with oracle database and seems everything working as expected.
    <?xml version="1.0" encoding="Cp1252" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
    <persistence-unit name="Project1">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <jta-data-source>java:/app/jdbc/jdbc/Connection1DS</jta-data-source>
    <class>project1.Dept</class>
    <class>project1.Emp</class>
    <properties>
    <property name="toplink.target-server"
    value="project1.WebLogicTransactionController"/>
    <property name="toplink.logging.level" value="OFF"/>
    <property name="toplink.logging.file" value="c:\jpatoplink.log"/>
    <property name="toplink.target-database" value="Oracle"/>
    <property name="toplink.ddl-generation" value="none"/>
    </properties>
    </persistence-unit>
    </persistence>
    As Eclipselink persistence provider is being the latest and preferred ,it is recommended to shift to eclipselink persistence provider from toplink essentials.
    Regards,
    Vinay

  • How to use the External Jars

    Hi All,
    I want to use the Api for java advanced imaging,
    and i don't know where to place that jar and how to use the classes from that to do the related programming.
    Please help.
    Thanks
    Mahesh.

    any jar that's on your classpath you can use.
    For information on how to use the classes in a specific library your best friend is the documentation about that library.
    To have your editor/IDE know about a library, see the documentation for that editor/IDE.

  • How to import external jars in a CAF project?

    Hello Experts!
    Could you help me find out the way to import external jars in a CAF project. I have tried to import the jars
    in ejbmodule using "java build path--->libraries". But while trying to build the project it's displaying error and all the imported jars automatically get removed from the list.
    I have read that creation DC of type "External Library" can help me.
    1) Create a DC of type external library
    2) Copy my jars to folder "libraries"
    What should I do next? And how can I import my DC of type "External Library" to my CAF project?
    Looking forward for your suggestion.
    Thanks & Regards
    Vitaly

    Hi,
    This article will guide you how to deploy the external jar files to the application server.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60a0f850-c451-2c10-a6a6-ddcabfa3a65b&overridelayout=true
    Add the library project to the public part of your caf project to use the jar files.
    Regards,
    Gayathri

  • How to add external jars in the configuration of JSmooth?

    Hello,
    I am trying to create an exe file from a java program using JSmooth.
    The program is a simple hello world proogram.
    I am developing under eclipse, and I am using some external jar files as libraries.
    If my program is simple,; it works fine. If I add an import of a class that is in one of these jar files, I get the following error when executing the created .exe file:
    "Could not find the main class. Program will exit".
    I guess I have to add this Jar file to the path for the creation of the .exe file.
    My question is: does anybody know HOW to add an external jar in the configuration of JSmooth for the creation of an exe file from a Java program?
    Thanks for your help
    Philippe

    i have the same problem phsans
    you know the answers??
    thanks phsans:D

  • Do I need toload external jars

    Hi All,
    I am using hssf API (org.apache.poi.hssf.usermodel.HSSF) which is nothing but API for writing into Excel sheet.
    I have created a jar file using Eclipse when I run the same jar file from command prompt I get the error
    C:\New Folder>java -jar TextToXls.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/hssf/
    sermodel/HSSFWorkbook
    at JavaTxtXls.<init>(JavaTxtXls.java:14)
    at JavaTxtXls.main(JavaTxtXls.java:34)
    I guess its not able to load jar files associated with HSSF ..so can anyone please tell me how to rectify it..
    I mean to say how do we add external jars with the jar which we wish to execute by double click..
    One of my friend asked me to create a batch File and set classpath during runtime and then call the java file..any better solutions..

    You have to add the relative path to your external jar in your manifest.
    For example, when you create a jar file, it has a META-INF folder. Inside this folder, you will find a manifest.MF file. Open it with a text editor and it should look like:
    Manifest-Version: 1.0
    Main-Class: YourMainClass
    Then, you add a new line to show where is your external jar:
    Manifest-Version: 1.0
    Main-Class: YourMainClass
    Class-Path: externalLibrary.jar
    Note that in this case, your external jar should be in the same directory as your jar application.

  • ANT - Bind external Jar library

    Hello,
    my ant XML file is actually working, except the part with binding the external jar file: jdom.jar:
    I can run the created file "MySiebelTools.jar" But if I want to open an XML file with the tool, I get an error:
    java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
    How do I bing external Jar File like "jdom.jar" within the ANT XML file?
    (I am using Windows XP & Eclips 3.2.1.)
    Thanks
    Aykut
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="JAR Builder" default="jarBuilder" basedir=".">     
         <target name="jarBuilder" description="Create a JAR file (Project Builder)">
              <jar jarfile="E:\Projects\aykut\download\MySiebelTools\MySiebelTools.jar" basedir=".">          
                   <include name="main\*.class"/>
                   <include name="util\*.class"/>          
                   <include name="setvariablenull\*.class"/>          
                   <include name="viewdetails\*.class"/>                         
                   <include name="displayxml\*.class"/>                                        
                   <include name="images\*.*"/>
                   <manifest>
                        <attribute name="Main-Class" value="main.MainControler"/>                         
                   </manifest>
              </jar>     
              <path id="classpath">
                   <fileset dir="G:\workspace\mylib\mylib">
                         <include name="jdom.jar"/>
                    </fileset>           
              </path>
         </target>     
    </project>

    hi jschell,
    my java application is to read an XML file. It uses functions of jdom API (=jdom.jar)
    I am using ant as jarBuilder to build my executable jar file.
    To do that I have an xml file projectBuilder.xml (see my code above)
    The projectBuilder.xml is for the automation to create the jar file for myapplication.
    My problem is, I don't know the correct syntax to include the lib = jdom.jar in the projectBuilder.xml.
    I hope it is clear now ... ?
    Aykut

  • Accessing an external jar file

    Hi there,
    Does anyone knows how to acces an external jar file?
    I need to use a jar on another webserver because the jar is using a library.
    Thx...

    I think you can add a classpath
    in the environment variables on windows
    and append the directory of where your jar files
    are located.
    or
    copy the jar files to the C:\j2sdk1.4.0_03\jre\lib\ext
    where j2sdk1.4.0_03 is your javahome directory
    any comments
    just POST here
    Gudluck
    kuks

  • How to stop iTunes creating a new library on my hard drive when it can't find the one I have created and told it to use on an external drive?

    I have quite alot of music etc so to save hard drive space I have created my iTunes library on an external hard drive. If I ever accidentaly open iTunes when that external hard drive isn't attached iTunes makes a whole new library from scratch on my computers hard drive. I find this highly frustrating as I often open Itunes to find no music as it have changed librarys and I have to re-load my actual library: very frustraiting and time consuming.
    I would like to know if it is possible to lock iTunes some how to stop it from changing folders when it can'f find the library, or atleast give me a warning that it can't find the library before creating a whole new one????

    Tunes works through a database file which has a list of your tracks.  When you click on a track it looks up in the database which file it needs to play, then plays the file.  If something breaks this link then you get !  The two main ways to get ! are to move a file from where iTunes expects it to be, or to delete it altogether.  I don't know which has happened in your case.  You can try using Spotlight to find a file for the one referred to in a broken link.  If the files have been moved then they need to be moved back.  If they were deleted completely you will have to restore them from a backup or download them again from the iTunes Store and rebuild your library.

  • External Hard Drives - how to stop LR3.3 wanting to import.

    I have 3 external hard drives which I use for backing up pictures and other folders. Whenever I plug one of them in, LR opens the Import dialog, even though I have auto import switched off. It's not serious, but it is annoying! Can anyone tell me how to stop it doing this?

    Try the following:
    In <My Computer> right-click the external drive, in the dialog box click on <Properties>, and on the <Autoplay> tab. Select <Pictures> and Make <Select an Action to perform> active by clicking on the radio button. Scroll down the list and make sure that <LR import photos> is NOT selected. Or select <Take no action>.
    WW

  • How to stop the auto-start of log reader agent (replication) right after my database is restored?

    I have the scenario where the SQL server is restored (after migration).
    This database has transactional replication set-up on one of the databases. When I do a manual delete and restore of the database, I see that the replication starts right after the publisher and subscriber are restored.
    Replication agents should not start and run before the integrity checks are completed. How to stop the replication from auto starting right after the migration?
    Thanks in advance - Jebah

    Thanks Pradyothana, I have disabled the logreader, distribution agents through sp_update_job in Tsql script. I have also verified that there are no pending transactions to be replicated to the subscriber, I see that the job is still being executed. Is there
    any other way to disable the jobs?
    Steps I followed
    Started with a Working publication and subscription
    Disabled the jobs (log reader and distribution agents)
    Backed up publisher, subscriber, distribution and msdb
    Deleted the publication, subscription, publisher and subscriber
    Restored the publisher, subscriber, distribution and msdb
    Enabled the jobs and executed sp_replrestart
    Observations/Issues
    Replication does not work
    Replication monitor does not show any error
    Jobs are shows as enabled but not started in job monitor
    Not able to start/stop the log reader and synchronization manually.
    I am not sure if I have missed something while restoring the db.
    Thanks in advance

Maybe you are looking for