Announcement Announcement Module
No announcement yet.
XSLT View Problems Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • XSLT View Problems

    I am working to understand using XSLT as my viewing technology. Using the code snippets from "Section 14.5 - XSLT" (pg 183 v1.2.6), I have implemented the web application but cannot get past the following problem:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'home' defined in null: Initialization of bean failed; nested exception is org.springframework.context.ApplicationContextExce ption: Can't load stylesheet from ServletContext resource [/WEB-INF/xsl/home.xslt] in XSLT view 'home'; nested exception is javax.xml.transform.TransformerConfigurationExcept ion: Could not compile stylesheet AutowireCapableBeanFactory.createBean(AbstractAuto BeanFactory.getBean( BeanFactory.getBean( istableBeanFactory.preInstantiateSingletons(Defaul ationContext.refresh(AbstractApplicationContext.ja va:320)
    org.springframework.web.servlet.view.ResourceBundl eViewResolver.initFactory(ResourceBundleViewResolv
    org.springframework.web.servlet.view.ResourceBundl eViewResolver.loadView(ResourceBundleViewResolver. java:148)
    org.springframework.web.servlet.view.AbstractCachi ngViewResolver.createView(AbstractCachingViewResol
    org.springframework.web.servlet.view.AbstractCachi ngViewResolver.resolveViewName(AbstractCachingView
    org.springframework.web.servlet.DispatcherServlet. resolveViewName(
    org.springframework.web.servlet.DispatcherServlet. render(
    org.springframework.web.servlet.DispatcherServlet. doDispatch(
    org.springframework.web.servlet.DispatcherServlet. doService(
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(
    org.springframework.web.servlet.FrameworkServlet.d oGet(
    javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

    The error suggests the obvious problem is with the home.xslt file. Now, I am not an XSLT expert but others who know XSLT have examined this file and see nothing obviously wrong. Here is the file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="">
    <xsl:output method="text/html" omit-xml-declaration="yes">

    <xsl:template match="/">
    <h1>My First Words</h1>
    <xsl:for-each select="wordList/word">
    <xsl:value-of select="."/><br />

    I am using the following:
    -Tomcat 5.5.9
    -Spring 1.2.6
    -J2SE 5.0 Update 6

    If someone has a working version of the XSLT View code from Section 14.5 I'd love to see it and attempt to make it work in my environment.

    A quick search of the web seems to hint that in general others are having issues with TransformerConfigurationException when migrating from JDK 1.4.x to JDK 5.

    Thanks in advance,
    Matt Lumsden