0

In exception stackTrace I am receiving Unknown Source, instead of line number of source code.

Build was created using Ant, OS RedHat Linux and deployed on Application Server as Weblogic.

java.lang.NullPointerException
            at util.NotificationUtil.sendLimitChangeNotifications(Unknown Source)
            at bc_hierarchy.mailer.BCPositionNotificationMailer.process(Unknown Source)
            at service.message.FRMessenger.invokeTargetClass(Unknown Source)
            at service.message.FRMessenger.processMessage(Unknown Source)
            at service.message.FRQueueMsgListener.onMessage(Unknown Source)

What are the way to fix line number issue so I can resolve my Exception? (Because of security reason I can provide source code here)

Is there any way So I do not need to recompile?

Alpesh Gediya
  • 3,706
  • 1
  • 25
  • 38
  • 1
    You need to keep the line numbers when compiling. "I feel lucky" on that search engine gave this random link: http://www.jguru.com/faq/view.jsp?EID=1122360 – Klas Lindbäck May 27 '13 at 15:26

2 Answers2

3

The class files does not have line number(debug) information. You cannot accurately get it without debug version jars/class.

Note that by default some build tools produce classes with debug=off. For example see ant javac task

Jayan
  • 18,003
  • 15
  • 89
  • 143
1

See: (Unknown Source) in Exception stack trace

"This is normally related to missing debug information."

You need to get a copy of the original source code and add it to your project...or decompile it.

Community
  • 1
  • 1