Error "Impossible to load the translet class"; XSLTC

Discussion in 'Java' started by Richard, Nov 20, 2005.

  1. Richard

    Richard Guest

    Hello,

    Do you have any idea of my problem? The undermentioned program does not
    work with Java 1.5.0_05 but worked with Java 1.4. The problem is related
    to XSLTC but perhaps my environment is the problem? (my system is
    Windows XP).

    Thanks in advance for your help.

    Richard

    import java.io.File;
    import java.net.URL;

    import javax.xml.transform.Templates;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;

    public class Main {

    public static void main(String[] args) throws Exception {
    TransformerFactory tfactory = TransformerFactory.newInstance();
    URL urlXSL = Main.class.getResource("zoo.xsl");
    URL urlXML = Main.class.getResource("zoo.xml");
    File fichierXSL = new File(urlXSL.toURI());
    File fichierXML = new File(urlXML.toURI());

    Templates templates =
    tfactory.newTemplates(new StreamSource(fichierXSL));
    Transformer transformer = templates.newTransformer();
    // The following lines have no importance because
    // the problem is at the previous line.
    }
    }

    Error Message:
    Exception in thread "main"
    javax.xml.transform.TransformerConfigurationException:
    Chargement impossible de la classe translet 'zoo'.
    (Translation in english: Impossible to load the translet class 'zoo')
    at
    com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.defineTransletClasses(Unknown
    Source)
    at
    com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.getTransletInstance(Unknown
    Source)
    at
    com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.newTransformer(Unknown
    Source)
    at Main.main(Main.java:21)
     
    Richard, Nov 20, 2005
    #1
    1. Advertising

  2. Richard

    Roedy Green Guest

    On Sun, 20 Nov 2005 21:03:11 +0100, Richard <> wrote,
    quoted or indirectly quoted someone who said :

    >
    >Do you have any idea of my problem? The undermentioned program does not
    >work with Java 1.5.0_05 but worked with Java 1.4.


    Unistall all Java, prune files, prune the registry.
    http://mindprod.com/jgloss/registry.html

    check your SET environment.

    Install Java 1.5

    You may have some crossover between the two JDKs.

    see http://mindprod.com/jgloss/jre.html#TEST
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Nov 20, 2005
    #2
    1. Advertising

  3. Richard

    Richard Guest

    Thanks Roedy for your answer but I need to keep my old version of Java 1.4.

    I have launched the java application with the -verbose option and I have
    seen that all the classes come from java 1.5.0_05.

    Do you know someone who had the same problem as me?

    Richard

    Roedy Green a écrit :
    > On Sun, 20 Nov 2005 21:03:11 +0100, Richard <> wrote,
    > quoted or indirectly quoted someone who said :
    >
    >
    >>Do you have any idea of my problem? The undermentioned program does not
    >>work with Java 1.5.0_05 but worked with Java 1.4.

    >
    >
    > Unistall all Java, prune files, prune the registry.
    > http://mindprod.com/jgloss/registry.html
    >
    > check your SET environment.
    >
    > Install Java 1.5
    >
    > You may have some crossover between the two JDKs.
    >
    > see http://mindprod.com/jgloss/jre.html#TEST
     
    Richard, Nov 21, 2005
    #3
  4. Richard

    Richard Guest

    Solution for: Error "Impossible to load the translet class"; XSLTC

    For developers who will have the same problem as me:

    I have just discovered the reason of my problem: XSLTC does not like the
    big stylesheets!

    So, I will have to choose another library to transform my XML files.

    I don't understand why Sun has chosen such a library, even if it
    provides a quick transformer. My stylesheet is not so big (10 Ko).

    Richard

    Richard a écrit :
    > Thanks Roedy for your answer but I need to keep my old version of Java 1.4.
    >
    > I have launched the java application with the -verbose option and I have
    > seen that all the classes come from java 1.5.0_05.
    >
    > Do you know someone who had the same problem as me?
    >
    > Richard
    >
    > Roedy Green a écrit :
    >
    >> On Sun, 20 Nov 2005 21:03:11 +0100, Richard <> wrote,
    >> quoted or indirectly quoted someone who said :
    >>
    >>
    >>> Do you have any idea of my problem? The undermentioned program does
    >>> not work with Java 1.5.0_05 but worked with Java 1.4.

    >>
    >>
    >>
    >> Unistall all Java, prune files, prune the registry.
    >> http://mindprod.com/jgloss/registry.html
    >>
    >> check your SET environment.
    >>
    >> Install Java 1.5
    >> You may have some crossover between the two JDKs.
    >>
    >> see http://mindprod.com/jgloss/jre.html#TEST
     
    Richard, Nov 22, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. awebguynow

    XSLTC, when to expect XSLT 2.0 ?

    awebguynow, Dec 29, 2005, in forum: Java
    Replies:
    0
    Views:
    494
    awebguynow
    Dec 29, 2005
  2. Justine Hlista

    Basic XSLT/XSLTC question

    Justine Hlista, Mar 3, 2004, in forum: XML
    Replies:
    3
    Views:
    572
    Dimitre Novatchev [MVP XML]
    Mar 4, 2004
  3. Meikel
    Replies:
    0
    Views:
    506
    Meikel
    Jan 17, 2005
  4. Elhanan
    Replies:
    1
    Views:
    388
    Elhanan
    May 11, 2006
  5. Andrea Desole
    Replies:
    2
    Views:
    1,223
    Andrea Desole
    Aug 9, 2006
Loading...

Share This Page