• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Im a bit confused

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi try to run a simple demo application from Jedit which is started by using build ant file and groovy. But when i run it it comes up with

No suitable driver found for jdbc:derby:derbyDB;create=true

massage.

The output bellow is from Jedit system output.


As i read i think it says that it could not find a class path i will list the build and groovy files to check them and say what i have to add.

This is BUILD.XML file content bellow.


And that is the RunJedit.Groovy file bellow


This is the SimpleApp.java files from Derby which I'm trying to run.



Thanks in advance for looking at my problem.

Also if you have Anny suggestion or good sources of reading material of how to configure the build files would be great.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spas, welcome to the Ranch!

The first error message says what the problem is:


Unable to load the JDBC driver org.apache.derby.jdbc.EmbeddedDriver
Please check your CLASSPATH.
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver


You are missing the Apache Derby JDBC driver in your classpath.

Looking at the Ant build file, you can see what it uses for the classpath:

It takes your home directory, and adds two JAR files named becker.jar and glos.jar that are in the directory that ${javalib} refers to. Looking a bit further (line 23 of build.xml), you can see that this directory is taken from where the environment variable CO.LIB points to.

You probably need to put the Apache Derby JAR file in the same directory as the other two JAR files, and then add a line after line 30 in build.xml with the name of the library, something like this:

 
Spas Dimitrov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:Spas, welcome to the Ranch!

The first error message says what the problem is:


You probably need to put the Apache Derby JAR file in the same directory as the other two JAR files, and then add a line after line 30 in build.xml with the name of the library, something like this:



Thanks a lot for the help it worked now i will have a play with it :-).
It also helped me understand where to ad jar files if i need to use other libraries in future and what to edit in that build file.
It does not look complicated but it save me some tie with playing with as these files are ready from my university small programs and I used to change the Java class name which to run only till now.

reply
    Bookmark Topic Watch Topic
  • New Topic