当我上传图片并发布页面时,会显示一条消息网页内容暂时不可用。上传图片时出现“格式错误的字节输入”
这是日志中的错误:
21:28:57,687 ERROR [http-bio-2020-exec-6][render_portlet_jsp:132] null
java.io.UTFDataFormatException: malformed input around byte 714
at com.liferay.portal.image.ImageToolImpl.read(ImageToolImpl.java:446)
at com.liferay.portal.image.ImageToolImpl.getImage(ImageToolImpl.java:368)
at com.liferay.portal.kernel.image.ImageToolUtil.getImage(ImageToolUtil.java:144)
at com.liferay.portal.service.impl.ImageLocalServiceImpl.updateImage(ImageLocalServiceImpl.java:144)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
21:30:20,989 WARN [http-bio-2020-exec-3][code_jsp:?] {code="404", msg="/ONA-theme/images/common/edit_white.png", uri=/ONA-theme/images/common/edit_white.png}
21:30:20,990 WARN [http-bio-2020-exec-10][code_jsp:?] {code="404", msg="/ONA-theme/images/common/edit_template_white.png", uri=/ONA-theme/images/common/edit_template_white.png}
21:30:20,997 WARN [http-bio-2020-exec-3][code_jsp:?] {code="404", msg="/ONA-theme/images/common/add_white.png", uri=/ONA-theme/images/common/add_white.png}
21:30:20,998 WARN [http-bio-2020-exec-10][code_jsp:?] {code="404", msg="/ONA-theme/images/common/configuration_white.png", uri=/ONA-theme/images/common/configuration_white.png}
我怎样才能成功上传图片?
你上传了什么样的图片?你正在使用哪个版本的Liferay?他抱怨图像的格式,所以你应该先尝试一个不同的图像。 –
另外,在你的主题中有很多图片的404错误,这让我想知道你的主题没有更深的问题。请提供一些关于您的配置,主题和构建方式的更多信息。另外:什么时候发生这种异常? –
先生,每当我使用PNG文件,然后它不工作,并给这个错误,但是当我上传JPG图像,然后它的工作正常,...你能告诉我背后的原因。 – 007