I am seeing the error in the NetBeans IDE.  It is curious that when I
take away the double-quotes from "com.ibm.u2.jdbc.UniDriver" in the
Class.forName line   ... the code hints find all and pop-up each of the
discrete text elements of... com... ibm... u2... jdbc...
UniJDBCDriver... class... but then it comes back with "cannot find
symbol"/

In NetBeans, I have both unijdbc.jar and asjava.zip listed in the
"Libraries" folder;  where all of the detailed sub-contents show up ok.

--Bill 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ben Souther
Sent: Monday, March 22, 2010 3:26 PM
To: [email protected]
Subject: Re: [U2] JDBC - ClassPath

Sorry for replying to you directly, I meant to reply to the list.


Where are you seeing the CNF exception, in your development environment
or in production?

I know for instance, that a lot of application servers, like Tomcat,
don't use the CLASSPATH system environment variable.  They require you
to place the jar files in specific directories.









On Mon, 2010-03-22 at 14:31 -0400, Brutzman, Bill wrote:
> Using the command...
> 
> >export
> CLASSPATH=/usr/ibm/unishared/jdbc/lib/unijdbc.jar;/usr/ibm/unishared/u
> oj
> sdk/lib/asjava.zip:$CLASSPATH
> 
> --Bill
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] 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
> > [email protected]
> > http://listserver.u2ug.org/mailman/listinfo/u2-users
> > 
> --
> Ben Souther
> Manager, Web and Web Service Development [email protected] |
> 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
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> 
--
Ben Souther
Manager, Web and Web Service Development [email protected] |
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
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to