Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Resin

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2010, 06:14 AM
Yttesen Yttesen is offline
Junior Member
 
Join Date: Nov 2010
Posts: 9
Default XSL Transformation

Hi,

I'm evaluating Resin 4.0.12 (we currently use 3.0.26). I have only one issue left on my list to resolve.

We have some web-applications using XML and XSLT for transformation into HTML - this is working fine with Resin 3.0.26.

These settings are used:
javax.xml.parsers.DocumentBuilderFactory: com.caucho.xml.parsers.XmlDocumentBuilderFactory
javax.xml.transform.TransformerFactory: com.caucho.xsl.Xsl

Using Resin 4.0.12 I get this exception upon transformation:
Code:
2010-11-10 06:58:22,746	ERROR 'Transformer exception'
java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.AttrImpl cannot be cast to com.caucho.xml.QAbstractNode
	at com.caucho.xsl.XslWriter.valueOf(XslWriter.java:937)
	at com.caucho.xsl.XslWriter.valueOf(XslWriter.java:944)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl._xsl_macro_t_service_info__25(_access__xsl.java:1727)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl._xsl_macro_t_tbody__21(_access__xsl.java:1656)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl._xsl_macro_t_table__19(_access__xsl.java:1526)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl._xsl_macro_t_body__18(_access__xsl.java:1505)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl._xsl_macro_t_html__16(_access__xsl.java:1405)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl._xsl_macro_t_template__15(_access__xsl.java:1387)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl._xsl_template_data(_access__xsl.java:1373)
	at _xsl._file_23a._d_23a._development._svn_22ddev._kite._gui._web._customercare._plugins._access._access__xsl.applyNode(_access__xsl.java:2869)
	at com.caucho.xsl.StylesheetImpl.transform(StylesheetImpl.java:221)
	at com.caucho.xsl.TransformerImpl.transform(TransformerImpl.java:440)
	at com.caucho.xsl.TransformerImpl.transform(TransformerImpl.java:308)
	at com.digiquant.ims.gui.web.common.external.xmlsf.TransformerUtil.transform(TransformerUtil.java:100)
	at com.digiquant.ims.gui.web.common.external.xmlsf.ServicePluginAdapter.transform(ServicePluginAdapter.java:95)
	at plugins.access.AccessPlugin.transform(AccessPlugin.java:148)
	at com.digiquant.ims.gui.web.common.external.xmlsf.ServicePluginAdapter.show(ServicePluginAdapter.java:105)
	at plugins.access.AccessPlugin.show(AccessPlugin.java:197)
	at com.digiquant.ims.gui.web.xmlsf.XmlRequestHandlerBase.displayService(XmlRequestHandlerBase.java:203)
	at com.digiquant.ims.gui.web.xmlsf.XmlRequestHandlerBase.display(XmlRequestHandlerBase.java:156)
	at com.digiquant.ims.gui.web.xmlsf.XmlRequestHandlerBase.execute(XmlRequestHandlerBase.java:119)
	at com.digiquant.ims.gui.web.xmlsf.XmlPluginActionServlet.doPost(XmlPluginActionServlet.java:161)
	at com.digiquant.ims.gui.web.xmlsf.XmlPluginActionServlet.doGet(XmlPluginActionServlet.java:144)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
	at com.digiquant.ims.gui.web.extension.SessionFilter.doFilter(SessionFilter.java:98)
	at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
	at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183)
	at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
	at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:287)
	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:792)
	at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:675)
	at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:637)
	at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:588)
	at com.caucho.network.listen.TcpSocketLink$AcceptTask.doTask(TcpSocketLink.java:1175)
	at com.caucho.network.listen.TcpSocketLink$ConnectionReadTask.runThread(TcpSocketLink.java:1108)
	at com.caucho.network.listen.TcpSocketLink$AcceptTask.run(TcpSocketLink.java:1142)
	at com.caucho.env.thread.ResinThread.runTasks(ResinThread.java:182)
	at com.caucho.env.thread.ResinThread.run(ResinThread.java:126)
Java version used for both servers are 1.6.

Appreciate any help or suggestions.

Thanks.

Regards
Christian
Reply With Quote
  #2  
Old 11-29-2010, 06:08 AM
Yttesen Yttesen is offline
Junior Member
 
Join Date: Nov 2010
Posts: 9
Default

I was initialializing the 'transformer-factory' and 'document-factory' within a static initializer section.

The class load order has apparently changed between Resin 3.0.26 and 4.x. I simply did a bit of refactoring to ensure that the factories was set prior working on documents and doing transformations.

Issue resolved.
Reply With Quote
Reply

Tags
resin 4.0, xml, xsl, xslt

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:57 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.