com.microsoft.sqlserver.jdbc.SQLServerException

The stream value is not the specified length. The specified length was 322, the actual length is 0.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web67

  • via Unknown by Dror Bereznitsky,
  • via Unknown by Dror Bereznitsky,
  • Stack trace

    • com.microsoft.sqlserver.jdbc.SQLServerException: The stream value is not the specified length. The specified length was 322, the actual length is 0. at com.microsoft.sqlserver.jdbc.TDSWriter.error(IOBuffer.java:3426)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.TDSWriter.writeStream(IOBuffer.java:3348)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.TDSWriter.writeRPCInputStream(IOBuffer.java:4514)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.DTV$SendByRPCOp.execute(dtv.java:863)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.DTV.executeOp(dtv.java:1074)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.DTV.sendByRPC(dtv.java:1116)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.Parameter.sendByRPC(Parameter.java:660)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.sendParamsByRPC(SQLServerPreparedStatement.java:473)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doPrepExec(SQLServerPreparedStatement.java:628)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:400)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)[sqljdbc4.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:332)[sqljdbc4.jar:na] at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)[commons-dbcp-1.4.jar:1.4] at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)[commons-dbcp-1.4.jar:1.4] at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)[commons-dbcp-1.4.jar:1.4] at org.apache.jackrabbit.core.util.db.ConnectionHelper.execute(ConnectionHelper.java:469)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyExec(ConnectionHelper.java:293)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.util.db.ConnectionHelper$1.call(ConnectionHelper.java:270)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.util.db.ConnectionHelper$1.call(ConnectionHelper.java:266)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:507)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.util.db.ConnectionHelper.exec(ConnectionHelper.java:266)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.artifactory.jcr.jackrabbit.ArtifactoryDataStore.insertRecordInDb(ArtifactoryDataStore.java:293)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.jackrabbit.ArtifactoryDataStore.addRecord(ArtifactoryDataStore.java:247)[artifactory-jcr-storage-2.6.6.jar:na] at org.apache.jackrabbit.core.value.BLOBInDataStore.getInstance(BLOBInDataStore.java:124)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:619)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:369)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.value.InternalValueFactory.create(InternalValueFactory.java:94)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.value.ValueFactoryImpl.createBinary(ValueFactoryImpl.java:74)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.artifactory.jcr.JcrServiceImpl.setStream(JcrServiceImpl.java:764)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.JcrServiceImpl.setString(JcrServiceImpl.java:710)[artifactory-jcr-storage-2.6.6.jar:na] at sun.reflect.GeneratedMethodAccessor234.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_21] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_21] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE] at $Proxy32.setString(Unknown Source)[na:na] at org.artifactory.jcr.md.AbstractXmlContentPersistenceHandler.setXml(AbstractXmlContentPersistenceHandler.java:83)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.md.AbstractXmlContentPersistenceHandler.update(AbstractXmlContentPersistenceHandler.java:164)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.fs.JcrFsItem.setXmlMetadata(JcrFsItem.java:1180)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.fs.JcrFsItem.saveDirtyState(JcrFsItem.java:142)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.fs.JcrFolder.save(JcrFolder.java:214)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.lock.SessionLockEntry.save(SessionLockEntry.java:136)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.lock.InternalLockManager.save(InternalLockManager.java:142)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.lock.SessionLockManager.onSessionSave(SessionLockManager.java:48)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.tx.SessionResourceManagerImpl.onSessionSave(SessionResourceManagerImpl.java:60)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.JcrSession.save(JcrSession.java:217)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.jcr.JcrTransactionManager.beforeCommit(JcrTransactionManager.java:136)[artifactory-jcr-storage-2.6.6.jar:na] at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:924)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.artifactory.jcr.lock.aop.LockingAdvice.invoke(LockingAdvice.java:121)[artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:198)[artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.CompoundInvocation.proceed(CompoundInvocation.java:56)[artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:184)[artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice$1.call(AsyncAdvice.java:145)[artifactory-core-2.6.6.jar:na] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[na:1.6.0_21] at java.util.concurrent.FutureTask.run(FutureTask.java:138)[na:1.6.0_21] at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:91)[artifactory-jcr-storage-2.6.6.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[na:1.6.0_21] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[na:1.6.0_21] at java.lang.Thread.run(Thread.java:619)[na:1.6.0_21]

    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

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Andreas HäberAndreas Häber
    Once,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    9 more bugmates