Where does NetBeans create Derby Embeded DB - netbeans

I have created a Derby Embeded DB in netbeans. Now I can not find the folder in which DB is placed by netbeans.
My connection URL is jdbc:derby:Inventory;create=true;.
Where does netbeans place the DB file by default?
I am using Ubuntu 12.04.

The Default Linux Netbeans Database Folder :
/home/username/.netbeans-derby/
there is a folder Inventory
netbeans 7.2.1 :
/home/username/.netbeans/7.2.1/derby/
you can search with
sudo find / -name Inventory -print
Properties :
right click Java DB select Create Database.

The database name "Inventory" is a relative name, so it will be located in the "Inventory" subdirectory of the Derby home directory. The Derby home directory defaults to the current working directory when your program runs. So you just have to figure out where the current working directory is when your program runs.
However, this is rather the hard way to go about things. Instead, change your connection URL so that it specifies an absolute name, such as
jdbc:derby:/home/tariq/myDerbyDBs/Inventory
and then you will easily be able to find your database. (Make sure that you create the '/home/tariq/myDerbyDBs' directory first.)

Related

Trying to connect RazorSQL to a database at https://github.com/dalers/mywind

I am trying to connect Razor SQL to a database at https://github.com/dalers/mywind
The instructions to do this say I should to set the driver location property in RazorSQL to the path to the lib subfolder in the installation directory. Is the installation directory on my machine? I can't find it in file explorer. Any guidance would be appreciated. Thank you.

How to change alfresco start directory?

I rsync-ed from old working alfresco server entire /dir/alfresco-5.0/* to /dir/52/
52 is the name I had for alfresco dir on the new server.
Obviously this didn't work when I restarted alfresco on the new server because inside /dir/52 there are files configured to work with /dir/alfresco-5.0.
I can change the name of the directory but I'm guessing this won't work since alfresco program is configured to look at /dir/52.
I want to know how to configure alfresco to use the new name I when I change /dir/52 to /dir/alfresco-5.0.
Places in a 5.2 Alfresco installation where the Alfresco home directory might be specified:
alfresco-global.properties
catalina.sh
ctl.sh
setenv.sh
solr.in.sh
You might try a recursive grep for the old directory name starting in /dir/alfresco-5.0 to find them all.

pgAdmin4 import file error - can't find file

I'm having a problem importing a csv file to pgAdmin4 on a mac - it simply can't find the file. This is so simple that I'm hoping there's just a setting I've failed to set up.
In the import/export data function on a table, there is the Import/Export dialog that looks like this:
However, it can't find the file:
That error looks like the standard python error when you give it the wrong path to a file. But it's correct - that's where the file is: '/tmp/person616.csv' - I didn't even enter the name/path, I browsed to it.
Has this happened to anybody else? Know how to fix it?
The exact problem has been bothering me for quite some days now. There are not much resources available to address it. So here's what I did:
I created a new folder giving it a strange name making sure that it is unique under the "/" directory and in the pgAdmin4 panel you're in rn.
I used below commands to find the new strange named folder that I just created: (i) sudo su (ii) find -iname [strange named folder] -type d
And after some time here it was. My path was revealed.
In my case, the path was
/var/lib/pgadmin/storage/[pgAdmin4_username]
I suspect that path for "PostgreSQL Binary Path" is not set properly in pgAdmin4.
In pgAdmin4 Goto:
File > Preferences > Paths > Binary paths > PostgreSQL Binary Path
Sample paths as below (You need to change it according to your Postgres location),
If you are using Windows than provide path like,
C:\Program Files\PostgreSQL\9.6\bin
If you are using Linux than provide path like,
/opt/PostgreSQL/9.5/bin
If you are using Mac than provide path where you have installed PG,
/Library/PostgreSQL/9.6/bin
And try again.
I just had the same problem and found the solution. PGAdmin4's root directory is not your root directory. It starts at
/home/[your_username]/.pgadmin/storage/[your PGAdmin_username]/
So if you put your file or backup directories there, it can find the files.
It also helps to have it show "all" files in the backup dialog, so it can find files with your own extensions. e.g. I use `filename.custom' which it doesn't recognize.
In pgAdmin, when you right-click on a database and click Restore, in the bottom-right corner of the mini-interface, just above the Select button, you can see Format 'dorpdown-list'. Make sure that the drop-down list isn't limiting your displayed files, so select All Files.
Right click on table > import/export >
Toggle "Import" mode > select file >
Upload Files then select each for every table

Zf Tool cannot find Zend Framework

Just started working with the Zend Framework Zf Tool and I've already come across a problem I've spent hours trying to figure out.
For some reason when I run the Zf show version command I get a ZF ERROR indicating it cant find the Zend Framework a to add it to my php.ini include_directory.
Here is my setup. I'm currently have WAMP installed on my local machine.
c:\wamp
I copied the zf.bat and zf.php files into the servers php directory. The path to the php directory has been added to the path environment variable. I'm pretty sure it works because I run the zf show version command in the console and get a ZF ERROR.
I keep my copy of the Zend Framework inside
c:\wamp\includes
So I added this to the php.ini include_path. include_path = ".;c:\wamp\includes"
I checked that this setting was set correctly by checking phpinfo() function. Which shows
include_path .;c:\wamp\includes .;c:\wamp\includes
So I think I have everything setup correctly. I can't work out what I'm missing.
I also tried setting the ZEND_TOOL_INCLUDE_PATH with no success.
Any help would be appreciated. PS I did check other posts here but none of the suggested
I have worked it out! Finally. The way I have my local wamp setup there is 2 php.ini files I have to edit.
The one that made the different is the php.ini inside the Apache2 directory.
Thanks everyone for their help. I appreciate it.
Well im not sure how you downloaded installed the framework but my guess is that you dont have enough of you include path based on the way Zend release packages are constructed. The Zend folder contained in the Zend Framework installation needs its parent folder to be on the include path so typically you would add something like:
c:\wamp\includes\ZF_BASE_DIR\library
This is because the zf package structure looks like:
ZendFramework-VERSION/
README.txt
INSTALL.txt
LICENSE.txt
bin/
library/
If you extracted ZF from the archive you will get a Zend-some_version folder, but the actual ZF is in
"include_path\Zend-some_version\library\Zend", so your include path should point include_path\Zend-some_version\library\
Just to add to what Tjorriemorrie said and to explain in detail how I got my installation on win 7 to work as simply as possible:
Download your preferred Zend package from "http://framework.zend.com/downloads/latest" to "C:\wamp\www\"
unzip your zip file so that you have the extracted Zend folder (with version name) under "C:\wamp\www\".
Rename your folder by removing the version so that you end up with "C:\wamp\www\ZendFramework"
Run a simple php file with phpinfo() in your browser. Note the entries for: "_SERVER["PATH"]" under PHP Variables
"Path" under Environment
"Loaded Configuration File" at the top
"include_path" under Core and
"extension_dir" under Core as well.
"_SERVER["PATH"]" and "Path" must be identical (no brainer)
There should be only one listing for your apache server and that should be the listing under "Loaded Configuration File" but without the "php.ini". So, if your "Loaded Configuration File" is "C:\wamp\bin\apache\apache2.2.22\bin\php.ini" you must have "C:\wamp\bin\apache\apache2.2.22\bin" in your path and that must be the ONLY reference to an apache server. If you have multiple references to apache servers Windows may pick the wrong one depending on your PATH order and use the wrong php.ini file.
Your "extension_dir" will tell you the version and location of php you are using. It is common to have different php folders lying around such as "C:\php", "C:\wamp\bin\php\php5.4.3", "C:\wamp\bin\php\php5.3....", etc. The extension directory will tell you which one of these php folders ZF will "reference" when it is looking for its library. For example, if your extension directory says "c:/wamp/bin/php/php5.4.3/ext/", you want to focus on "c:/wamp/bin/php/php5.4.3"
Go back to your PATH and a) add the string for this php version and b) remove all the other references to the other php folders
Now that you know your running and primary php and apache folders, shutdown (do not restart), shut down your computer and boot back up (restart does not always let the PATH completely reset.
Go to BOTH php.ini files at a) "C:\wamp\bin\apache\apache2.x.y\bin" and "C:\wamp\bin\php\php5.4.3" and find the include_path variable for Windows
Replace the default line, which looks like:
;include_path = ".;c:\php\includes;"
with
include_path = ".;c:\php\includes;C:\wamp\www\ZendFramework\library"
ON BOTH FILES just as Tjorriemorrie notes.
Restart All Services by clicking the wamp icon and selecting said option
At this point my zf tool was working. But, just to be safe, shut down and bootup
Smile and grab a beer!

Move / backup Netbeans FTP profiles

Trying to figure out how to transfer / back remote connections in netbeans. I have over 100 that I would like to move to a backup computer. Recreating every one of them would be extremely time intensive. I cannot find any way to export the remote profiles and I haven't been able to find the profiles in the .netbeans directory on the local computer.
Is there a file, or any method that would allow moving or backing up the FTP profiles.
The location changed in Netbeans 7.2. The path is the same except AppData\Roaming instead of AppData\Local.
If you are setting up a new windows machine to run Netbeans, you need to first create a dummy remote ftp connection so Netbeans will create the last folder in this file path. Place the .properties files here and then restart Netbeans.
C:\Users\[windowsUsername]\AppData\Roaming\NetBeans\7.2.1\config\Preferences\org\netbeans\modules\php\project\RemoteConnections
The path on Windows would be:
user\.netbeans\6.7\config\Preferences\org\netbeans\modules\php\project\RemoteConnections
For Windows 10:
C:\Users\ (username) \AppData\Roaming\NetBeans\ (netbeans_version) \config\Preferences\org\netbeans\modules\php\project\RemoteConnections