shikaixuan1987 / swagswap

Automatically exported from code.google.com/p/swagswap
0 stars 0 forks source link

error uploading #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. added picture by browsing
2. hit save and got error page
3.

What is the expected output? What do you see instead?

upload expected, got this error page:

Error
Please report this issue (requires a google account)

** Root cause is: net.sf.jmimemagic.MagicMatchNotFoundException 
com.swagswap.exceptions.InvalidSwagImageException: 
net.sf.jmimemagic.MagicMatchNotFoundException at 
com.swagswap.service.ItemServiceImpl.checkImageMimeType
(ItemServiceImpl.java:380) at 
com.swagswap.service.ItemServiceImpl.populateSwagImage
(ItemServiceImpl.java:317) at com.swagswap.service.ItemServiceImpl.save
(ItemServiceImpl.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown 
Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Method.java:40) at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
(AopUtils.java:307) at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoin
t(ReflectiveMethodInvocation.java:183) at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
(ReflectiveMethodInvocation.java:150) at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke
(TransactionInterceptor.java:107) at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
(ReflectiveMethodInvocation.java:172) at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke
(JdkDynamicAopProxy.java:202) at $Proxy8.save(Unknown Source) at 
com.swagswap.web.jsf.bean.ActionBean.actionSaveItem(ActionBean.java:77) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at 
java.lang.reflect.Method.invoke(Method.java:40) at 
com.sun.el.parser.AstValue.invoke(AstValue.java:187) at 
com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) at 
com.sun.faces.facelets.el.TagMethodExpression.invoke
(TagMethodExpression.java:98) at 
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke
(MethodBindingMethodExpressionAdapter.java:88) at 
com.sun.faces.application.ActionListenerImpl.processAction
(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast
(UICommand.java:315) at javax.faces.component.UIViewRoot.broadcastEvents
(UIViewRoot.java:774) at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1266) 
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute
(InvokeApplicationPhase.java:82) at com.sun.faces.lifecycle.Phase.doPhase
(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.execute
(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service
(FacesServlet.java:310) at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:487) at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093) at 
com.swagswap.web.jsf.servlet.SwagServletFilter.doFilter
(SwagServletFilter.java:87) at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084) at 
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
(SaveSessionFilter.java:35) at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084) at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43) at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084) at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) 
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216) at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) 
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle
(WebAppContext.java:405) at 
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:238) at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) 
at org.mortbay.jetty.Server.handle(Server.java:313) at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:830) at 
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle
(HttpConnection.java:381) at 
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques
t(JettyServletEngineAdapter.java:139) at 
com.google.apphosting.runtime.JavaRuntime.handleRequest
(JavaRuntime.java:239) at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequ
est(RuntimePb.java:5135) at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequ
est(RuntimePb.java:5133) at 
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
(BlockingApplicationHandler.java:24) at 
com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at 
com.google.net.rpc.impl.Server$2.run(Server.java:814) at 
com.google.tracing.LocalTraceSpanRunnable.run
(LocalTraceSpanRunnable.java:56) at 
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc
(Server.java:769) at com.google.net.rpc.impl.Server.processRequest
(Server.java:351) at 
com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:437) at 
com.google.net.rpc.impl.RpcConnection.parseMessages
(RpcConnection.java:319) at 
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) 
at com.google.net.async.Connection.handleReadEvent(Connection.java:436) at 
com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:762) at 
com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:207) at com.google.net.async.EventDispatcher.loop
(EventDispatcher.java:101) at 
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251) 
at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
(JavaRuntime.java:396) at java.lang.Thread.run(Unknown Source) Caused by: 
net.sf.jmimemagic.MagicMatchNotFoundException at 
net.sf.jmimemagic.Magic.getMagicMatch(Magic.java:222) at 
net.sf.jmimemagic.Magic.getMagicMatch(Magic.java:170) at 
com.swagswap.service.ItemServiceImpl.checkImageMimeType
(ItemServiceImpl.java:375) ... 71 more 

What version of the product are you using? On what operating system?

JSF XP

Please provide any additional information below.

Original issue reported on code.google.com by miriambr...@gmail.com on 12 Nov 2009 at 5:59

GoogleCodeExporter commented 9 years ago
need error handling in JSF for invalid image types

Original comment by SamBrod...@gmail.com on 12 Nov 2009 at 8:41

GoogleCodeExporter commented 9 years ago

Original comment by SamBrod...@gmail.com on 12 Nov 2009 at 10:38

GoogleCodeExporter commented 9 years ago
Already fixed at next release.  An error message will be displayed on screen 
stating
that the MIME type is invalid.

Original comment by stevenso...@gmail.com on 13 Nov 2009 at 4:36