java.lang.IndexOutOfBoundsException: No group 1

QOS.ch JIRA | 李飞 | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    the log file is create by seconds ,when log file is new create ,it's normal, if it's already exist,then exception hanppen: RuntimeException in Action for tag [rollingPolicy] java.lang.IndexOutOfBoundsException: No group 1 at java.lang.IndexOutOfBoundsException: No group 1 at at java.util.regex.Matcher.group(Matcher.java:487) at at ch.qos.logback.core.rolling.helper.FileFilterUtil.extractCounter(FileFilterUtil.java:109) at at ch.qos.logback.core.rolling.helper.FileFilterUtil.findHighestCounter(FileFilterUtil.java:93) at at ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.computeCurrentPeriodsHighestCounterValue(SizeAndTimeBasedFNATP.java:70) at at ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.start(SizeAndTimeBasedFNATP.java:50) at at ch.qos.logback.core.rolling.TimeBasedRollingPolicy.start(TimeBasedRollingPolicy.java:90) at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288) at at LogTest.<clinit>(LogTest.java:8) at at java.lang.Class.forName0(Native Method) at at java.lang.Class.forName(Class.java:190) at at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122) the follow is logback.xml <?xml version="1.0" encoding="UTF-8"?> <!-- 设置日志级别及是否自动扫描配置文件的修改 时间单位为:milliseconds、seconds、minutes和hours --> <configuration debug="false" scan="true" scanPeriod="30 seconds"> <Encoding>UTF-8</Encoding> <!-- D:/PROJECT_HOME/log --> <property name=%26quot%3Blog%2Ebase%26quot%3B value="/cache11/qoss" /> <property name=%26quot%3Blog%2EbusinessType%26quot%3B value="wsutil" /> <timestamp key="byHour" datePattern="ss"/> <timestamp key="byDay" datePattern="yyyyMMdd"/> <appender name=%26quot%3Bconsole%26quot%3B class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n </pattern> </encoder> </appender> <appender name=%26quot%3BdebugLogFile%26quot%3B class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${log.base}/logs/${log.businessType}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.base}/%d{yyyyMMdd,aux}/logs/${log.businessType}/%d{ss}.log</fileNamePattern> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter> <!-- 独立的pattern --> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n </pattern> </encoder> </appender> <appender name=%26quot%3BwarnLogFile%26quot%3B class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${log.base}/logs/${log.businessType}.log.wf</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.base}/%d{yyyyMMdd}/logs/${log.businessType}/%d{HH}.log.wf</fileNamePattern> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>WARN</level> </filter> <!-- 独立的pattern --> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n </pattern> </encoder> </appender> <root level="DEBUG"> <appender-ref ref="debugLogFile"/> <appender-ref ref="warnLogFile"/> <appender-ref ref="console"/> </root> <!--log4jdbc --> <logger name=%26quot%3Bjdbc%2Esqltiming%26quot%3B level="DEBUG"> </logger> <logger name=%26quot%3Bjdbc%2Esqlonly%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Eaudit%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Eresultset%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Econnection%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Eresultsettable%26quot%3B level="OFF"> </logger> </configuration>

    QOS.ch JIRA | 2 years ago | 李飞
    java.lang.IndexOutOfBoundsException: No group 1
  2. 0

    the log file is create by seconds ,when log file is new create ,it's normal, if it's already exist,then exception hanppen: RuntimeException in Action for tag [rollingPolicy] java.lang.IndexOutOfBoundsException: No group 1 at java.lang.IndexOutOfBoundsException: No group 1 at at java.util.regex.Matcher.group(Matcher.java:487) at at ch.qos.logback.core.rolling.helper.FileFilterUtil.extractCounter(FileFilterUtil.java:109) at at ch.qos.logback.core.rolling.helper.FileFilterUtil.findHighestCounter(FileFilterUtil.java:93) at at ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.computeCurrentPeriodsHighestCounterValue(SizeAndTimeBasedFNATP.java:70) at at ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.start(SizeAndTimeBasedFNATP.java:50) at at ch.qos.logback.core.rolling.TimeBasedRollingPolicy.start(TimeBasedRollingPolicy.java:90) at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288) at at LogTest.<clinit>(LogTest.java:8) at at java.lang.Class.forName0(Native Method) at at java.lang.Class.forName(Class.java:190) at at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122) the follow is logback.xml <?xml version="1.0" encoding="UTF-8"?> <!-- 设置日志级别及是否自动扫描配置文件的修改 时间单位为:milliseconds、seconds、minutes和hours --> <configuration debug="false" scan="true" scanPeriod="30 seconds"> <Encoding>UTF-8</Encoding> <!-- D:/PROJECT_HOME/log --> <property name=%26quot%3Blog%2Ebase%26quot%3B value="/cache11/qoss" /> <property name=%26quot%3Blog%2EbusinessType%26quot%3B value="wsutil" /> <timestamp key="byHour" datePattern="ss"/> <timestamp key="byDay" datePattern="yyyyMMdd"/> <appender name=%26quot%3Bconsole%26quot%3B class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n </pattern> </encoder> </appender> <appender name=%26quot%3BdebugLogFile%26quot%3B class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${log.base}/logs/${log.businessType}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.base}/%d{yyyyMMdd,aux}/logs/${log.businessType}/%d{ss}.log</fileNamePattern> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter> <!-- 独立的pattern --> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n </pattern> </encoder> </appender> <appender name=%26quot%3BwarnLogFile%26quot%3B class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${log.base}/logs/${log.businessType}.log.wf</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.base}/%d{yyyyMMdd}/logs/${log.businessType}/%d{HH}.log.wf</fileNamePattern> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>WARN</level> </filter> <!-- 独立的pattern --> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n </pattern> </encoder> </appender> <root level="DEBUG"> <appender-ref ref="debugLogFile"/> <appender-ref ref="warnLogFile"/> <appender-ref ref="console"/> </root> <!--log4jdbc --> <logger name=%26quot%3Bjdbc%2Esqltiming%26quot%3B level="DEBUG"> </logger> <logger name=%26quot%3Bjdbc%2Esqlonly%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Eaudit%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Eresultset%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Econnection%26quot%3B level="OFF"> </logger> <logger name=%26quot%3Bjdbc%2Eresultsettable%26quot%3B level="OFF"> </logger> </configuration>

    QOS.ch JIRA | 2 years ago | 李飞
    java.lang.IndexOutOfBoundsException: No group 1
  3. 0

    logback error while server startup

    Stack Overflow | 2 years ago | kenthewala
    java.lang.IndexOutOfBoundsException: No group 1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java | Tona Consulting

    tonaconsulting.com | 2 years ago
    java.lang.IndexOutOfBoundsException: No group 1
  6. 0

    General | Tona Consulting

    tonaconsulting.com | 1 year ago
    java.lang.IndexOutOfBoundsException: No group 1
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IndexOutOfBoundsException

    No group 1

    at java.util.regex.Matcher.group()
  2. Java RT
    Matcher.group
    1. java.util.regex.Matcher.group(Matcher.java:487)
    1 frame
  3. Logback Core Module
    GenericConfigurator.doConfigure
    1. ch.qos.logback.core.rolling.helper.FileFilterUtil.extractCounter(FileFilterUtil.java:109)
    2. ch.qos.logback.core.rolling.helper.FileFilterUtil.findHighestCounter(FileFilterUtil.java:93)
    3. ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.computeCurrentPeriodsHighestCounterValue(SizeAndTimeBasedFNATP.java:70)
    4. ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.start(SizeAndTimeBasedFNATP.java:50)
    5. ch.qos.logback.core.rolling.TimeBasedRollingPolicy.start(TimeBasedRollingPolicy.java:90)
    6. ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167)
    7. ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)
    8. ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196)
    9. ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182)
    10. ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
    11. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
    12. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
    13. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
    14. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
    14 frames
  4. Logback Classic Module
    ContextInitializer.autoConfig
    1. ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
    2. ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152)
    2 frames
  5. SLF4J LOG4J-12 Binding
    StaticLoggerBinder.<clinit>
    1. org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
    2. org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    2 frames
  6. SLF4J API Module
    LoggerFactory.getLogger
    1. org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
    2. org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
    3. org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
    4. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
    5. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
    5 frames
  7. Unknown
    LogTest.<clinit>
    1. LogTest.<clinit>(LogTest.java:8)
    1 frame
  8. Java RT
    Class.forName
    1. java.lang.Class.forName0(Native Method)
    2. java.lang.Class.forName(Class.java:190)
    2 frames
  9. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)
    1 frame