Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Missing SystemRoot environment variable in Shell job entry

  1. #1
    Join Date
    Mar 2007
    Posts
    14

    Default Missing SystemRoot environment variable in Shell job entry

    I have a shell job entry to invoke an Java application through DOS batch file. The Java application runs fine if you invoke it through DOS command line directly but gives a "java.net.SocketException: Unrecognized Windows Sockets error: 10106: create" error in JDBC connection when invoked inside the shell job entry in Kettle.

    By googling I got answer that it is because of missing environment variable SystemRoot and once I add "SET SystemRoot=C:\windows" in my batch file everything works fine in Kettle.

    So it seems when Kettle invoke the batch file, somehow the SystemRoot environment variable gets lost. I am not sure if only this variable is lost or all windows environment variables are lost, but apparently this causes the JDBC connection to throw exception.

    Is it a bug? It there a way around it? I don't want to hard-code system root in my batch file though.

    Thanks,

    Tao

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

    Default

    I just fixed that in 3.0... but it needs JDK 1.5 support, so can't be ported to 2.5
    3.0 is still work in progress, so not readily usable.

    Regards,
    Sven

  3. #3
    Join Date
    Mar 2007
    Posts
    14

    Default

    Quote Originally Posted by sboden View Post
    I just fixed that in 3.0... but it needs JDK 1.5 support, so can't be ported to 2.5
    3.0 is still work in progress, so not readily usable.

    Regards,
    Sven
    Thanks for the quick reply. I guess I have to put the system root in my batch file for now.

    Thanks,

    Tao

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

    Default

    Sun is mostly to blame ... they changed their minds on executing subprocesses from JDK 1.4 to 1.5 ... from v3.0 it should work stable, you should be even able to use the "internal" variables in scripts.

    Regards,
    Sven

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.