Question

In Eclipse Ganymede (v3.3), I get the error "Unable to parse type name from hyperlink", when I click on a log4j message in the Console view.

My current log4j.properties file is:

log4j.rootLogger=DEBUG, console1.out

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.console1.out=org.apache.log4j.ConsoleAppender
log4j.appender.console1.out.target=System.out
log4j.appender.console1.out.layout=org.apache.log4j.PatternLayout
log4j.appender.console1.out.layout.ConversionPattern=%d{HH:mm:ss,SSS}-Thread(%5t)-(%F:%L) - %m%n
Was it helpful?

Solution

Change the log4j configuration. You need a space before the parenthesis around the following text.... Thread(%5t)-(%F:%L)

Specifically, change the last line to

log4j.appender.console1.out.layout.ConversionPattern=%d{HH:mm:ss,SSS} - Thread(%5t) - (%F:%L) - %m%n

In total

log4j.rootLogger=DEBUG, console1.out

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.console1.out=org.apache.log4j.ConsoleAppender
log4j.appender.console1.out.target=System.out
log4j.appender.console1.out.layout=org.apache.log4j.PatternLayout
log4j.appender.console1.out.layout.ConversionPattern=%d{HH:mm:ss,SSS} - Thread(%5t) - (%F:%L) - %m%n

Now, you should be able to click on the FileName:LineNumber, and it will open the java file at the correct line.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top