-
Jun 16th, 2008, 04:23 AM
#1
StandardEntryFilter - StringIndexOutOfBoundsException
Hi,
Using beta6 I get this exception when some code in my web module does some simple logging using a static log4j logger.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.String.substring(Unknown Source)
com.springsource.platform.serviceability.output.in ternal.StandardEntryFilter.filter(StandardEntryFil ter.java:93)
com.springsource.platform.serviceability.tracing.i nternal.EntryPublisherAccessor$FilteringEntryPubli sher.filter(EntryPublisherAccessor.java:180)
com.springsource.platform.serviceability.tracing.i nternal.StandardTracer.isTraceEnabled(StandardTrac er.java:73)
com.springsource.platform.serviceability.tracing.i nternal.StandardTracer.trace(StandardTracer.java:5 6)
com.springsource.platform.serviceability.tracing.s lf4j.TracerToLoggerAdapter.trace(TracerToLoggerAda pter.java:521)
com.springsource.platform.serviceability.tracing.s lf4j.TracerToLoggerAdapter.trace(TracerToLoggerAda pter.java:517)
com.springsource.platform.serviceability.tracing.s lf4j.TracerToLoggerAdapter.debug(TracerToLoggerAda pter.java:58)
org.apache.log4j.Category.debug(Category.java:180)
at com.foo.webservice.ServerHandler.handleRequest(Ser verHandler.java:121)
at org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter.handle(HttpRequestHandlerAdapter.java: 49)
Has anyone else seen this before? What is weird is that I have other log statements that get printed in the same http request that don't exhibit this behaviour. Is there an easy way to change the tracing config so this filter is not used?
Rob
-
Jun 16th, 2008, 04:40 AM
#2
StandardEntryFilter - StringIndexOutOfBoundsException
FYI: this thread is duplicated at:
http://www.springsource.com/beta/applicationplatform/comments.php?DiscussionID=152&page=1#Item_1
-
Jun 16th, 2008, 04:49 AM
#3
StandardEntryFilter - StringIndexOutOfBoundsException
Rob,
What is the log message that you are writing?
Rob
-
Jun 16th, 2008, 04:52 AM
#4
StandardEntryFilter - StringIndexOutOfBoundsException
See https://issuetracker.springsource.com/browse/PLATFORM-82
-
Jun 16th, 2008, 05:02 AM
#5
StandardEntryFilter - StringIndexOutOfBoundsException
Also, I should ask, what is the name of the Log4j Category that you are using?
Rob
-
Jun 17th, 2008, 04:16 AM
#6
StandardEntryFilter - StringIndexOutOfBoundsException
Hi,
Managed to find what was causing this and why it was only happening in a few classes. Most of the log4j loggers that are defined throughout the codebase are defined using the following:
private static final Logger logger = Logger.getLogger(Foo.class);
The exception I reported only occurs for loggers that for whatever reason don't follow the above convention and instead name the logger something other then the classname. In my case this was a string without any dots.
Rob
-
Jun 17th, 2008, 04:26 AM
#7
StandardEntryFilter - StringIndexOutOfBoundsException
Rob,
I suspected that was the problem - a fix has been committed and will be included in Friday's beta refresh.
Regards,
Rob
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules