line number display in stack trace

Discussions

General J2EE: line number display in stack trace

  1. line number display in stack trace (2 messages)

    Hi All,

    I have been trying jrun to test my code, I saw that when there is a exception, the line number
    of my application classes doesn't print in the stacktrace, it shows (Unknown Source), but for
    jdk classes it gives the line number,

    Can anyone help me how to fix this?

    Thanks,
    Suresh

    Code snippet
    <pre>
            at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
            at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
            at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)
            at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
            at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:
    288)
            at insite.util.TestManager.executeUpdate(Unknown Source)
            at insite.util.TestManager.processInsert(Unknown Source)


    I tried using -Djava.compiler=none, but no success.

    </pre>
  2. line number display in stack trace[ Go to top ]

    Did you compile the source with debugging info enabled? You might want to try to explicitly turn it on. Check out the compiler's docs.

    Gal
  3. line number display in stack trace[ Go to top ]

    Gal,
       It worked thanks for your reply, I was using ant for
    compiling and the debug was not set to on.

    Thanks
    Suresh