NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
GPXtC02
Joined: 23 Mar 2010 Posts: 22
|
Posted: Fri May 07, 2010 1:19 am Post subject: embedded DERBY with netbeans: gettin unable to connect to driver |
|
|
Java DB is started.
I can connect to a preexisting DERBY db fine through Network, but no matter what I can't connect with Embedded.
I feel like the project's class paths are right.
I've looked through alot of threads with similar problems but no one seems to find a solution..
Is this a bug in Netbeans or am i missin' somethin?
Thanks! |
|
| Back to top |
|
 |
Javier.Ortiz Posted via mailing list.
|
Posted: Fri May 07, 2010 1:19 pm Post subject: embedded DERBY with netbeans: gettin unable to connect to driver |
|
|
I have your setup working.
Here's what I do:
1. Set the derby.system.home to your desired path
private void setDBSystemDir() {
// Establish the db system directory: <userhome>/.hims/
String userHomeDir = System.getProperty("user.home", ".");
String systemDir = userHomeDir + "/.hims";
// Set the db system directory.
System.setProperty("derby.system.home", systemDir);
}
2. Create EntityManagerFactory
Persistence.createEntityManagerFactory(pu)
Of course the driver shold be in the classpath.
Javier A. Ortiz Bultr |
|
| Back to top |
|
 |
GPXtC02
Joined: 23 Mar 2010 Posts: 22
|
Posted: Fri May 07, 2010 8:56 pm Post subject: |
|
|
| hmm, still returns the same error in the netbeans ide. |
|
| Back to top |
|
 |
GPXtC02
Joined: 23 Mar 2010 Posts: 22
|
Posted: Fri May 07, 2010 10:47 pm Post subject: |
|
|
I'm doing this in netbeans so i'm not really sure how and when the driver class is called into the driver manager.
Anyone understand why it's giving me this error? I have the derby.jar imported and the class path's seem right, but for some reason every time I try to make a new Embedded connection in the IDE's Services window it says it can't find the correct driver. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|