Log4j: XML configuration file problem

Hello,
I set up some logging in my existing application with log4j and an xml configuration file. Now I made some changes to my package structure, and some problems occured. So I thougt of setting the logging level of one of my loggers (named myapp.iointerface.DBAccess in the config file). So the only change I did was adding a <param name="Level" value="TRACE"/> to my logger. Now, log4j complains when it reads the configruation file:
log4j:WARN Continuable parsing error 36 and column 11
log4j:WARN The content of element type "logger" must match "(level?,appender-ref*)".My config file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
     <appender name="RootConsole" class="org.apache.log4j.ConsoleAppender">
          <param name="Threshold" value="DEBUG"/>
          <param name="Target" value="System.err"/>
          <layout class="org.apache.log4j.PatternLayout">
               <param name="ConversionPattern" value="%d{dd MM yyyy HH:mm:ss} %p %C %nIn Zeile Nummer: %L %m %n%n"/>
          </layout>
     </appender>
     <appender name="LoginInfo" class="org.apache.log4j.FileAppender">
          <param name="Threshold" value="TRACE"/>
          <param name="File" value="${user.dir}/login_info.log"/>
          <layout class="org.apache.log4j.PatternLayout">
               <param name="ConversionPattern" value="%d{dd MM yyyy HH:mm:ss} %p %C %nIn Zeile Nummer: %L %m %n%n"/>
          </layout>
     </appender>
     <appender name="DBConnectionInfo" class="org.apache.log4j.FileAppender">
          <param name="Threshold" value="TRACE"/>
          <param name="File" value="${user.dir}/db_connection.log"/>
          <layout class="org.apache.log4j.PatternLayout">
               <param name="ConversionPattern" value="%d{dd MM yyyy HH:mm:ss} %p %C %n%m %n%n"/>
          </layout>
     </appender>
     <logger name="myapp.windows.MainFrameController" additivity="false">
          <appender-ref ref="LoginInfo"/>
     </logger>
     <logger name="myapp.iointerface.DBAccess" additivity="false">
          <param name="Level" value="TRACE"/>
          <appender-ref ref="DBConnectionInfo"/>
     </logger>
     <root>
          <param name="Level" value="DEBUG"/>
          <appender-ref ref="RootConsole"/>
     </root>
</log4j:configuration>Does anybody know what's wrong with that? I don't understand and found nothing googling it netiher. The strange thing is, that logging messages with level TRACE are recorded in the destination file, but the level id DEBUG.
Thx,
Julien

If you look at the error, the parser expects level and not Level
So :
<param name="Level" value="TRACE"/>should be :
<param name="level" value="TRACE"/>Same goes for :
<param name="Level" value="DEBUG"/>That will solve the problem (even though it is not a critical error)!

Similar Messages

  • Loading XML Configuration File into Java

    I have a stored procedure wrapper to a Java method (within a jar file) that has been loaded into the database. I need to load an XML configuration file in this method and parse it but get the following error.
    <Line 2, Column 192>: XML-24538: (Error) Can not find definition for element 'LODConfigs'
    When I run the method standalone through netbeans it parses fine and is able to load the file. I've confirmed that it is able to read the file but I am lost as to what could be the problem. Any suggestions would be welcome.
    The header of the file is
    <?xml version="1.0" encoding="UTF-8" ?>
    <LODConfigs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/spatial/network/lodLODConfigs.xsd"
    xmlns="http://xmlns.oracle.com/spatial/network">
    <LODConfig globalNetworkName="$DEFAULT$" networkName="$DEFAULT$">
    <networkIO>
    </networkIO>
    </LODConfig>
    </LODConfigs>

    Just a guess really, (and this is an old question now - so you may have moved on).. is your XML parser attempting to use the schema location to pull the XML schema from the internet?
    If so, that might run fine in netbeans, but hit java permission limits in Oracle. Have you tried running it in netbeans with the network cable unplugged.
    If that fails with the same error as the Oracle JVM, that might give a clue as to the problem and you can troubleshoot the permissions from there.

  • XML configuration file does not show entry for PI_BASIS for PREPARE

    Hello SAP Gurus,
    We are doing ECC 6.0 SR3 upgrade including EHP3 SP3
    We generated XML configuration file for EHP3 from MOPZ
    But during XML file does not contains any information for PI_BASIS target level or source level
    current level is 2006_1_620
    We tried that XML file in PREPARE during EHP_INCURSION phase
    but failed all time.
    Let me know what we have to generate XML file with proper information including PI_BASIS
    Even PI_BASIS not appearing in MOPZ list for selection, its surprising for us.
    Any idea/direction would be highly appreciated.
    Thanks,
    Amit Lal

    Hi,
    I forwarded my query to AGS Dev support, They verified Solution manager and found no problem since it was up to date SPS15 ST400
    Problem was in SAPup, they provide the lastest sapup tool that was again released for this specific problem. See notes for SAPup with keyword EHP
    thanks,
    Amit

  • How to generate an XML Configuration File for EBS Source Type

    Hi,
    We have installed SES, I want to integrate it to enable for searching repository contracts.
    In the sources I have selected oracle.apps.okc.repository.textsearch.server.RepHeaderSearchExpVO.
    For this source I need to specify the Configuration URL.
    Here I need to provide the path for configuration XML file. But before that I need to generate the XML Configuration file.
    Is there any steps on how we can create this XML file.
    like I would want to know how we can create the XML file and on which folder on the server should I be putting it
    Thanks

    Hi there,
    We are running into same issue and need the exact same information. Can someone help with this question on priority?
    Thanks,
    Darshan

  • XML configuration file to link to frames in Flash - As2.0

    How can I set the url or link attribute from the XML configuration file to link to frames in my movie instead opening a HTML page? I am using Actionscript 2.0
    Thank you.

    What type of file is using this xml data?  If it is being read by the AS2 file, then your data should resemble either frame labels or frame numbers.

  • Setting time in  adf-faces-config.xml configuration file

    Hello check this link
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_convertDateTime.html
    this specifies "Timezone can be set per web-app in adf-faces-config.xml configuration file. If timeZone is not set on the converter, then timezone will be defaulted to the value set in adf-faces-config.xml configuration file. If it is not set in the configuration file, then it will be defaulted to GMT."
    how to set timezone in adf-faces-config.xml configuration file please specify
    Regards
    Mayur Mitkari

    where in adf-faces-config.xml i can add this line , and howThis might help: http://docs.oracle.com/cd/E24382_01/web.1112/e16181/af_global.htm#BJECDDDE

  • Single XML configuration file for all the SSIS packages(including parent and child packages)

    Hi
    I have some 16 ssis packages. source Db and destination Db for these packages are common. I am calling these child packages in a master package.
    I want to use only one XML config file for this master.
    How do i use same for all child packages?
    and can i do it with parent package variable?

    I created a master package with a variable master, and in value i have entered the configuration file path.
    Hi vjp dinu,
    You should create variables in the parent package to pass values to variables in each child package rather than pass the file path of the XML Configurations file of the parent package.
    As Visakh mentioned, you can achieve your goal by creating corresponding variables in the parent package for each child package, and enable Package Configurations for the parent package so that you can control the values through the XML Configurations file
    for the variables of the parent package.
    Supposing there is a variable FilePath in child package 1, a variable ServerName in child package 2, then, we need to create two variables pFilePath, pServerName in the parent package. After configuring the Parent package variable in each child package (e.g.
    mapping pFilePath to FilePath, pServerName to ServerName), you can enable XML Configurations for the parent package, and expose the value property for both pFilePath and pServerName variables. In this way, you can modify the XML Configurations file of the
    parent package and the specified values will passed to the child packages.
    Reference:
    http://microsoft-ssis.blogspot.com/2011/06/passing-variables-from-parent-package.html 
    Regards,
    Mike Yin
    TechNet Community Support

  • Server.xml configuration files

    Hi all,
    The server.xml configuration files have a common defintion for different servers? or each server has its own definition.
    Thanks.

    each has its own.

  • Java and XML Configuration Files

    Hi,
    Can anyone tell me the best way to read information stored in an XML configuration file into my Java program? I have a factory class which I want to instantiate classes from at runtime and I want to be able to read in the class names from a XML configuration file to make it extensible..
    Many thanks....

    Depends on what the OP means by XML configuration files.
    Spring reads Spring application context files. Those can help to configure objects, no doubt.
    If the OP meant reading in XML serializations of Java objects and turning them back into Java objects, then XStream is the right thing to do.
    %

  • XML Configuration Files Batch Processing

    Greetings All,
    I have configuration file in XML as follow:
    <property>
    <name> world.wide.web.complexity.level </name>
    <value> 10 </value>
    <description> describes how complex the web is getting, see exitement for related values</description>
    </property>
    So, I would like to write a java program, that will generate several copies of the above file but with different values for one or several properties.
    I have discovered JDOM, SAX, apache configuration and so many technologies but didn't find a simple solution to this simple problem at a first pass.
    Many thanks in advance for your help

    Here is a way to set global container properties.
    You can get your container to read a properties file by modifying opmn.xml as follows:
    <process-type id="ct01" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="oc4j-options" value="-p /filepath/properties.file"/>
    These can then be read in with a System.getProperty() command.

  • Xrpcc configuration file problem

    Hi,
    I want to use "xrpcc" to generate stubs from an existing WSDL file ( BabelFishService ) to build a translator client. My configuration file "config.xml" has the following form:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/jax-rpc-ri/xrpcc-config">
    <wsdl name="BabelFishService"
    location="BabelFishService.wsdl"
    packageName="translator">
    <typeMappingRegistry>
    </typeMappingRegistry>
    </wsdl>
    </configuration>
    but "xrpcc -client -verbose config.xml" fails with the following error message:
    error: invalid element "{http://java.sun.com/jax-rpc-ri/xrpcc-config}configuration" in configuration file (line 2)
    It seems that the tag "configuration" is not recognized. I use the Java Web Service Developer Pack 1.0 under Windows NT 4.0 and JDK 1.4.0. The "xrpcc" version is "JAX-RPC Reference Implementation (1.0, build FCS-R7)".
    Thanks in advance for any help.
    Gerhard

    I have another problem after I changed the url. The warning msg says:
    warning: ignoring port "Service1HttpGet": no SOAP address specified
    warning: ignoring port "Service1HttpPost": no SOAP address specified
    The config.xml looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl name="Service1" location="Service1.WSDL" packageName="testobj">
    <typeMappingRegistry>      
    <typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <entry schemaType="ns1:SampleType"
    javaType="org.tempuri.WellKnownClass"      
    serializerFactory="org.tempuri.WellKnownClassSerializationFactory"      
    deserializerFactory="org.tempuri.WellKnownClassDeserializationFactory"
    xmlns:ns1="http://echoservice.org/types"/>      
    </typeMapping>      
    </typeMappingRegistry>          
    </wsdl>      
    </configuration>
    The WSDL file looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://tempuri.org/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/" xmlns="http://schemas.xmlsoap.org/wsdl/">
    <portType name="Service1HttpGet" />
    <portType name="Service1HttpPost" />
    <binding name="Service1HttpGet" type="s0:Service1HttpGet">
    <http:binding verb="GET" />
    </binding>
    <binding name="Service1HttpPost" type="s0:Service1HttpPost">
    <http:binding verb="POST" />
    </binding>
    <service name="Service1">
    <port name="Service1Soap" binding="s0:Service1Soap">
    <soap:address location="http://localhost/testobj/Service1.asmx" />
    </port>
    <port name="Service1HttpGet" binding="s0:Service1HttpGet">
    <http:address location="http://localhost/testobj/Service1.asmx" />
    </port>
    <port name="Service1HttpPost" binding="s0:Service1HttpPost">
    <http:address location="http://localhost/testobj/Service1.asmx" />
    </port>
    </service>
    </definitions>
    Thanks a lot!

  • How to disable log4j via configuration file

    Howdy,
    I am using the quartz library which uses log4j, how can I disable log4j in my release version? where can I find a sample configuration file to disable log4j?
    TBH i am not sure if its actually running as i am not pointing it to config, i get these warnings:
    log4j:WARN No appenders could be found for logger (org.quartz.simpl.SimpleThreadPool).
    log4j:WARN Please initialize the log4j system properly.
    But I would prefer to just disable it all together (or initialize it correctly and make it do nothing)...so I am looking for how I can accomplish this. I've read over the docs here:
    http://logging.apache.org/log4j/1.2/manual.html
    They are a bit long winded for what I need to do so I might have missed it, but i am just looking for how to structure a minimal con fig file to properly initialize log4j and prevent it from logging anything

    tiburblium wrote:
    Now quick question, how can I modify this to prevent logging from occuring? It seems as if I set log4j.debug=FALSE nothing is logged, is that all thats required? set rootLogger to OFF if you intend to turn off logging, something like this.
    log4j.rootLogger=OFF, R
    Also how can i specify a null appender? I dont want log4j to attempt to log to a file on an end users systemlog file is not created on the end users system. It is created in the app server where the application is running. Setting rootLogger to OFF should take care of your problem as nothing will be logged.

  • SPA122 - How to turn off "DHCP Option To Use" in the Provisioning tab using the XML configuration file?

    As default, SPA122 and SPA112 have DHCP Options 66, 160, 159 and 150 turned on.
    Our pre-provisioning process includes adding our default profile rule to our provisioning server for the device to pull its configuration files once the device has been added to an account.
    However, it seems like some customers have had problems with the device downloading the definite configuration file and manually turning off option Option 66 in the provisioning tab in the device solves this issue.
    Is there any option we could add to our pre-provisioning file so that it removes 66 from the "DHCP Option to Use" field in the provisioning tab?
    Please advise...

    Thanks Dan,
    I didn't know the dhcp server could serve different options to different classes of clients, I'll have to look that up!
    Moises
    so if your provisioning file has this line below (this is from a spa5xx config I had in my temp folder, so use the line from your provisioning file, or use the SPC tool to create a new default config for that device type)
    <DH<DHCP_Option_To_Use group="Provisioning/Configuration_Profile">66,160,159,150,60,43,125</DHCP_Option_To_Use>
    change it to
    <DH<DHCP_Option_To_Use group="Provisioning/Configuration_Profile">160,159,150,60,43,125</DHCP_Option_To_Use>
    Hope it helps,
    Provisioning guide is here
    Cisco IP Telephony Devices Provisioning Guide - Cisco Support Community
    Dan

  • Kde4 configuration files problem ... [solved]

    This is what's going on: I start the kde session (I log in as user via kdm) and everything seems to be fine ...for a while! Then suddenly I'm starting to get messages such as "Configuration file /home/tbuta/.kde4/share/config/konquerorrc" not writable for just about everything I try to open - dolphin, konqueror, konsole, ksysguard, etc
    I checked the permissions and everything seems fine - the files and folders are still owned by the user/group
    Anyway, I tried a sudo chown -R for the user home folder and I'm getting a "chown: changing ownership of `/home/tbuta': Read-only file system". So I'm thinking if as I said above, the file permissions are actually ok, and I'm getting a "Read-only file system" when I'm trying to chown, it seems to me that somehow the home folder becomes read only in the middle of my kde session?? It's getting exasperating ... if I can't fix this soon, I'm afraid I'll have to leave kde for now ...
    Last edited by zamolxis (2008-08-10 23:23:35)

    This is REALLY annoying - the problem is back ... I just don't understand what's causing it.
    Another thing I noticed is that now for some "non-pure-kde" apps such as firefox, skype - if they were open and then closed, when I try to reopen them again I'm getting a message that an istance is already running (although I can't see any firefox or skype, etc via ksysguard - and a killall command gives me the "no process killed message"...)
    Also, when the problems start, if I try to log out of kde and log back in - it won't let me. Once I log out I can't log back in - it gets stuck on the kde splash screen. Trying to restart kdm will also fail. However, if I reboot the computer, I can log in as usual and work for a while .... until everything goes crazy again!
    The only other problem I noticed is that there seems to be something wrong with preload. And a /etc/rc.d/preload restart always has somehow "strange" results. Could the two be related?
    Last edited by zamolxis (2008-08-04 23:09:56)

  • Auto update of OC4J xml configuration files with JDev

    When using JDeveloper with source control (such as ClearCase), Is there a way to configure JDev to prompt the user to check-out the ejb-jar.xml, orion-ejb-jar.xml, web.xml, or application.xml files when JDev needs to update them but finds them to be read-only?
    I have found that if these xml files are not checked-out (read-only) and JDev needs to update them (such as when a new EJB is created), JDev does not notify the user that it cannot update them and it does not prompt the user to check them out of source control. Developers often forget that they need to manually check-out these XML files and perform an "update" on them, thus creating configuration problems.
    Please advise.
    Thank you.
    Matt Burton

    Matt,
    Not yet. We have similar requirements for other areas of JDeveloper. This is certainly on the list of enhancements.
    David Brown
    SCM Product Management

Maybe you are looking for

  • Travel Attachments not getting displayed in MSS

    We are using ECC6.0 EHP7 with ESS/MSS in NWBC. During creation of Travel Expense, the employee is able to attach the documents, but the manager is unable to receive it. As we are having 2 level of approvals, we customized the workflow and when we are

  • PP-WM integration - staging pick parts across two different plants

    Hi, My requirements are as follows, I have a manufacturing plant A and a Sales plant B. For the vast majority of cases goods are manufactured in A, transferred to B and then sold. However in a minority of cases finished goods are transferred from B b

  • EPub does not open to cover

    HI! I put the cover as the first element of the spine: <spine toc="ncx">   <itemref idref="coverhtml"/> and as the first element of the guide, too <reference href="Text/A_cov01.xhtml" title="Cover" type="cover" /> But, on iPad, it doesn't open to the

  • Flash Deforming Fills inside Buttons/Clips

    I'm having a problem that the fills inside my symbols are being deformed. I am using a lot of symbols on stage and the fills inside the symbols are being deformed and skewed. I have a sample of what i'm working on up at: http://omarrodriguez.net/cond

  • Inspiration browser for mac

    tried to download the new inspirations browser and got an error message that said to contact you for support. What do I need to do?