StringIndexOutOfBoundsException while connecting to MySQL database

Help
Gerald
2014-05-19
2014-06-17
  • Gerald

    Gerald - 2014-05-19

    I am trying to extract model from a MySQL database, the test connection is successful, but when I launch "Analyse Database" it fails with StringIndexOutOfBoundsException. The problem only occurs when I run jailer.exe, when I use jailerGUI.bat it runs fine.

    Tested with Jailer 4.1.1 and 4.2.1 on Windows 7 and Java 7

    2014-05-19 14:39:09,750 [jailer-main] ERROR - Error creating bean with name 'dbms-configuration': Cannot create inner bean 'net.sf.jailer.Configuration#9705c6' of type [net.sf.jailer.Configuration] while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#9705c6' defined in file [C:\Java\jailer-4.1.1\jailer\jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbms-configuration': Cannot create inner bean 'net.sf.jailer.Configuration#9705c6' of type [net.sf.jailer.Configuration] while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#9705c6' defined in file [C:\Java\jailer-4.1.1\jailer\jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    Caused by:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#9705c6' defined in file [C:\Java\jailer-4.1.1\jailer\jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    Caused by:
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(Unknown Source)
    at org.springframework.beans.BeanWrapperImpl.getPropertyNameTokens(BeanWrapperImpl.java:499)
    at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:525)
    at org.springframework.beans.BeanWrapperImpl.getPropertyType(BeanWrapperImpl.java:278)
    at org.springframework.beans.PropertyEditorRegistrySupport.findCustomEditor(PropertyEditorRegistrySupport.java:297)
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:166)
    at org.springframework.beans.TypeConverterDelegate.convertToTypedMap(TypeConverterDelegate.java:431)
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:208)
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:815)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:835)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:215)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:281)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:131)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1073)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:835)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360)
    at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:93)
    at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:77)
    at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:67)
    at net.sf.jailer.Configuration.getContext(Configuration.java:175)
    at net.sf.jailer.Configuration.getDoMinimizeUPK(Configuration.java:149)
    at net.sf.jailer.Jailer.jailerMain(Jailer.java:1022)
    at net.sf.jailer.ui.UIUtil$5.run(UIUtil.java:445)
    at java.lang.Thread.run(Unknown Source)
    Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbms-configuration': Cannot create inner bean 'net.sf.jailer.Configuration#9705c6' of type [net.sf.jailer.Configuration] while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#9705c6' defined in file [C:\Java\jailer-4.1.1\jailer\jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1

     
  • Ralf Wisser

    Ralf Wisser - 2014-05-19

    Hi,

    Thats strange. I would like to see the file "C:\Java\jailer-4.1.1\jailer\jailer.xml". Would you please post it here? (Or send it to rwisser@users.sourceforge.net)

     
  • Gerald

    Gerald - 2014-05-19

    It's the file provided in jailer's Zip.

    I might be related to the Java version used, how does the jailer.exe select which JRE to use?

     
  • Ralf Wisser

    Ralf Wisser - 2014-05-20

    jailer.exe invokes the latest JRE version installed.

     
  • Niels Kristian

    Niels Kristian - 2014-06-03

    I'm having the same problem when connecting to a Postgresql database on OS X.

    Note that I have added a newer JDBC driver

    2014-06-03 15:28:40,732 [AWT-EventQueue-0] INFO   - added 'lib/postgresql-9.2-1004.jdbc4.jar' to classpath
    2014-06-03 15:29:12,733 [jailer-main] INFO   - arguments: build-model org.postgresql.Driver jdbc:postgresql://localhost:5433/au_production au "<password>" -jdbcjar lib/postgresql-9.2-1004.jdbc4.jar -schema da -qualifyNames -datamodel datamodel/AU-production -script-enhancer .
    2014-06-03 15:29:13,152 [jailer-main] ERROR  - Error creating bean with name 'dbms-configuration': Cannot create inner bean 'net.sf.jailer.Configuration#5d1b818e' of type [net.sf.jailer.Configuration] while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#5d1b818e' defined in file [/Users/nk/Programmering/jailer/jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbms-configuration': Cannot create inner bean 'net.sf.jailer.Configuration#5d1b818e' of type [net.sf.jailer.Configuration] while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#5d1b818e' defined in file [/Users/nk/Programmering/jailer/jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    Caused by: 
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#5d1b818e' defined in file [/Users/nk/Programmering/jailer/jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    Caused by: 
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1954)
      at org.springframework.beans.BeanWrapperImpl.getPropertyNameTokens(BeanWrapperImpl.java:499)
      at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:525)
      at org.springframework.beans.BeanWrapperImpl.getPropertyType(BeanWrapperImpl.java:278)
      at org.springframework.beans.PropertyEditorRegistrySupport.findCustomEditor(PropertyEditorRegistrySupport.java:297)
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:166)
      at org.springframework.beans.TypeConverterDelegate.convertToTypedMap(TypeConverterDelegate.java:431)
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:208)
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
      at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:815)
      at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)
      at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
      at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:835)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:215)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:281)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:131)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1073)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:835)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360)
      at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:93)
      at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:77)
      at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:67)
      at net.sf.jailer.Configuration.getContext(Configuration.java:175)
      at net.sf.jailer.Configuration.getDoMinimizeUPK(Configuration.java:149)
      at net.sf.jailer.Jailer.jailerMain(Jailer.java:1055)
      at net.sf.jailer.ui.UIUtil$5.run(UIUtil.java:463)
      at java.lang.Thread.run(Thread.java:745)
    Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbms-configuration': Cannot create inner bean 'net.sf.jailer.Configuration#5d1b818e' of type [net.sf.jailer.Configuration] while setting bean property 'sourceList' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.jailer.Configuration#5d1b818e' defined in file [/Users/nk/Programmering/jailer/jailer.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    2014-06-03 15:29:13,158 [jailer-main] ERROR  - working directory is /Users/nk/Programmering/jailer
    
     
  • Ralf Wisser

    Ralf Wisser - 2014-06-03

    Hi,

    what Java JRE version do you use?

     
  • Niels Kristian

    Niels Kristian - 2014-06-11

    java version "1.8.0_05"
    Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

     
  • Ralf Wisser

    Ralf Wisser - 2014-06-17

    There was an incompatibility with JRE 8. I've fixed it in release 4.2.3.

     


Anonymous

Cancel  Add attachments