[MAGNOLIA-2470] xslt check in jackrabbit ProviderImpl unfriendly for non sun jdks Created: 09/Nov/08 Updated: 23/Jan/13 Resolved: 09/Nov/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 3.6.3 |
| Fix Version/s: | 4.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Fabrizio Giustina | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Description |
|
As a workaround for the well known xslt problem in tomcat This is the relevant code: if (SystemUtils.isJavaVersionAtLeast(1.5f)
&& "org.apache.xalan.processor.TransformerFactoryImpl".equals(System
.getProperty("javax.xml.transform.TransformerFactory"))) {
log.info("Java 1.5 detected, setting system property \"javax.xml.transform.TransformerFactory\" to "
+ "\"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl\"");
System.setProperty(
"javax.xml.transform.TransformerFactory",
"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
}
Unfortunately, this check may also be triggered when using a non-sun jdk: when using the IBM 5.0 jdk which ships by default with WAS 6.0 this code causes a ClassNotFound exception as soon as the xslt transformer is used since the sun class is obviously not in the classpath. Without any big change to this delicate stuff, I think we should at least add a check that verifies that the com.sun... transformer is available before setting it up. |
| Comments |
| Comment by Fabrizio Giustina [ 09/Nov/08 ] |
|
Committed to trunk, maybe this worth to be merged to trunk for those enterprise customers using Websphere AS? |