aspose file tools*
The moose likes Java in General and the fly likes Im a bit confused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Im a bit confused" Watch "Im a bit confused" New topic
Author

Im a bit confused

Spas Dimitrov
Greenhorn

Joined: Jul 09, 2011
Posts: 2
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.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14150
    
  18

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:


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Spas Dimitrov
Greenhorn

Joined: Jul 09, 2011
Posts: 2
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Im a bit confused