[ https://issues.apache.org/jira/browse/TOBAGO-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13753568#comment-13753568 ]
Hudson commented on TOBAGO-1295: -------------------------------- SUCCESS: Integrated in tobago-trunk #1088 (See [https://builds.apache.org/job/tobago-trunk/1088/]) TOBAGO-1302: Add support for a theme resources index file per theme TOBAGO-1295: Loading themes on JBoss 7.x.x with vfs protocol (lofwyr: http://svn.apache.org/viewvc/?view=rev&rev=1518622) * /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceLocator.java > Loading themes on JBoss 7.x.x with vfs protocol > ----------------------------------------------- > > Key: TOBAGO-1295 > URL: https://issues.apache.org/jira/browse/TOBAGO-1295 > Project: MyFaces Tobago > Issue Type: Bug > Components: Core > Affects Versions: 2.0.0-alpha-2 > Environment: Jboss 7.1.1, Jboss 7.2.0 > Reporter: Thomas Schmitz > Assignee: Udo Schnurpfeil > > JBoss seemingly has changed its VFS scheme name from vfszip to vfs in version > 7.x.x. Therefore it is not possible to deploy a tobago application on it as > tobago does not know how to handle it. > I tried to fix it in ResourceLocator by simply changing the part where the > old vfszip protocol is handled from 'protocol.equals("vfszip")' to > 'protocol.startsWith("vfs"). > But it seems that vfszip and vfs must be handled in different ways as the > part where the jar or zip file is loaded with the ZipInputStream does not > work: > zipStream = new ZipInputStream(stream); > while (zipStream.available() > 0) { > ZipEntry nextEntry = zipStream.getNextEntry(); > if (nextEntry == null || nextEntry.isDirectory()) { > continue; > } > String name = "/" + nextEntry.getName(); > if (name.startsWith(prefix)) { > addResource(resources, name, skipPrefix); > } > } > In fact it produces an infinite loop because zipStream.available always > returns >0 but zipStream.getNextEntry is always null. > I found out that if I disclaim on the theme-jars and unzip them next to my > WEB-INF directory they will be loaded correct. So my workaround is to comment > out the part with the infinite loop. > I am sad that I can't propose a good patch for this. The only way I found out > is to use jboss-vfs API to handle the vfs scheme correct. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira