java.lang.RuntimeException: Failed to start file sync to db: Failed to insert config 'artifactory.support.support-bundle-20170202-2153523-1486072432334.zip' to database.


Solutions on the web1

Solution icon of jfrog
via JFrog JIRA by Arturo Aparicio, 8 months ago
Failed to start file sync to db: Failed to insert config 'artifactory.support.support-bundle-20170202-2153523-1486072432334.zip' to database.

Stack trace

java.lang.RuntimeException: Failed to start file sync to db: Failed to insert config 'artifactory.support.support-bundle-20170202-2153523-1486072432334.zip' to database.
	at org.artifactory.common.config.ConfigurationManagerImpl.startSync(ConfigurationManagerImpl.java:153)
	at org.artifactory.webapp.servlet.BasicConfigManagers.initHomes(BasicConfigManagers.java:74)
	at org.artifactory.webapp.servlet.BasicConfigManagers.initialize(BasicConfigManagers.java:56)
	at org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener.contextInitialized(ArtifactoryHomeConfigListener.java:53)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1798)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.artifactory.common.config.db.ConfigUpdateException: Failed to insert config 'artifactory.support.support-bundle-20170202-2153523-1486072432334.zip' to database.
	at org.artifactory.common.config.db.ConfigsDataAccessObject.setConfig(ConfigsDataAccessObject.java:142)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.fileToDb(ConfigWrapperImpl.java:275)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.modifyInternal(ConfigWrapperImpl.java:227)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.modifiedWithRetry(ConfigWrapperImpl.java:208)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.modifiedWithRetry(ConfigWrapperImpl.java:211)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.modifiedWithRetry(ConfigWrapperImpl.java:211)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.modifiedWithRetry(ConfigWrapperImpl.java:211)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.initialize(ConfigWrapperImpl.java:70)
	at org.artifactory.common.config.wrappers.ConfigWrapperImpl.<init>(ConfigWrapperImpl.java:58)
	at org.artifactory.common.config.ConfigurationManagerImpl.registerFolder(ConfigurationManagerImpl.java:245)
	at org.artifactory.common.config.ConfigurationManagerImpl.registerSharedFiles(ConfigurationManagerImpl.java:212)
	at org.artifactory.common.config.ConfigurationManagerImpl.startFileSync(ConfigurationManagerImpl.java:187)
	at org.artifactory.common.config.ConfigurationManagerImpl.startSync(ConfigurationManagerImpl.java:149)
	... 16 more
Caused by: java.sql.SQLException: Error reading from InputStream java.lang.IndexOutOfBoundsException
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:872)
	at com.mysql.jdbc.PreparedStatement.readblock(PreparedStatement.java:2712)
	at com.mysql.jdbc.PreparedStatement.streamToBytes(PreparedStatement.java:4514)
	at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2238)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2092)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2049)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2034)
	at org.artifactory.common.config.db.TemporaryDBChannel.executeUpdate(TemporaryDBChannel.java:62)
	at org.artifactory.common.config.db.ConfigsDataAccessObject.setConfig(ConfigsDataAccessObject.java:139)
	... 28 more
Caused by: java.lang.IndexOutOfBoundsException
	at java.io.FileInputStream.readBytes(Native Method)
	at java.io.FileInputStream.read(FileInputStream.java:255)
	at com.mysql.jdbc.PreparedStatement.readblock(PreparedStatement.java:2710)
	... 35 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.