Saturday, April 26, 2014

Learning NetBeans - Creating Database

I ran into an issue today where my professor's tutorial didn't work out as planned. My GlassFish Server 4 console stated "sample database not found" or something like that. I'll have to make sure to take the screenshot next time.

Anyhow, to resolve this issue, I went into the directory instructed by my professor and renamed my folder "sample" to "sample_original". There was nothing in this folder but a subfolder called "log" with log files. Oh, here is where the directory was:

C:/Users/gradney/.netbeans-derby

This is the default location (where my %HOME% is C:/Users/gradney) that NetBeans will create its Derby (database) directory. This is NetBeans' Java database, I believe.

Once I renamed this folder to "sample_original" (instead of deleting it because I might need this folder later), I went back into NetBeans and created the database from within the IDE. Here's the YouTube I followed (from the first few minutes) and it worked.


Quick Instruction
Open NetBeans IDE > Go to Services tab/view > Expand Databases > Right-click Java DB > click Create Database > enter Database Name (like 'sample') > enter Username (like 'app') > enter Password (like 'app') > click OK.


No comments:

Post a Comment