• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can not load JDBC driver named 'org.apache.derby.jdbc.ClientDriver'

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm French so I,m sorry if I make some mistakes.
I have created a database and I have generated classes thanks to Cayenne.
Driver used : org.apache.derby.jdbc.EmbeddedDriver
URL : jdbc:derby:database
I have created a "main" class to insert and delete some informations from the database (it's not a memory database). It works perfectly and this, from a remote client.

Now I want to connect more than one client on the database at the same time. So in CayenneModeler I change the driver and the URL :
Driver used : org.apache.derby.ClientDriver
URL : jdbc:derby://localhost/database
After' I launch the jetty server (port 8080) and the derby server (port 1527) from Eclipse. I run the main class in the client machine and I obtain an error :



If you need more informations, ask me.

Thanks
Tadrierion
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Axel Sec wrote:Hello,

I'm French so I,m sorry if I make some mistakes.
I have created a database and I have generated classes thanks to Cayenne.
Driver used : org.apache.derby.jdbc.EmbeddedDriver
URL : jdbc:derby:database
I have created a "main" class to insert and delete some informations from the database (it's not a memory database). It works perfectly and this, from a remote client.

Now I want to connect more than one client on the database at the same time. So in CayenneModeler I change the driver and the URL :
Driver used : org.apache.derby.ClientDriver
URL : jdbc:derby://localhost/database
After' I launch the jetty server (port 8080) and the derby server (port 1527) from Eclipse. I run the main class in the client machine and I obtain an error :

If you need more informations, ask me.

Thanks
Tadrierion



Unless things have changed, you can only have 1 connection to a derby database at a time.
Are you sure the derby jar is in your classpath?
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Eclipse yes :



And in CayenneModeler too.

I have changed my driver (without cayenne, for instance with RazorSQL, I can connect more than one user).

Thanks for your answer
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can have lots of applications using the same database, but not actually connecting at the same time. There is this good page i found
http://docs.oracle.com/javadb/10.3.3.0/devguide/rdevconcepts713.html.

It looks like your classpath is good, have you checked inside the library to ensure the class you are after is in there?

other than that we will need some code to try and help anymore
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where can I verify my library ?

Do you need the main code ? Or another ?

PS : I have already used Derby with Eclipse but never with Cayenne at the same time.

 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your link, I would like to do the third solution : multi-users.
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
was that the 3rd option that said "can't do" sorry I can't load the page anymore, i get the following error:

File not found

Firefox can't find the file at http://docs.oracle.com/javadb/10.3.3.0/devguide/rdevconcepts713.html.
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I don't know why I can't.

I don't want to use the Embedded Driver (only one user)
I want to do a connection client/server.
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
because that is just how derby is written, you will have to choose another database, if that is a requirement.
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Only one server should access a database at a time. Multiple remote client applications can access the same server, and thus can access the same database at the same time through that server."

It says that I can create multiple users if my database is on a server.

(I do my internship, so I can't choose another database, if it's really not possible, I will say it to my tutor :p)
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How will the clients be communicating with the server?

ahh sorry now i understand, so you will have 1 server application running connecting to the database.
and many client applications connecting to the 1 server.

Do you understand what i mean?
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it's exactly that

One database on the server and many many clients connect on it :p
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so...., why won't it load the driver, with the cayenne where is the actual load happening, is it in a different project?
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One project on the server, with all generated classes (CayenneModeler). One Database on the server.

One project on the client with all generated classes and one main class which connect to the server.

I launch two servers : Jetty Server and Derby Server.
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nobody has an idea ?
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to do the same things but on the same computer, and I have the same error.

I tried to enter an unknown driver and I have the same error.

I verify in the library if the driver is here :
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solution : Add derbyclient.jar in "Maven Dependencies".
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ahh, sorry we weren't able to help, but thanks for letting us know the answer.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic