NetBeans Forums

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

derby db

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



Joined: 02 Feb 2009
Posts: 122

PostPosted: Wed Apr 21, 2010 4:29 am    Post subject: derby db Reply with quote

Hello I want to use a MySQL database in a standalone Jdesktop app I created with netbeans. I there a way to use it as an embeded db for the application to use?
Back to top
dlmerryweather



Joined: 10 Feb 2010
Posts: 7

PostPosted: Wed Apr 21, 2010 2:11 pm    Post subject: Re: derby db Reply with quote

If you are asking if derby can be embedded and import the structure
and data from a MySQL db, then yes. If you are asking if MySQL can be
embedded, the answer to that is no. If you are asking if Derby can be
embedded and access a MySQL database file structure, the answer to
that is also no.

Does one of these answer your question?

If not, please give more detail.

Ciao

--
David Merryweather
Vice President of Information Technologies
Creative Education Institute, Inc.


On Tue, Apr 20, 2010 at 11:29 PM, ceyezumma <address-removed> wrote:
Quote:
Hello I want to use a MySQL database in a standalone Jdesktop app I created with netbeans.
Back to top
ceyezumma



Joined: 02 Feb 2009
Posts: 122

PostPosted: Wed Apr 21, 2010 9:55 pm    Post subject: embeded db using derby Reply with quote

I wasn't sure what I was asking but the first one is what I think I need.
it's good to know the rest .

I just got done doing just that but unknown problem at this point.

If you are good with derby and JDesktop app (standalone) and the DAO
Structure and using properties to load. I could use someone who has time to look at an app I am building. I have all the pieces there but it not running yet.

thanks
Back to top
darkoks



Joined: 23 Apr 2010
Posts: 3

PostPosted: Fri Apr 23, 2010 10:29 pm    Post subject: Re: derby db Reply with quote

Dear David,

I have a problem with embedded derby DB.
Namely, I am having problem with my application made in eclipse/netbeans, using embedded java derby DB.
Evrth works fine inside Eclipse/netbeans. Also, when I make exec jar file (using Build FAT JAR), the jar file which is made inside of project, works fine on double click.

Problem is when I copy the executable jar file to desktop, (outside of Project directory) and double click, it can not find driver for derby DB.
I solved that problem by copying a lib directory to desktop, which contains DERBY.jar file (I do not like this solution, since I thought if I have exec jar, evrth is inside it), and application started to work, but got another error, related to DERBY DB: "SCHEMA USER1 DOES NOT EXIST"

My question is, since I want this app to work on end users computer as exe file, is it possible to have evrth in the executable jar file, so, user just need to have JVM on his machine, without need to copy LIB dir to his path, in order app to work? So,is it possible all necessary info to be embedded inside of executable jar file, so end user just need to double click it, and app will start?

Also, if u know what can be the problem with message I get related to Derby DB? Namely, when I start app with double click (outside of directory where application is), directory MyDB and file derby.log are created automatically on Desktop, but error is "SCHEMA USER1 DOES NOT EXIST"?

I am using:
jdbc:derby:myDB;create=true;user=user1;password=user1

Please let me know if you need more info.

Thank you in advance

Regards

Darko


[quote="dlmerryweather"]If you are asking if derby can be embedded and import the structure
and data from a MySQL db, then yes. If you are asking if MySQL can be
embedded, the answer to that is no. If you are asking if Derby can be
embedded and access a MySQL database file structure, the answer to
that is also no.

Does one of these answer your question?

If not, please give more detail.

Ciao

--
David Merryweather
Vice President of Information Technologies
Creative Education Institute, Inc.


On Tue, Apr 20, 2010 at 11:29 PM, ceyezumma <address-removed> wrote:
Quote:
Hello I want to use a MySQL database in a standalone Jdesktop app I created with netbeans.
Back to top
dlmerryweather



Joined: 10 Feb 2010
Posts: 7

PostPosted: Sun Apr 25, 2010 2:16 pm    Post subject: Re: derby db Reply with quote

Darko,

Remember that a .jar file is just a zip file with a different extension.
Back to top
darkoks



Joined: 23 Apr 2010
Posts: 3

PostPosted: Mon Apr 26, 2010 8:07 pm    Post subject: Re: derby db Reply with quote

dlmerryweather wrote:
Darko,

Remember that a .jar file is just a zip file with a different extension.


I know, and when I do unzip, I see all files nedded, but still have the same problem.

SCHEMA USER1 DOES NOT EXIST

Any suggestion?

Thanks
Back to top
pawanspace



Joined: 05 Feb 2012
Posts: 1
Location: United States

PostPosted: Sun Feb 05, 2012 10:56 am    Post subject: Got solution Reply with quote

I had the same problem. Put your database folder from eclipse to the folder where your jar is placed and bingo it will work
Back to top
jjohn8171



Joined: 03 Oct 2011
Posts: 6

PostPosted: Tue Feb 14, 2012 6:03 am    Post subject: Reply with quote

My question is, since I want this app to work on end users computer as exe file, is it possible to have evrth in the executable jar file, so, user just need to have JVM on his machine.
_____________________
Search engine marketing
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE 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