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)