db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George S." <geor...@mhsoftware.com>
Subject Re: DriverManager.getConnection error with JDK 7
Date Sat, 23 Feb 2013 14:46:01 GMT
You might want to read this page and resubmit the question.

http://www.catb.org/esr/faqs/smart-questions.html

In particular, you might want to post the command line used to invoke 
Java, and post the text of the error. Also, can you explain the part 
about not using class for name?

On 2/23/13 4:21 AM, john miltone wrote:
>
> Hi All,
>
> I am starting into Derby and I develop on Intellij IDEA with JDK 7.
>
> I just want to create and start database. It seems very simple but the 
> first and unique code row generate a exception.
>
> Can you help me to understand and arrive to start engine Derby 
> database in my program please ?
>
> Here this is my code :
>
> "
>
>     public static void main (String[] args) throws IOException
>
>     {
>
>         String dbName = "MoneyBack1";
>
>         String user = "miltone";
>
>         String password = "password";
>
>         String connectionURL = "jdbc:derby:" + dbName + 
> ";create=true;user=" + user + ";password=" + password ;
>
>         String createString = "CREATE TABLE operation " + 
> "(operation_ID INT NOT NULL GENERATED ALWAYS AS IDENTITY " + " type 
> VARCHAR(32) NOT NULL) " ;
>
> try
>
>         {
>
>             Connection connexion = 
> DriverManager.getConnection(connectionURL);
>
>             Statement statement = connexion.createStatement();
>
> statement.executeQuery(createString);
>
> statement.close();
>
> connexion.close();
>
>         }
>
>         catch (Throwable e)
>
>         {
>
> System.out.println("1");
>
>         }
>
> "
>
> DriverManager.getConnection throw a exeception always.
>
> I'm using JDK 1.7.0_10 so then I don't use ClassName methods for bring 
> driver into memory.
>
> Thank a lot for all helping.
>

-- 
George Sexton
MH Software, Inc.
303 438-9585
http://www.mhsoftware.com/


Mime
View raw message