2 Replies Latest reply on Jan 21, 2015 10:13 AM by yfeng1998

    Infinispan cannot work with XSLT transform?

    yfeng1998

      I have learned how to use distributed task service from example given at Need some example.

       

      However, now I find out that Infinispan has some problem running XSLT transform in a remote server.

       

      To set up example is easy, I added following lines to call() method in a DistributedCallable implementation:

       

          StreamResult result = new StreamResult(new StringWriter());

          TransformerFactory tFactory = TransformerFactory.newInstance();

          Transformer transformer = tFactory.newTransformer(new StreamSource("path to your XSL file"));

       

      I did it in the example given in previous link.

       

      When it executes, local server A runs fine but remote server B throw exception:

       

      16:42:48,392 ERROR [org.infinispan.remoting.InboundInvocationHandlerImpl] (remo

      e-thread-0) ISPN000260: Exception executing command: javax.xml.transform.Transf

      rmerConfigurationException: Translet class loaded, but unable to create transle

      instance.                                                                    

              at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.defineTra

      sletClasses(TemplatesImpl.java:369) [rt.jar:1.8.0_25]                         

       

      If server B runs first, then it runs fine but server A throws the same exception.

       

      I am testing this with WildFly 8.2. But it appears to be an issue with running XSLT transformation in a remote Infinispan server.

       

      Thanks for any help!

        • 1. Re: Infinispan cannot work with XSLT transform?
          rvansa

          Hi, Infinispan does not have anything to do with XSLT transformations. This is probably a class-loading issue, but publishing whole stack trace would provide more useful information.

          • 2. Re: Infinispan cannot work with XSLT transform?
            yfeng1998

            Hi, thanks for reply. It makes some sense since a similar error was reported at WildFly, the difference is that I only got the error when running from Infinispan. Here's the complete stack trace from the new StreamSource() line in above code:

             

            09:09:43,318 ERROR [org.infinispan.remoting.InboundInvocationHandlerImpl] (remote-thread-0) ISPN000260: Exception executing command: javax.xml.transform.TransformerConfigurationException: Translet class loaded, but unable to create translet instance.

                    at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.defineTransletClasses(TemplatesImpl.java:369) [rt.jar:1.8.0_25]

                    at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.getTransletInstance(TemplatesImpl.java:383) [rt.jar:1.8.0_25]

                    at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.newTransformer(TemplatesImpl.java:418) [rt.jar:1.8.0_25]

                    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:767) [rt.jar:1.8.0_25]

                    at __redirected.__TransformerFactory.newTransformer(__TransformerFactory.java:132) [jboss-modules.jar:1.3.3.Final]

                    [at the new StreamSource() line shown above]

             

            Any suggestion for workaround would be appreciated, thanks!

             

            PS. WildFly 8.2 is running Infinispan 6.0.2 version.