The extra newlines seem to cause the problem. I would prefer that this message could be parsed. If that is too difficult, it would be good if the remainder of the file could be parsed and not let one message cause the whole file to not be parsed.
ERROR 2010-12-13 08:12:34,662 [RMI TCP Connection(1614)-000.11.222.333] - Error doing something! (class4.java:13634)
dir1.dir2.FooException: Error creating data object!
dir.dir2.FooException: Error getting Type data object!
dir.dir2.FooException: Error getting timestamp from column 'update_timestamp' in table 'this_list' on 'Type'!
java.sql.SQLException: Bad format for number '18446682143312751616' in column 1(this_list.update_timestamp).
at org.gjt.mm.mysql.ResultSet.getLong(ResultSet.java:411)
at org.apache.commons.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:189)
at dir.dir3.class1.getTimestampVal(class1.java:200)
at dir.server.class1.getTimestampVal(class1.java:144)
at dir.dir3.class2.getTimestampUpdate(class2.java:7066)
at dir.dir3.class2.getDO(class2.java:5878)
at dir.dir3.class3.getDataObject(class3.java:1365)
at dir.dir3.class4.getAnotherDataObject(class4.java:13527)
at dir.dir3.class4.getAnotherDataObject(class4.java:13362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
I tried to reproduce the problem with LogMX v2.0.1, this Log4j Pattern, and log file, and LogMX doesn't produce a NullPointerException.
Do you mean LogMX produces this NullPointerException, or do you try to parse a log file that contains a Stack Trace for a NullPointerException?
I parsed the sample log file of your first post with your two Log4j parsers, using LogMX v2.0.1 with a default configuration (except for these two parsers), but I didn't get any Exception.
Please try the following:
close LogMX
rename your config file "config/logmx.properties" to a temporary file name
start LogMX
remove all existing parsers
add your two Log4j parsers
parse again your file
If it still produces an Exception, please send us:
java.lang.NullPointerException
at be.a(Unknown Source)
at com.lightysoft.logmx.mgr.parsers.Log4jPatternLogFileParser.a(Unknown Source)
at com.lightysoft.logmx.mgr.parsers.Log4jPatternLogFileParser.parseLine(Unknown Source)
at com.lightysoft.logmx.mgr.e.a(Unknown Source)
at com.lightysoft.logmx.mgr.e.a(Unknown Source)
at ng.a(Unknown Source)
at le.run(Unknown Source)
Any idea how I can fix my properties file? I'd like to keep all my bookmarks from the old one.
It seems to be an issue with user-defined fields (this parser uses "Line" and "File" fields), but I can't detect the root cause of the problem using this single stack trace, could you please send your config file to support@logmx.com (for security reason, you may want to remove from this file all your network accounts before).
We have received your config file, thank you.
The error comes from the Log4j tags settings of Parser "IMAT2". I don't know why, but this config file doesn't contain any L4j tag setting for this parser (maybe you have manually modified this config file, or maybe a bug has removed all these tag settings for this parser).
Anyway, to use LogMX with your original config file again, you simply have to remove this parser and to recreate it.