This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
In your link, I would like to do the third solution : multi-users.
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Yes it's exactly that

One database on the server and many many clients connect on it :p
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Nobody has an idea ?
 
Axel Sec
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Solution : Add derbyclient.jar in "Maven Dependencies".
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh, sorry we weren't able to help, but thanks for letting us know the answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic