NumberFormatException: For input string: "max"

I have been receiving the following exception when I tried to generate the database changelog to update the corresponding database from studio.

liquibase.command.CommandExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "max"

While I checked the idea.log file, here is what I see:

023-01-16 16:25:11,768 [4777770]   WARN - #com.haulmont.jmixstudio.intellij.runconfiguration.stepbefore.SyncDbBeforeRunProcess - liquibase.command.CommandExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "max"
liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "max"
	at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:211)
	at com.haulmont.jmixstudio.liquibase.LiquibaseCommandManager.generateDiffChangeLog(LiquibaseCommandManager.kt:262)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler$doRun$1$1$1.invoke(LiquibaseIntellijDiffGenerationHandler.kt:103)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler$doRun$1$1$1.invoke(LiquibaseIntellijDiffGenerationHandler.kt:90)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler.use(LiquibaseIntellijDiffGenerationHandler.kt:128)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler.access$use(LiquibaseIntellijDiffGenerationHandler.kt:30)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler$doRun$1$1.invoke(LiquibaseIntellijDiffGenerationHandler.kt:90)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler$doRun$1$1.invoke(LiquibaseIntellijDiffGenerationHandler.kt:89)
	at com.haulmont.jmixstudio.liquibase.LiquibaseCommandManagerKt.runWithPluginClassLoader(LiquibaseCommandManager.kt:478)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler$doRun$$inlined$runReadAction$1.compute(actions.kt:62)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:860)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler.doRun(LiquibaseIntellijDiffGenerationHandler.kt:147)
	at com.haulmont.jmixstudio.liquibase.LiquibaseIntellijDiffGenerationHandler.run$lambda$0(LiquibaseIntellijDiffGenerationHandler.kt:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager$1.run(CoreProgressManager.java:254)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:423)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:507)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:84)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:589)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:664)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:620)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:588)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: liquibase.command.CommandExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "max"
	at liquibase.command.AbstractCommand.execute(AbstractCommand.java:24)
	at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:209)
	... 34 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "max"
	at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:203)
	at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:85)
	at liquibase.command.core.DiffToChangeLogCommand.run(DiffToChangeLogCommand.java:72)
	at liquibase.command.AbstractCommand.execute(AbstractCommand.java:19)
	... 35 more
Caused by: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "max"
	at liquibase.diff.output.changelog.DiffToChangeLog$1.run(DiffToChangeLog.java:186)
	at liquibase.Scope.lambda$child$0(Scope.java:160)
	at liquibase.Scope.child(Scope.java:169)
	at liquibase.Scope.child(Scope.java:159)
	at liquibase.Scope.child(Scope.java:138)
	at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:127)
	... 38 more
Caused by: java.lang.NumberFormatException: For input string: "max"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
	at java.base/java.lang.Integer.parseInt(Integer.java:668)
	at java.base/java.lang.Integer.parseInt(Integer.java:786)
	at liquibase.ext.intellij.diff.MissingColumnChangeGenerator.fixMissing(MissingColumnChangeGenerator.java:81)
	at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:48)
	at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:95)
	at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:302)
	at liquibase.ext.intellij.command.HDiffToChangeLog.generateChangeSets(HDiffToChangeLog.java:93)
	at liquibase.ext.intellij.command.JmixDiffToChangeLogCommand$createDiffToChangeLogObject$1.generateChangeSets(JmixDiffToChangeLogCommand.kt:39)
	at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:246)
	at liquibase.diff.output.changelog.DiffToChangeLog$1.run(DiffToChangeLog.java:137)
	... 43 more
2023-01-16 16:33:02,733 [5248735]   INFO - #com.haulmont.jmixstudio.intellij.indexing.properties.AppPropertyUsageIndex - Found some propeties in module.properties
2023-01-16 16:33:02,734 [5248736]   INFO - #com.haulmont.studio.intellij.indexing.properties.AppPropertyUsageIndex - Found some propeties in module.properties
2023-01-16 16:33:09,932 [5255934]   WARN - #com.haulmont.jmixstudio.intellij.theme.tree.ThemesSection - Themes folder (/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1423/inteacchr/inteacchr/frontend/themes) not exist in module inteacchr
2023-01-16 16:33:10,417 [5256419]   INFO - #c.i.c.ComponentStoreImpl - Saving appFileTypeManager took 49 ms, Vcs.Log.App.Settings took 69 ms
2023-01-16 16:33:10,480 [5256482]   INFO - #c.i.c.ComponentStoreImpl - Saving Module: 'inteaccgms-addon'JmixProjectModulesStateV2 took 37 ms
2023-01-16 16:33:10,529 [5256531]   INFO - #c.i.c.ComponentStoreImpl - Saving Module: 'inteaccact-addon'JmixProjectModulesStateV2 took 35 ms
2023-01-16 16:33:10,577 [5256579]   INFO - #c.i.c.ComponentStoreImpl - Saving Module: 'inteaccops-addon.inteaccops.test'JmixProjectModulesStateV2 took 37 ms
2023-01-16 16:33:10,628 [5256630]   INFO - #c.i.c.ComponentStoreImpl - Saving Module: 'inteaccgms-addon.inteaccgms-starter.main'JmixProjectModulesStateV2 took 37 ms
2023-01-16 16:33:10,721 [5256723]   INFO - #c.i.c.ComponentStoreImpl - Saving Module: 'inteaccap-addon.inteaccap.test'JmixProjectModulesStateV2 took 74 ms
2023-01-16 16:33:10,901 [5256903]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=inteaccerp, containerState=COMPONENT_CREATED, componentStore=/Users/mak/Projects/inteaccerp FLOW/inteaccComposite1423/inteaccerp-all)GradleMigrationSettings took 85 ms, JmixDataStoreSettingsManager took 46 ms
2023-01-16 16:33:10,978 [5256980]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=inteaccerp, containerState=COMPONENT_CREATED, componentStore=/Users

Where is this input string: "max" coming from to fix?

I found the problem where is it originating from! The problem is gone when I removed all fields type byte[] that i created for storing image data. I hope this helps JMIX team to identify the root cause and fix it. Currently, I am unable to use any database column for image in my project.

1 Like

Hi

Thanks for your report!
The YouTrack issue created. Fix will be provided in the next Studio release.

1 Like