Document and Media + JBoss: Adding a JPG to Documents and Media causes console errors

Description

When using JBoss, adding and then viewing a jpg results in console errors (please see attached stack trace JbossJpg.txt).

Steps to reproduce:
In Control Panel

  1. Click Go to > Control Panel

  2. Click Documents and Media

  3. Click Add > Basic Document

  4. Click Browse

  5. Select a jpg file > Click Open

  6. Click Publish

  7. Errors will display in the console, refreshing the page will result in console errors

In Documents and Media portlet

  1. Add Documents and Media portlet to Welcome page

  2. Click Add > Basic Document

  3. Click Browse

  4. Select a jpg file > Click Open

  5. Click Publish

  6. Errors will display in the console, refreshing the page will result in console errors

Environment

JBoss 7.1 + MySQL 5. Portal 6.1.x CE GIT ID: 80fbe8c2641b38ba3532f0304f4380cb9d9fa936. JBoss 7.1 + MySQL 5. Portal 6.1.x EE GIT ID: df4c3a5e8db4469e2bb6d5c74df6830f00e82d80. JBoss 7.1 + MySQL 5. Portal 6.2.x GIT ID: 80fbe8c2641b38ba3532f0304f4380cb9d9fa936.

Attachments

1
  • 19 Jun 2012, 11:54 AM

Activity

Show:

Brian ChanJune 20, 2012 at 2:34 PM

I updated buidl-dist.xml to automatically make that conversion. Future bundles will have this done already by default.

Jeffrey YangJune 20, 2012 at 11:42 AM

There is no issue viewing jpg files when

<path name="com/sun/image/codec/jpeg"/>

is added to

modules/sun/jdk/main/module.xml

.

As this is a configuration issue and not a Liferay issue, I am closing the ticket.

Unable to reproduce on (when <path name="com/sun/image/codec/jpeg"/> is used):
JBoss 7.1 + MySQL 5. Portal 6.1.x CE GIT ID: 1b36be44c9c15390b89066c056893fe659b7d9d3.
JBoss 7.1 + MySQL 5. Portal 6.1.x EE GIT ID: df4c3a5e8db4469e2bb6d5c74df6830f00e82d80.
JBoss 7.1 + MySQL 5. Portal 6.2.x GIT ID: 80fbe8c2641b38ba3532f0304f4380cb9d9fa936.

Miguel Ángel Pastor OlivarJune 20, 2012 at 5:25 AM

Hey Jeffrey,

This is just a matter of configuration.

Go inside your JBOSS installation folder and take a look to this file:

modules/sun/jdk/main/module.xml

Edit it by adding this line:

<module xmlns="urn:jboss:module:1.1" name="sun.jdk"> <resources> <!-- currently jboss modules has not way of importing services from classes.jar so we duplicate them here --> <resource-root path="service-loader-resources"/> </resources> <dependencies> <system export="true"> <paths> <path name="com/sun/script/javascript"/> <!-- Start Change: This is the new line you need to add --> <path name="com/sun/image/codec/jpeg"/> <!-- End Change: --> <path name="com/sun/jndi/dns"/> <path name="com/sun/jndi/ldap"/> <path name="com/sun/jndi/url"/> <path name="com/sun/jndi/url/dns"/> <path name="com/sun/security/auth"/> <path name="com/sun/security/auth/login"/> <path name="com/sun/security/auth/module"/> <path name="sun/misc"/> <path name="sun/io"/> <path name="sun/nio"/> <path name="sun/nio/ch"/> <path name="sun/security"/> <path name="sun/security/krb5"/> <path name="sun/util"/> <path name="sun/util/calendar"/> <path name="sun/util/locale"/> <path name="sun/security/provider"/> <path name="META-INF/services"/> </paths> <exports> <include-set> <path name="META-INF/services"/> </include-set> </exports> </system> </dependencies> </module>

I am going to reassign the ticket to you in order to retest.

Thx!

Fixed

Details

Assignee

Reporter

Fix Priority

5

Application Servers

JBoss App Server 7.1

Bug Type

Regression Bug

Affects versions

Priority

Zendesk Support

Created June 19, 2012 at 11:12 AM
Updated June 24, 2023 at 3:57 PM
Resolved June 20, 2012 at 2:34 PM