Yahoo! - I solved the problem - wasn't easy, but I did it. I'll share my code in case anyone else has the issue. The big item was I had to point to my class path jar file to point to terajdbc4.jar

use strict; use warnings; use Inline Java => <<'END' => CLASSPATH => 'C:/jars/terajdbc4.jar'; import java.sql.Connection; import java.util.*; import java.sql.DriverManager; import java.sql.SQLException; import java.io.PrintWriter; import java.sql.*; public class TeradataConnectionTest { public static void testConnection(String jdbcUrl, String username, Str +ing password) { try { System.out.println("Test up to part 1"); //e.printStackTrace(); //DriverManager.registerDriver(new com.teradata.jdbc.TeraDriver()); //DriverManager.registerDriver(new com.teradata.jdbc.TeraDriver()); Di +d not work Class.forName("com.teradata.jdbc.TeraDriver"); //Did not work // Class.forName("com.ncr.teradata.TeraDriver"); Did not work Connection connectionA = DriverManager.getConnection(jdbcUrl, username +, password); System.out.println("Test up to part 2"); System.out.println("Connected to Teradata!"); // Perform your database operations here connectionA.close(); } catch (SQLException e) { // Print the stack trace or error message e.printStackTrace(); System.err.println("SQLException: " + e.getMessage()); } catch (Exception e) { // Handle other exceptions e.printStackTrace(); } } } END # Your Teradata connection details #COMMENTED OUT ON 2/14/24 my $jdbcUrl = "jdbc:teradata://XXX.XX.XXX.XX +/TMODE=TERA,DBS_PORT=1025,CHARSET=UTF8,LOGMECH=LDAP,SSLMODE=ALLOW"; #Here is my JAVA connection String url = "jdbc:teradata://XXX.XX.XXX. +XX/TMODE=TERA,DBS_PORT=1025,CHARSET=UTF8,LOGMECH=LDAP,SSLMODE=ALLOW"; #commented out on 2/16/24 my $jdbcUrl = "jdbc:teradata://XXX.XX.XXX.XX +/TMODE=TERA,DBS_PORT=1025,CHARSET=UTF8,LOGMECH=LDAP,SSLMODE=ALLOW;Ter +aDriver=com.teradata.jdbc.TeraDriver"; my $jdbcUrl = "jdbc:teradata://XXX.XX.XXX.XX/TMODE=TERA,DBS_PORT=1025, +CHARSET=UTF8,LOGMECH=LDAP,SSLMODE=ALLOW"; #my $jdbcUrl = "jdbc:teradata://XXX.XX.XXX.XX/TMODE=TERA,DBS_PORT=1025 +,CHARSET=UTF8,LOGMECH=LDAP,SSLMODE=ALLOW"; my $username = "XXXXX"; my $password = "XXXXXX"; # Call the Java method to test the connection TeradataConnectionTest->testConnection($jdbcUrl, $username, $password) +;

In reply to Re^2: Inline Java not working by mallett76
in thread Inline Java not working by mallett76

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.