java.lang.StackOverflowError: null

Spring JIRA | Fares Hassak | 4 years ago
  1. 0

    I have an infinite loop error in SmbSession class when i use the "list" method with path ".\MYFOLDER\" : java.lang.StackOverflowError: null at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:396) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402) ~[spring-integration-smb-1.0.0-20121226.jar:na] ... The inifite loop is in this method : {code}  private SmbFile createSmbFileObject(String _path, Boolean _isDirectory) throws IOException { String path = StringUtils.cleanPath(_path); if (!StringUtils.hasText(path)) { return smbShare; } SmbFile smbFile = new SmbFile(smbShare, path); boolean appendFileSeparator = !path.endsWith(FILE_SEPARATOR); if (appendFileSeparator) { try { appendFileSeparator = smbFile.isDirectory() || (_isDirectory != null && _isDirectory); } catch (Exception _ex) { appendFileSeparator = false; } } if (appendFileSeparator) { smbFile = createSmbFileObject(path + FILE_SEPARATOR); } if (logger.isDebugEnabled()) { logger.debug("Created new " + SmbFile.class.getName() + "[" + smbFile + "] for path [" + path + "]."); } return smbFile; } {code}  After cleaning path, the boolean variable "appendFileSeparator" is always true because the "path" variable ends with '/' and FILE_SEPARATOR is '\'. A possible solution is to use the variable "_path" instead of "path" in this code : {code}boolean appendFileSeparator = !path.endsWith(FILE_SEPARATOR);{code} Thanks.

    Spring JIRA | 4 years ago | Fares Hassak
    java.lang.StackOverflowError: null
  2. 0

    I have an infinite loop error in SmbSession class when i use the "list" method with path ".\MYFOLDER\" : java.lang.StackOverflowError: null at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:396) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414) ~[spring-integration-smb-1.0.0-20121226.jar:na] at org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402) ~[spring-integration-smb-1.0.0-20121226.jar:na] ... The inifite loop is in this method : {code}  private SmbFile createSmbFileObject(String _path, Boolean _isDirectory) throws IOException { String path = StringUtils.cleanPath(_path); if (!StringUtils.hasText(path)) { return smbShare; } SmbFile smbFile = new SmbFile(smbShare, path); boolean appendFileSeparator = !path.endsWith(FILE_SEPARATOR); if (appendFileSeparator) { try { appendFileSeparator = smbFile.isDirectory() || (_isDirectory != null && _isDirectory); } catch (Exception _ex) { appendFileSeparator = false; } } if (appendFileSeparator) { smbFile = createSmbFileObject(path + FILE_SEPARATOR); } if (logger.isDebugEnabled()) { logger.debug("Created new " + SmbFile.class.getName() + "[" + smbFile + "] for path [" + path + "]."); } return smbFile; } {code}  After cleaning path, the boolean variable "appendFileSeparator" is always true because the "path" variable ends with '/' and FILE_SEPARATOR is '\'. A possible solution is to use the variable "_path" instead of "path" in this code : {code}boolean appendFileSeparator = !path.endsWith(FILE_SEPARATOR);{code} Thanks.

    Spring JIRA | 4 years ago | Fares Hassak
    java.lang.StackOverflowError: null
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [xtext,ocl] Unhandled event loop exception

    Eclipse Bugzilla | 2 years ago | error-reports-inbox
    java.lang.StackOverflowError: null

    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.StackOverflowError

      null

      at org.springframework.integration.smb.session.SmbSession.createSmbFileObject()
    2. org.springframework.integration
      SmbSession.createSmbFileObject
      1. org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:396)[spring-integration-smb-1.0.0-20121226.jar:na]
      2. org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414)[spring-integration-smb-1.0.0-20121226.jar:na]
      3. org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402)[spring-integration-smb-1.0.0-20121226.jar:na]
      4. org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414)[spring-integration-smb-1.0.0-20121226.jar:na]
      5. org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402)[spring-integration-smb-1.0.0-20121226.jar:na]
      6. org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:414)[spring-integration-smb-1.0.0-20121226.jar:na]
      7. org.springframework.integration.smb.session.SmbSession.createSmbFileObject(SmbSession.java:402)[spring-integration-smb-1.0.0-20121226.jar:na]
      7 frames