java.io.IOException: mark/reset not supported

ZK-Tracker | mjablonski | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Using the following script to upload an mp3-file and getting the content type throws the stacktrace below. Problem doesn't exist in 5.0.10. <zk> <button label="Upload MP3" upload="true"> <attribute name="onUpload"><![CDATA[ org.zkoss.util.media.Media media = event.getMedia(); Messagebox.show(media.getContentType()); ]]></attribute> </button> </zk> SEVERE: >>org.zkoss.lang.SystemException: Unable to read >>java.io.IOException: mark/reset not supported >> at java.io.InputStream.reset(InputStream.java:330) >> at java.io.FilterInputStream.reset(FilterInputStream.java:200) >> at com.sun.media.sound.WaveFileReader.getFMT(WaveFileReader.java:258) >> at com.sun.media.sound.WaveFileReader.getAudioFileFormat(WaveFileReader.java:85) >> at javax.sound.sampled.AudioSystem.getAudioFileFormat(AudioSystem.java:985) >> at org.zkoss.sound.AAudio.getFormat0(AAudio.java:267) >> at org.zkoss.sound.AAudio.getFormat(AAudio.java:227) >> at org.zkoss.sound.AAudio.getContentType(AAudio.java:280) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at bsh.Reflect.invokeMethod(Unknown Source) >> at bsh.Reflect.invokeObjectMethod(Unknown Source) >> at bsh.Name.invokeMethod(Unknown Source) >> at bsh.BSHMethodInvocation.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHArguments.getArguments(Unknown Source) >> at bsh.BSHMethodInvocation.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134) >> at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) >> at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:876) >> at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:180) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1626) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1410) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1134) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:562) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:457) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:465) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at jease.cms.web.servlet.JeaseController.doFilter(JeaseController.java:174) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) >> at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:169) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java) >> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) >> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) >> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) >> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) >> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >> at java.lang.Thread.run(Thread.java:680)

    ZK-Tracker | 5 years ago | mjablonski
    java.io.IOException: mark/reset not supported
  2. 0

    Using the following script to upload an mp3-file and getting the content type throws the stacktrace below. Problem doesn't exist in 5.0.10. <zk> <button label="Upload MP3" upload="true"> <attribute name="onUpload"><![CDATA[ org.zkoss.util.media.Media media = event.getMedia(); Messagebox.show(media.getContentType()); ]]></attribute> </button> </zk> SEVERE: >>org.zkoss.lang.SystemException: Unable to read >>java.io.IOException: mark/reset not supported >> at java.io.InputStream.reset(InputStream.java:330) >> at java.io.FilterInputStream.reset(FilterInputStream.java:200) >> at com.sun.media.sound.WaveFileReader.getFMT(WaveFileReader.java:258) >> at com.sun.media.sound.WaveFileReader.getAudioFileFormat(WaveFileReader.java:85) >> at javax.sound.sampled.AudioSystem.getAudioFileFormat(AudioSystem.java:985) >> at org.zkoss.sound.AAudio.getFormat0(AAudio.java:267) >> at org.zkoss.sound.AAudio.getFormat(AAudio.java:227) >> at org.zkoss.sound.AAudio.getContentType(AAudio.java:280) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at bsh.Reflect.invokeMethod(Unknown Source) >> at bsh.Reflect.invokeObjectMethod(Unknown Source) >> at bsh.Name.invokeMethod(Unknown Source) >> at bsh.BSHMethodInvocation.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHArguments.getArguments(Unknown Source) >> at bsh.BSHMethodInvocation.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134) >> at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) >> at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:876) >> at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:180) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1626) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1410) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1134) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:562) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:457) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:465) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at jease.cms.web.servlet.JeaseController.doFilter(JeaseController.java:174) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) >> at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:169) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java) >> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) >> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) >> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) >> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) >> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >> at java.lang.Thread.run(Thread.java:680)

    ZK-Tracker | 5 years ago | mjablonski
    java.io.IOException: mark/reset not supported
  3. 0

    Failed to passing InputStream object to Java Sound API

    Stack Overflow | 5 years ago | sof
    java.io.IOException: mark/reset not supported
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      mark/reset not supported

      at java.io.InputStream.reset()
    2. Java RT
      AudioSystem.getAudioFileFormat
      1. java.io.InputStream.reset(InputStream.java:330)
      2. java.io.FilterInputStream.reset(FilterInputStream.java:200)
      3. com.sun.media.sound.WaveFileReader.getFMT(WaveFileReader.java:258)
      4. com.sun.media.sound.WaveFileReader.getAudioFileFormat(WaveFileReader.java:85)
      5. javax.sound.sampled.AudioSystem.getAudioFileFormat(AudioSystem.java:985)
      5 frames
    3. The ZKoss Common Library
      AAudio.getContentType
      1. org.zkoss.sound.AAudio.getFormat0(AAudio.java:267)
      2. org.zkoss.sound.AAudio.getFormat(AAudio.java:227)
      3. org.zkoss.sound.AAudio.getContentType(AAudio.java:280)
      3 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. BeanShell
      Interpreter.eval
      1. bsh.Reflect.invokeMethod(Unknown Source)
      2. bsh.Reflect.invokeObjectMethod(Unknown Source)
      3. bsh.Name.invokeMethod(Unknown Source)
      4. bsh.BSHMethodInvocation.eval(Unknown Source)
      5. bsh.BSHPrimaryExpression.eval(Unknown Source)
      6. bsh.BSHPrimaryExpression.eval(Unknown Source)
      7. bsh.BSHArguments.getArguments(Unknown Source)
      8. bsh.BSHMethodInvocation.eval(Unknown Source)
      9. bsh.BSHPrimaryExpression.eval(Unknown Source)
      10. bsh.BSHPrimaryExpression.eval(Unknown Source)
      11. bsh.Interpreter.eval(Unknown Source)
      12. bsh.Interpreter.eval(Unknown Source)
      12 frames
    6. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134)
      2. org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341)
      3. org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:876)
      4. org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:180)
      5. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
      6. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1626)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1410)
      8. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1134)
      9. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:562)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:457)
      11. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:465)
      11 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      2 frames
    8. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    9. jease.cms.web
      JeaseController.doFilter
      1. jease.cms.web.servlet.JeaseController.doFilter(JeaseController.java:174)
      1 frame
    10. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
      4. org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:169)
      5. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
      6. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      7. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      8. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      9. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      10. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      11. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      11 frames
    11. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      3 frames
    12. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      3. java.lang.Thread.run(Thread.java:680)
      3 frames