Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

I have a simple JSP View with audio element:

<audio controls> 
    <source src="message.mp3" type="audio/mpeg">
</audio>

message.mp3 is about 5 mb and I'm using Spring MVC and tomcat.

unfortunately i'm getting this error if i try to open the view:

ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:351) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:384) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:373) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:93) at org.springframework.util.StreamUtils.copy(StreamUtils.java:124)

I have no problems with small *.wav files (2,5 mb).

Any help?

EDIT:

All files are accessible and i can download them. It just wont work with html5-audio element. File access is provided by Spring framework i have just defined the Resourcehandler:

@Configuration
@EnableWebMvc
@EnableTransactionManagement
@ComponentScan(basePackages = "test.my.app.*")
public class AppConfiguration extends WebMvcConfigurerAdapter {

    //...    

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String loc = "file:/home/dit/files";
        registry.addResourceHandler("/resources/audiofiles/**").addResourceLocations(loc);
    }
    //...
}
share|improve this question
    
dit, it is a little bit complicated to reply you so few information; it seems a problem on stucked thread or file limit...please provide the back-end servlet or adapter ... check the file limit ...check also that the file is accessible by the framework –  venergiac Dec 25 '14 at 19:08
    
@venergiac thx for reply i have edited my question –  dit Dec 25 '14 at 19:17
    
if file is of larger size then might be you are getting error. –  Prashant Dec 25 '14 at 19:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.