I have configured jackrabbit 2.16.2 with mysql 8. when i try to upload a file more than 1 mb it fails. i am able to upload less than 1 mb files.
sample code used to upload.
Sardine webdavClient = SardineFactory.begin(new String("****"), new String("****"));
System.out.println("file name :: "+file.getName().replaceAll(" ", "_"));
byte[] content = Files.readAllBytes(file.toPath());
webdavClient.put(dirPath+"/"+file.getName().replaceAll(" ", "_"), content);
please find the repository.xml content below :
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://127.0.0.1:3306/jackrabbit"/>
<param name="user" value=""/>
<param name="password" value=""/>
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="fs_test_store"/>
</FileSystem>
<!--
data store configuration
-->
<DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
<param name="url" value="jdbc:mysql://127.0.0.1:3306/jackrabbit"/>
<param name="user" value=""/>
<param name="password" value=""/>
<param name="databaseType" value="mysql"/>
<param name="driver" value="com.mysql.cj.jdbc.Driver"/>
<param name="minRecordLength" value="2048"/>
<param name="maxConnections" value="10"/>
<param name="copyWhenReading" value="false"/>
<param name="tablePrefix" value=""/>
<param name="schemaObjectPrefix" value="test_"/>
</DataStore>
please find workspace configuration below
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://127.0.0.1:3306/jackrabbit"/>
<param name="user" value=""/>
<param name="password" value=""/>
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="fs_test_ws_"/>
</FileSystem>
<PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
<param name="driver" value="com.mysql.cj.jdbc.Driver" />
<param name="url" value="jdbc:mysql://127.0.0.1:3306/jackrabbit"/>
<param name="user" value="" />
<param name="password" value="" />
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="pm_ws_${wsp.name}_"/>
</PersistenceManager>
I have changed mysql paramter
max_allowed_packet=100M
i am receiving the below exception
2019-02-18 16:11:01 [main] DEBUG:: http-outgoing-3 >> "[write] I/O error: Software caused connection abort: socket write error"
2019-02-18 16:11:01 [main] DEBUG:: http-outgoing-3: Close connection
2019-02-18 16:11:01 [main] DEBUG:: http-outgoing-3: Shutdown connection
2019-02-18 16:11:01 [main] DEBUG:: Connection discarded
2019-02-18 16:11:01 [main] DEBUG:: Connection released: [id: 3][route: {}->http://localhost:8080][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
2019-02-18 16:11:01 [main] DEBUG:: Cancelling request execution
Exception in thread "main" java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at org.apache.http.impl.conn.LoggingOutputStream.write(LoggingOutputStream.java:74)
at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124)
at org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:160)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:113)
at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:114)
at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156)
at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:160)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:1043)
at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:1012)
at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:923)
at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:906)
at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:894)
at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:828)
at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:821)
at com.x.platform.core.webdav.test.Test.main(Test.java:46)
Note: Jackrabbit is deployed on tomcat.