Document and Media + JBoss: Adding a JPG to Documents and Media causes console errors
Description
Environment
Attachments
- 19 Jun 2012, 11:54 AM
duplicates
relates
Activity

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!
Details
Assignee
Jeffrey YangJeffrey Yang(Deactivated)Reporter
Jeffrey YangJeffrey Yang(Deactivated)Fix Priority
5Application Servers
JBoss App Server 7.1Bug Type
Regression BugAffects versions
Priority
Medium
Details
Details
Assignee

Reporter

Fix Priority
Application Servers
Bug Type
Affects versions
Priority
Zendesk Support
Linked Tickets
Zendesk Support
Linked Tickets
Zendesk Support

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
Click Go to > Control Panel
Click Documents and Media
Click Add > Basic Document
Click Browse
Select a jpg file > Click Open
Click Publish
Errors will display in the console, refreshing the page will result in console errors
In Documents and Media portlet
Add Documents and Media portlet to Welcome page
Click Add > Basic Document
Click Browse
Select a jpg file > Click Open
Click Publish
Errors will display in the console, refreshing the page will result in console errors