Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: class file has wrong version ?????

  1. #1
    Join Date
    Aug 2008
    Posts
    15

    Default class file has wrong version ?????

    I have a simple Java Class that has below method which is basically to call the job or transformation,

    Code:
     
    public static void runTransformation(String filename) {
          try {
            StepLoader.init(); 
            EnvUtil.environmentInit();
            TransMeta transMeta = new TransMeta(filename);
            Trans trans = new Trans(transMeta);
     
            trans.execute(null); // You can pass arguments instead of null.
            trans.waitUntilFinished();  
            if ( trans.getErrors() > 0 )
            {
              throw new RuntimeException( "There were errors during transformation execution." );
            }
          }
          catch ( KettleException e ) {
            // TODO Put your exception-handling code here.
            System.out.println(e);
          }
        }
    When I compiled, I will get "initialization error: class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0 on classpath".

    I tried with jdk1.4.x, 1.5.x and even 1.6.x also... is there something that I am missing???

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    "Psychic mode" on ... you're using a too old version of JDeveloper ... "psychic mode" off.

    What's the full stack trace?

    Regards,
    Sven

  3. #3
    Join Date
    Aug 2008
    Posts
    15

    Default

    Your Psychic is correct...I am using JDeveloper 10.1.2, but I am not sure it is too old..
    For PDI integration I should be using JDK1.5.x or higher right?? not 1.4.x
    <html>
    Error: initialization error: class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0 on classpath C:\Program Files\Java\jdk1.6.0_07\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\charsets.jar;
    and rest of the JAR files which are under project classpath.
    </html>

    I have selected JDK1.6 version with my workspace in JDeveloper as my "J2SE" version.

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    At least JDK 1.5 for PDI... and yes your JDeveloper is too old. Go to the Oracle site and download a newer version... after that the error will disappear.

    Your error is not PDI related.

    Regards,
    Sven

  5. #5
    Join Date
    Aug 2008
    Posts
    15

    Default

    Thank you for that... is there any other IDE (open source) that you recommend for the best use of PDI??
    Assuming Eclipse or Netbeans??

  6. #6
    Join Date
    May 2006
    Posts
    4,882

    Default

    Eclipse

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.