NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

embedded DERBY with netbeans: gettin unable to connect to driver

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
GPXtC02



Joined: 23 Mar 2010
Posts: 22

PostPosted: Fri May 07, 2010 1:19 am    Post subject: embedded DERBY with netbeans: gettin unable to connect to driver Reply with quote

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.





PostPosted: Fri May 07, 2010 1:19 pm    Post subject: embedded DERBY with netbeans: gettin unable to connect to driver Reply with quote

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

PostPosted: Fri May 07, 2010 8:56 pm    Post subject: Reply with quote

hmm, still returns the same error in the netbeans ide.
Back to top
GPXtC02



Joined: 23 Mar 2010
Posts: 22

PostPosted: Fri May 07, 2010 10:47 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo