• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to find from where error has occurred from Stack Trace  RSS feed

 
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have following code and it generates output as follows
With this code, I am getting following error in eclipse console.
Error initializing config properties ..
log4j:WARN No appenders could be found for logger (com.rbc.teamsite.client.AuditReport).
log4j:WARN Please initialize the log4j system properly.
Java Global Settings: XML properties file [vgiappenv.xml] not found.
Java Global Settings: SecureXML properties file [securevgiappenv.xml] not found.


From the stack trace, how can I find out from which file these messages are coming ?

Thanks
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no stack trace in the logging you posted.

A stack trace looks like this:

Exception in thread "main" java.lang.IllegalArgumentException: Example
at org.jesperdj.sandbox.Main.main(Main.java:8)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

The first line shows what exception happened, and the message in the exception. The second line shows you exactly where the exception occurred, in which method of which class, and in which line of which source file. The third line shows you from where that method was called, the fourth line shows where the method from the third line was called, etc.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi nirjari patel,

Jesper was right...

coming to your error details, looks like log4j.properties file is not there. Please check and create if it not there.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!