Using the command...

>export
CLASSPATH=/usr/ibm/unishared/jdbc/lib/unijdbc.jar;/usr/ibm/unishared/uoj
sdk/lib/asjava.zip:$CLASSPATH

--Bill

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ben Souther
Sent: Monday, March 22, 2010 12:52 PM
To: U2 Users List
Subject: Re: [U2] Using JDBC - Source Code

This doesn't sound like a U2 issue.

Both Eclipse and Netbeans have mechanisms for adding jar files to a
project.  With netbeans you have to 'mount' the jar file.

How are you setting up the environment (in particular, the CLASSPATH
environment variable) in your HP-UX system?











On Mon, 2010-03-22 at 11:19 -0400, Brutzman, Bill wrote:
> JDBC problem... Java program cannot seem to find driver
> 
>  
> 
>   Class.forName("com.ibm.u2.jdbc.UniJDBCDriver");
> 
>  
> 
>  Business Impact:
> 
>  Slowing release of a new application.
> 
>  
> 
>  Error Message: JDBC problem... In a java program, based on the 
> jdbcsample.
>  
> 
>     Class.forName("com.ibm.u2.jdbc.UniJDBCDriver");
> 
>  
> 
>     comes back with "ClassNotFoundException" in both NetBeans and 
> Eclipse
>  
> 
>  Vista ClassPath [in Environment Variables]
> 
>  
> 
>  .;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;
> c:\Rocket\Java\asjava.zip
>  
> 
> I first used the unijdbc.jar that got installed with UniDK etc.  I 
> then co
>  
> 
> 
> *---------------------------------------------------------------------
> --
> --
>  
> 
>  package uni_0318_104;
> 
>  
> 
>  import java.sql.*;
> 
>  import java.io.*;
> 
>  
> 
>  public class Main {
> 
>  
> 
>      public static void main(String[] args) {
> 
>          try {
> 
>              String MyHost = "192.168.0.102";
> 
>              String MyAccount = "SHIPPING";
> 
>              String userid    = "ups";
> 
>              String passWord  = "bvv";
> 
>  
> 
>              String url = "jdbc:ibm-u2.//" + MyHost + MyAccount ;
> 
>              Class.forName("com.ibm.u2.jdbc.UniJDBCDriver");
> 
>  
> 
>              Connection con = DriverManager.getConnection(url, userid,

> pass
>  
> 
>              Statement stmt = con.createStatement();
> 
>              String sql = "SELECT @ID from PACKSLIPS.X";
> 
>              ResultSet rs = stmt.executeQuery(sql);
> 
>          }
> 
>          catch (SQLException e ) {
> 
>              System.out.println("Message");
> 
>          }
> 
>      }
> 
>  
> 
>  }
> 
>  
> 
>  UNIVERSE 10.1
> 
>  HP-Ux 11i v2
> 
> 
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> 
--
Ben Souther
Manager, Web and Web Service Development bsout...@fwdco.com |
508.927.8147 FWDavison & Company, Inc.
10 Cordage Park Circle, Suite 200
Plymouth, MA 02360-7318

CONFIDENTIALITY NOTICE:  This e-mail message, and any accompanying
documents, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure, distribution or copying is prohibited. If you
are not the intended recipient, please contact our office by e-mail or
by telephone at (508) 747-7261 and immediately destroy all copies of the
original message.

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to