當我上傳圖片併發布頁面時,會顯示一條消息網頁內容暫時不可用。上傳圖片時出現「格式錯誤的字節輸入」
這是日誌中的錯誤:
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