log4j 1 « log4j « Java Enterprise Q&A





1. Deserialize in a different language    stackoverflow.com

The log4j network adapter sends events as a serialised java object. I would like to be able to capture this object and deserialise it in a different language (python). Is this ...

2. Customising log4j adapter    stackoverflow.com

I want to build my own custom log4j (network) adapter to solve my problem that I posted here. I have looked at the documentation on the log4j and I cant ...

3. Which log4j Version is bundled with latest OpenCms 7?    stackoverflow.com

Which log4j Version is bundled with latest OpenCms 7?

4. Problem in addAppender() method in Log4j API    stackoverflow.com

Hi I'm using log4j api for logging purpose. When I use the following code to append to the appender, it's showing "addAppender() is undefined for the type Logger" error

FileAppender myAppender = ...

5. Log4J - Is there any point in explicitly specifying the class name in the call to LogManager.getLogger()?    stackoverflow.com

I'm working on some legacy code with a lot of code like

private final Logger logger = LogManager.getLogger(ThisClassName.class);
I'm wondering if there is any advantage to typing out "ThisClassName.class" as opposed to
LogManager.getLogger(getClass());
As far ...

6. Log4J timestamp    stackoverflow.com

Looks like timestamp is not in sequence, means logging based on level.Can We display based on timestamp? 2009-02-19 14:47:01,288 DEBUG [com.catalystwms.core.persistence.TransactionContext] 2009-02-19 14:54:27,429 INFO [com.catalystwms.tms.services.background.purge.PurgeManager] 2009-02-19 14:47:01,288 DEBUG [com.catalystwms.core.services.ServiceLocator] Please help me. Thanks,

7. Log4j is hanging my application what am I doing wrong?    stackoverflow.com

First some background on the application. I have an application processing many independent tasks in parallel via a thread pool. The thread pool is now hanging. The following is an snippet from ...

8. How to configure multiple log4j for different wars in a single EAR?    stackoverflow.com

I have a EAR with structures like:

APP.ear 
- APP1.war
    - WEB-INF/classes/log4j.properties
- APP2.war
    - WEB-INF/classes/log4j.properties
- app1-ejb.jar
- app2-ejb.jar
- log4j.jar
- spring.jar
- commons-lang.jar (...and other jar)
I want each WAR ...

9. Why does my Jnlp program not working with log4j?    stackoverflow.com

I have the following problem: I've deployed in Tomcat a JNLP and an executable JAR files. JNLP file should automatically download the JAR file and execute it. The JAR file is signed ...





10. How to initialize log4j properly?    stackoverflow.com

After adding log4j to my application I get the following output every time I execute my application:

log4j:WARN No appenders could be found for logger (slideselector.facedata.FaceDataParser).
log4j:WARN Please initialize the log4j system properly.
It ...

11. Obtaining the "Receivers Companion" for Apache Log4j    stackoverflow.com

Does anyone know where I can get a compiled distribution of the Receivers Companion for Log4j? The Apache project information for it is cryptically short. I've found the SVN repository, but ...

12. Log4J able to recover from disk full?    stackoverflow.com

We have several java application server running here, with several apps. They all log with Log4J into the same file system, which we created only for that reason. From time to time ...

13. Using newer version log4j in coldfusion    stackoverflow.com

So i have a java class that i want to call from a coldfusion page. The only problem is that my java class requires a newer version on log4j than ...

14. Using log4j with inherited classes    stackoverflow.com

I am instantiating a log4j object inside of a class which inherits most of the methods and attributes from a parent class. Right now I'm getting logging messages from the ...

15. Log4j for per class, how is precedence determined?    stackoverflow.com

I'm trying to permit debug logging per a particular class using Log4j, and I've got the following:

log4j.rootLogger=stdout, daily

log4j.logger.com.mycompany.myapplication.mymodule=DEBUG

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{h:mm:ssa} %5p (%F:%L) - %m%n
log4j.appender.stdout.threshold=warn

log4j.appender.daily=org.apache.log4j.DailyRollingFileAppender
log4j.appender.daily.layout=org.apache.log4j.PatternLayout
log4j.appender.daily.layout.ConversionPattern=%d{h:mm:ssa} %5p (%F:%L) - %m%n
log4j.appender.daily.File=/some/file/path/stuff
log4j.appender.daily.DatePattern=MMdd'.log'
log4j.appender.daily.threshold=info
If this is the WEB-INF/classes/log4j.properties file ...

16. What is the use of Log4j API?    stackoverflow.com

I am going to use Log4j in my web application and I am new to that. What is the uses of Log4j and how I use it in my application. Thanks ...





17. Single Log4j between Tomcat6 webapps    stackoverflow.com

All! Is there a correct way to use Log4j logger with Common ClassLoader, not with Web-App based ClassLoader, i.e. use only one log4j.jar for all deployed web-apps? When i'm drop a log4j.jar in ...

18. Log4j versus JCL    stackoverflow.com

I'm looking for more current recommendations on the JCL. I need to choose between using the JCL or just using straight Log4j. I can see the benefits of JCL, ...

19. log4j:WARN Please initialize the log4j system properly    stackoverflow.com

How to resolve these following errors... Am I missing some jar file???

log4j:WARN No appenders could be found for logger (smslib).
    log4j:WARN Please initialize the ...

20. What is the shortest way to get log4j initialized in your main method?    stackoverflow.com

I want everything to log to the console and don't want to have to deal with creating log4j.xml files, etc. I am prototyping some libraries and want to see their full ...

21. Log4J Custom Fields    stackoverflow.com

Introduction:

I'm trying to get additional fields to log with log4j, and its working but only when I create an appender in code and not in the log4j.properties

Progress:

  1. Used this article

22. Specify time zone of log4j's date    stackoverflow.com

Is it possible to specify the time zone that log4j will use? I need the dates in the log file to be a different time zone than the application's. log4j's PatternLayout ...

23. Unable to checkout log4j repository    stackoverflow.com

I'm using tortoiseSVN to checkout the log4j v1.2 source from - http://svn.apache.org/repos/asf/logging/log4j/trunk But i keep getting this error: Error: OPTIONS of '': Could not
Error: resolve hostname `svn.apache.org': No such host ...

24. How do I configure log4j to start with some text and end with some text?    stackoverflow.com

I'd like to make a log4j output file that is XML and give it a root element. Hence, I'd like it to start with a tag and end with a tag. What do ...

25. Log4J in AS/400    stackoverflow.com

I am looking for a logging mechanism in AS/400 similar to log4j. I am thinking of writing a wrapper to the log4j in AS/400. Can someone please let me know if ...

26. Usage of log4J levels    stackoverflow.com

What is the best practice in using log4j levels while coding. I mean when do we use INFO logging, when do we use DEBUG logging / ERROR logging etc.

27. log4J with java applet and java plugin2    stackoverflow.com

I have a java applet application running with java plugin2. The applet configuration is using a JNLP file, as supported by the next-generation java plugin architecture. Sun states that you ...

28. Way to automatically detect wrong log4j static initialization    stackoverflow.com

(Note that it's more of a Bash question than a Java question, see note below) When configuring log4j in each class, we do the following:

public class Example {

  private static final ...

29. Convert ASCII byte[] to String    stackoverflow.com

I am trying to pass a byte[] containing ASCII characters to log4j, to be logged into a file using the obvious representation. When I simply pass in the byt[] it is ...

30. log4j - when to use PropertyConfigurator in tests?    stackoverflow.com

I know you're supposed to only load log4j properties once, so what is standard practice when you're doing unit tests? Should I load it in every unit test file? Should I ...

31. a way to use log4j pass set flags in my code    stackoverflow.com

I need to pass some value to enable certain code in may app (in this case is to optionally enable writing some stats to a file in certain conditions, but it ...

32. Log4j Dynamic Parameter    stackoverflow.com

i have a j2ee web application running on spring framework and using log4j for logging. I have this line in my log4j.properties file. this will insert the logs in my database. ...

33. wsdl2java excpetion    stackoverflow.com

java org.apache.axis2.wsdl.WSDL2Java -s -p studs.exchange -uri https://api.betfair.com/exchange/v5/BFExchangeService.wsdl


Retrieving document at 'https://api.betfair.com/exchange/v5/BFExchangeService.wsdl'.
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
 at ...

34. log4j problem in java enterprise application    stackoverflow.com

I created a java enterprise application in Netbeans 6.8. It has ejb module and web application. I want to log all errors in catch block in my file. In web application, ...

35. Where can I find the source code for log4j's ZeroConfSocketHubAppender?    stackoverflow.com

I'm looking for a way to make log4net support zeroconf to publish logs to Apache Chainsaw (see here: http://stackoverflow.com/questions/2843238/does-log4net-support-zeroconf). Apparently log4j can already do this using a ZeroConfSocketHubAppender. Where might ...

36. I have problem using vesijama (Very Simple Java Mail)    stackoverflow.com

i already read this tutorial from here and i have download all required libraries (Log4j, JavaMail API ,Activation framework) . But when i trying running this program i got ...

37. Multiple libraries using log4j    stackoverflow.com

I'm writing a small Java application and having some trouble with log4j that appears to be caused by multiple, independent libraries trying to use it simultaneously:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.log4j.Logger.info(Ljava/lang/String;)V
 ...

38. A beginner's log4J question    stackoverflow.com

i configured log4j for basic purpose usin the conversion pattern :-

log4j.appender.rollingFile.layout.ConversionPattern=%p %t %c - %m%n
But now i want to log the class name from which the error came as well as ...

39. Log4j: Issues about the FallbackErrorHandler    stackoverflow.com

I am working on a client-server-application and wanted to implement a flexible Loggingframework, so I chose log4j, which doesn´t really evolve anymore, but it is still handy framework. Because the Logging happens ...

40. Log4j: Changing XML with DOMConfigurator?    stackoverflow.com

I am using log4j with Java and wanted to configure my XML-Config-File (I need to use XML for the ErrorHandler), so that some Properties in the XML (like the Backup-Value for ...

41. Will the Java optimizer remove parameter construction for empty method calls?    stackoverflow.com

Suppose I have code like :

log.info("Now the amount" + amount + " seems a bit high")
and I would replace the log method with a dummy implementation like :
class Logger {
  ...

42. log4j problem with timezone    stackoverflow.com

I have a web app which upon startup stores the server local timezone in a global static member and then sets the DefaultTimeZone of JVM to GMT. During startup log4j is logging ...

43. What's the name of names like i18n, log4j, c14n?    stackoverflow.com

I know that i18n -> i nternationalizatio n (18 letters), log4j -> log for java (4 -> four -> for), c14n -> c anonicalizatio n (14 letters), and so on. What are ...

44. log4j for standalone java project    stackoverflow.com

I was thinking to use log4j for my standalone java project. Is it possible to use it for java project(not a web app). If its possible then how should I be able to ...

45. Log4j: from where it initializes itself    stackoverflow.com

We are bundling Log4j 1.2.15 with our plain Swing application and load our own properties file from the file system at startup:

import org.apache.log4j.*;

...
System.setProperty("log4j.defaultInitOverride", "true");
...
File log4jPropertiesFile = ...
PropertyConfigurator.configure(log4jPropertiesFile.getAbsolutePath());
...
In logs we are getting ...

46. Log4j trim common category prefix    stackoverflow.com

I have a project that uses Apache Commons Logging & log4j with a large number of classes doing logging. 95% of my logs show up with the same prefix log4j.appender.MyCompany.layout.ConversionPattern=[%d][%-5p][%c] %m%n

[2010-08-05 ...

47. Is it possible to prefix every line of a stacktrace in log4j?    stackoverflow.com

when you write

logger.error("message", exception);
log4j produces the message and the complete stack trace :
Aug  9 06:26:13 10.175.60.14 myPrefix: [error] [TP-Processor114] [my.class.Name] message : exception
at fatherOfException
at fatherof_fatherOfException
at fatherof_fatherof_fatherOfException
...
my conversion pattern is
log4j.appender.syslog.layout.ConversionPattern=myPrefix: [%p] ...

48. log4j and XML content    stackoverflow.com

I am using log4j to log request/response XMLs sent by my application. The problem is that the xml contents are getting logged with newlines. Any suggestions as to how to format so ...

49. Log4J; how to ensure timestamps are always in GMT using ConversionPattern?    stackoverflow.com

How can I ensure that all timestamps that my log4j is using, are in GMT? I have tried the following but it prints "GMT" inside the timestamp

log4j.appender.ConversionPattern=%d{HH\:mm\:ss,SSS}{GMT} %-4r %-5p [%t] %3x - ...

50. Log4j category weirdness    stackoverflow.com

I've been having a frustrating time trying to sort out the logging in my project. In particular, one of the 3rd party libraries we use had one class, com.foo.bar.baz.java, that ...

51. Jruby log4j integration    stackoverflow.com

I am currently working on integrating Java application General Architecture For Text Engineering (GATE) with Rails application using Jruby architecture. When we worked on integrating Jruby with log4j, I am getting ...

52. log4j writing to a windows share    stackoverflow.com

I have a java application running on windows machines. Long story short, we have a convention for where we place log files per machine:

\\%COMPUTERNAME%\Logs\<AppNameHere>
So I configured my Java app to startup with ...

53. problem comes using SizeBasedTriggeringPolicy with log4j?    stackoverflow.com

I am using log4j with RollingFileAppender and also triggeringPolicy with SizeBasedTriggeringPolicy.log file is splited but one file split on size 11kb but other can grow without spliting when it reach ...

54. How to use log4j in code?    stackoverflow.com

We have to introduce logging in our application. We have decided to use log4j is it a good choice. Also somebody told that we should use singleton pattern for using log4j ...

55. log4j additivity    stackoverflow.com

Do people use the additivity feature of log4j a lot. I personally haven't found that being too useful to log the same thing in multiple places and often have ended up ...

56. multiple fileappenders in log4j    stackoverflow.com

i have to put the log info in two separate log files based on some condition.how to do that. here is my logging.properties file log4j.rootLogger=debug, stdout, R log4j.appender.stdout=org.apache.log4j.RollingFileAppender log4j.appender.stdout.File=${catalina.home}/logs/std.log log4j.appender.stdout.MaxFileSize=200KB log4j.appender.stdout.MaxBackupIndex=2 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d [%c] %p - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.home}/logs/demo.log log4j.appender.R.MaxFileSize=200KB log4j.appender.R.MaxBackupIndex=2 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d [%c] %p ...

57. Log4j hanging my application    stackoverflow.com

Im trying to get console output from an external application in my application. When i call the externall app from my code it hangs with the message: Configuring logging... Configuring log4j from: C:\GPAT\log4j.cfg and ...

58. Log4j java.lang.NoClassDefFoundError    stackoverflow.com

I couldnt understand what is causing this error: ERROR>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator ERROR>Caused by: java.lang.ClassNotFoundException: org.apache.log4j.PropertyConfigurator Already got the log4j-1.2.8.jar everywhere in the project but i couldnt make it. How can i ...

59. How can I get XML-structured data in each line with Log4j XMLLayout?    stackoverflow.com

Using the Log4J XMLLayout, I want to put a sequence of fields, wrapped in tags, inside each log-event (log-line). <x>some info</x> <y>more info</y>. This seems a natural way, in the context ...

60. log4j - set different loglevel for different packages/classes    stackoverflow.com

I use log4j for logigng and i want to print all logger.debug statements in a particular class / selected package. i set the cfg as below>

log4j.category.my.pkg=info
log4j.category.my.pkg.ab.class1=debug
but still only info messages are shown.. is ...

61. Initialising and using Log4J in Java    stackoverflow.com

I need to know how to initialise and use Log4j in java.... When i try to use it i get the following error log4j:WARN No appenders could be found for logger (Main). log4j:WARN ...

62. How to configure log4j in a unit testing environment?    stackoverflow.com

What is the best way to configure log4j for use in a unit testing environment? I prefer my unit tests to have no external dependencies, so reading the log4j configuration file ...

63. How to Re-Execute Log4j "Default Initialization Procedure"?    stackoverflow.com

At runtime I often create/modify log4j Loggers, Appenders, Levels, Layouts, and time to time need to reset everything back to defaults. Log4j system has well defined Default Initialization Procedure that ...

64. log4j alignment    stackoverflow.com

By checking IntelliJ IDEA's log output, I noticed the alignment was very nice (due amongst other to the fact that class names are right aligned and trimmed). How do you do this ...

65. what are the alternatives to log4j?    stackoverflow.com

Please suggest some alternatives for log4j.

66. log4j: design questions around log4j    stackoverflow.com

Q. Why is it good to have class per logger for log4j. I mean if you have 500 classes, than yo0u have 500 logger object? Q2. Is it better to roll ...

67. How to use log4j's FileAppenders asynchronously?    stackoverflow.com

I work on a low-latency trading application. We'd like to increase the amount of lof4j logging that we write to file, whilst minimising the impact on our end-to-end processing time. What ...

68. why is Log4j trying to find log4j.dtd    stackoverflow.com

I'm getting an exception when I try to run my application (in eclipse) complaining about log4j.dtd. Am I meant to have a dtd file if I use the xml configuration for ...

69. how to deploy log4j only use notepad     stackoverflow.com

i am a Java beginner and i want to use log4j , but i hate eclipse. I use programmer's notepad to write python and javascript. So how to use log4j if ...

70. how can I configure log4j so that it stops showing xml escape characters    stackoverflow.com

Hi In my application we are logging the xml requests to a file using patternlayout. The xml has a password field. but in log log4 it shows < &gt I want it ...

71. How to use open source library in C#?    stackoverflow.com

I would like to use log4j.net in my windows forms project. However I have never used any library or dll in .NET. How to do it? I look at ...

72. How to change log4j setting during application run?    stackoverflow.com

Is it possible to change log4j settings during application execution? Thanks in advance. Max

73. Proper way to declare log4j    stackoverflow.com

I'd like to receive a clarification on the following: Every class that has something to say in my program , creates its own logger like this

public final static Logger logger = Logger.getLogger(ClassName.class);
I ...

74. what does .class mean in log4j context    stackoverflow.com

In log4j, I need to use

Logger.getLogger(MyClass.class);
I want to know what is the meaning of MyClass.class?

75. Log4J XMLLayout setting LocationInfo    stackoverflow.com

How could I set the LocationInfo option in the log4j XMLLayout to true. From the XMLLayout code I understand that I need to enable this option to get the methodname, line ...

76. Log4j string matching - callback options    stackoverflow.com

I am using log4j for my app logging. Whenever some error messages are logged, i would like to perform some action like sending socket msg/sending traps/db update. I could see ...

77. How to configure log4j and Selenium Grid    stackoverflow.com

When I launch a Grid hub using ant, the logging is all by default on the console. I would like to know if there is a way wherein I can alter ...

78. NoClassDefFound when trying to run java with external libraries    stackoverflow.com

I have problem with running my java project.

E:\Workspace\compiled>java -classpath server\libraries\log4j-1.2.16.jar;E:\Workspace\compiled\server\service-1.0-SNAPSHOT.jar;E:\Workspace\compiled\server\libraries\log4j-1.2.16.jar -Djava.security.policy=E:\Workspace\compiled\socket.policy -Djava.rmi.server.codebase=file:///E:\Workspace\compiled\server\service-1.0-SNAPSHOT.jar -jar E:\Workspace\compiled\server\service-1.0-SNAPSHOT.jar E:\Workspace\compiled\log4j.properties
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
    at pwr.mgr.server.service.Launcher.main(Launcher.java:18)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.PropertyConfigurator
    ...

79. Does Apache Tailer conflict with log4j    stackoverflow.com

I am writing a utility that processes the lines added to a log file created by log4j. I found a couple of references on so to the Apache Tailer. My ...

80. duplicate lines in java applet when using log4j    stackoverflow.com

I'm trying to use log4j in an applet, but every time I refresh the page in the browser (to restart the applet) I get duplicated lines of output in the java ...

81. Log4j in Lotus Domino    stackoverflow.com

We are using Log4j.xml for the layout preferences while logging using log4j.jar... I have developed a common class which reads this XML file and logs info or error ... In this ...

82. Can log4j inherit xml from a base/root element?    stackoverflow.com

I'm trying to reduce duplication in my log4j configuration and wanted to know if I could push similar config down to a root.xml file and inherit from it in each of ...

83. log4j, nested diagnostic contexts    stackoverflow.com

I have a MySession object (a generic Session, not web) that runs in its thread. I want to use NDC class in order to include some data taken from fields of ...

84. Log4J NTEventLogAppender DLL not found    stackoverflow.com

Hy ppl, I'm having a problem trying to use Log4J's NTEventLogAppender. I've set my Log4J properties like this:

log4j.rootLogger=DEBUG, CA, NTEventLog 


    #Console Appender 
    log4j.appender.CA=org.apache.log4j.ConsoleAppender 
  ...

85. OutOfMemory GC overhead limit exceeded to acquire lock on log4j Objects    stackoverflow.com

Can anyone please help me to identify the exact are of problem. Is it either JVM, Log4j or something else in our application? We are running a multi-threaded application using JDK 1.6.0.24 ...

86. What is rrd.dir in log4j for?    stackoverflow.com

I came across rdd.dir in log4j properties file by the author of website http://juliusdavies.ca/logging.html Does anyone know what directory is this for?

87. Couchdb and log4j    stackoverflow.com

So I am thinking about making the change to couchdb. I googled it but couldn't find any documentation that it would support log4j. What I am trying to do is have ...

88. Is there an easy way to make log4j smaller?    stackoverflow.com

I'd like to use log4j as a component in an applet, but at nearly half a megabyte, it's kind of big to be pushing out over the network. Is there any ...

89. How to force log4j load xml config from non src folder?    stackoverflow.com

Is it possible to have log4j.xml loaded from a different dir than source root and how? (programmatically?) Meaning that it's somewhere in FS not just in classpath.

90. log4j: Do not clear buffer when sending mail    stackoverflow.com

I have the following log4j xml

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  <appender name="mail-appender" class="org.apache.log4j.net.SMTPAppender">
    <param name="BufferSize" value="64" />
    <param name="SMTPHost" value="mail.myserver.com" />
    <param name="Subject" value="Job ...

91. Benefits of Log4j singleton wrapper?    stackoverflow.com

I have recently inherited some Java code and need to integrate it into a project that I am working on. My project is a service agent that processes and transforms ...

92. How to turn off log4j warnings?    stackoverflow.com

I'm running a Java app that depends on a few libraries (Axis2) which use log4j. I don't use log4j and don't have any configuration file. I'd like to just ...

93. getting more info in HTMLLayout of log4j    stackoverflow.com

I have been using log4j 's HTMLLayout for getting logs in html format.However,it only allows 5 columns.I would like to get the name of method where the logging request was ...

94. why the log4j initialized with one name overrides with log4j initialized with another name..?    stackoverflow.com

my project contains two log4j files but are initialized with different names. but when the second one gets initialized the first one is getting overridden. What should be done to overcome ...

95. Log4j AsyncAppender    stackoverflow.com

We have a high-speed, high-volume application, which is using log4j. Typically we have been using the SyslogAppender, thinking that it's the lightest weight, fastest appender. But we are seeing high CPU ...

96. Log4j configure and watch not working properly    stackoverflow.com

I am using log4j for loggin purpose in my application. Since now to configure the logging i was using the following code :

LogManager.resetConfiguration();
InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("log4j.properties"); 
Properties props= new Properties();
props.load(stream);
PropertyConfigurator.configure(props);
But the ...

97. BIRT using log4J by default    stackoverflow.com

do BIRT by default uses log4j.properties file? if my aplication log4j path is same as birt log path.. then birt log is using my application log only.. i dont want this

98. Java get resource InvalidJarIndexException    stackoverflow.com

I have a class names test.java and another file "log4j.properties" in the same folder but following call

getClass().getResource("log4j.properties")
fails with
ms
Trace:
sun.misc.InvalidJarIndexException: Invalid index
    at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
    at ...

99. Log4j and Sandbox    stackoverflow.com

I am observing an issue with my application with log4j. I have a console appender added to my Root logger and some of the code runs in sandbox in different java ...

100. how to use log4j with multiple classes?    stackoverflow.com

I'm currently writing a big project in java, with numerous classes, some classes are quiet small, that simply represent objects with only few methods. I have a logger set in my main ...