How to setup PostgreSQL Binary path for PostgreSQL 14 - pgadmin-4

I am reading up on this tutorial: PostgreSQL: https://dba.stackexchange.com/questions/149169/binary-path-in-the-pgadmin-preferences
To setup PostgreSQL Binary path, I looked at my Preferences on PgAdmin and I see all versions of PostgreSQL to update Binary path except for PostgreSQL 14 which i am actually using.
Please where exactly should I update the Binary path to?
I have added a screenshot

You can try this. It works for me.

Anyone who is googling this problem out of frustration. Don't worry. The problem is pgAdmin does not fully support postgresql version 14 as of now (Nov 16). It happened to me as well when I tried to import/export into database.
Go to File > Preferences > Paths > Binary Paths > PostgreSQL Binary Path
You won't see PostgreSQL 14. It is ok. Just browse and set your postres 14's bin folder path to PostgreSQL 13's Binary Path. Lastly, make it default by clicking on the radio button on the left. Save it and run it again.
Your problem will go away.

Looking at the original screenshot, it looks like a Mac interface. So if you're on Mac, you could set PostgreSQL 13 as default, and use the path /Library/Applications/PostgreSQL/14/bin/.

if anyone for any reason needs the path for linux/ubuntu
/usr/bin

Related

LibreOffice Base: Connection to data source could not be established

I am trying to open an MS Access database in Base using the instructions here . (I've tried both .mdb and .accdb)
I can follow the process described by Gord with no problems until the last step, where it asks me to save the database in LibreOffice format. I choose a filename (say mylinuxdb.odb), click OK, and then Base opens with this error:
The connection to the data source "mylinuxdb" could not be established.
org/apache/commons/logging/LogFactory
Note that it is complaining about the new .odb database, not the MS Access database. Nonetheless, no data is imported.
Can anyone help with this?
Thank you.
Revised answer:
It appears that this issue is specific to distributions like Linux Mint that install LibreOffice Base by default. Presumably in order to enable embedded HSQLDB databases they also install a rather old version of HSQLDB which conflicts with UCanAccess. To fix that, remove LibreOffice's copy of HSQLDB. For Linux Mint that would be
sudo apt remove libhsqldb1.8.0-java
(original answer)
I was able to reproduce your issue with LibreOffice 6.4.6.2 on Xubuntu 20.04. It looks like the setup instructions on Ask Ubuntu may need to be tweaked.
In the meantime try opening your .odb file, clicking through any errors. When Base opens, choose
Edit > Database > Properties …
and notice that the "Database URL" text box has "jdbc:" in front of it.
so if the textbox contains
jdbc:ucanaccess:///home/gord/Documents/Database1.accdb
then apparently Base will try to use
jdbc:jdbc:ucanaccess:///home/gord/Documents/Database1.accdb
and that won't work. We need to have just
ucanaccess:///home/gord/Documents/Database1.accdb
in the text box (as in the screenshot above).
This is NOT (as per chosen answer) "specific to distributions like Linux Mint that install LibreOffice Base by default". Such statements should be avoided as they are clearly very difficult to prove except with rigorous analysis of all other situations, which is clear was not done and in practical terms cannot be done.
I just encountered this message with an LO Base form which uses a MariaDB installation on Windows 10, using a JDBC connection with the mysql-connector-java-8.0.28.jar connector .jar. The form was created only minutes previously.
Interestingly, I happened to have a Python application running at the same time but, and I stress, this Python application does not use any kind of connection to any mysql database whatsoever. Nor, being CPython, does it use Java in any way whatsoever.
I find that when I close the Python application I am then able to open the LO Base form. Furthermore, after having first opened the LO Base form I am then able to run the Python application.
As to why this ludicrous error should arise in these circumstances in the first place, I do not yet know. Chalk it down to yet one more LO anomaly and oddity around which you have to navigate by hook or by crook.

pgadmin 4 v4.28 keeps loading

I installed pgadmin 4 v4.28 and it keeps loading but does not open, I tried opening it as administrator and it still does not open. I had the older version previously but I have deleted PostgreSQL DB and pg admin properly before I install the above version. can you guys help me out on this? the link I have the screenshot of the problem.
Do the following steps to resolve this:
Open your registry editor.
Change the value of HKEY_CLASSES_ROOT\.js\Content Type from text/plain to text/javascript.
Restart the pgadmin server. You can do this by ending the pgadmin background task from the task manager.
UPDATED ANSWER
PGAdmin has been tracking this as bug 5996. In it, they recommend the following solution:
You can add the following lines to the "config_distro.py" and
restart the pgAdmin 4 server:
import mimetypes
mimetypes.add_type('text/javascript', '.js')
The above workaround should work for you.
They also mention:
In the next release, we're looking to include that into the code, so
users don't have to do it themselves.
But the answer to your question, the config_distro.py can be overwritten
in the subsequent upgrades.
pgAdmin does provide another option to set the settings in the
config_system.py file which is intended for system administrator to
include settings and which is outside of the pgAdmin installation.
Please refer https://www.pgadmin.org/docs/pgadmin4/4.28/config_py.html
for more details.
PREVIOUS ANSWER
Another answer had comments asking what caused this/how the author figured it out.
For posterity, this is documented in the FAQ:
When I launch pgAdmin 4 v4.28 or later on Windows, the loading page
never closes. Why?
pgAdmin 4 v4.28 includes additional security features, one of which is
intended to prevent security issues caused by Content Sniffing.
Unfortunately some Windows systems are misconfigured such that this
causes Javascripts used by pgAdmin to fail to load. Opening the
developer tools on your browser will show an error similar to this:
> Refused to execute script from
> 'http://127.0.0.1:57313/static/vendor/require/require.min.js?ver=42800'
> because its MIME type ('text/plain') is not executable, and strict
> MIME type checking is enabled.
>
> (index):39 Uncaught ReferenceError: require is not defined at
> (index):39
This will occur when the value of the registry key at
HKEY_CLASSES_ROOT\.js\Content Type is set to text/plain. To resolve
the issue, use the Registry Editor and reset the value of
HKEY_CLASSES_ROOT\.js\Content Type to:
text/javascript
Finally, restart the pgAdmin server.
Interestingly enough, GoLang, TensorBoard, Django, and many others have had issues filed regarding this same problem. Browsers are refusing to load content because the browser thinks it is being transferred as 'text/plain', based on the registry configuration.
Edited on 25 May 2022 (New Link for pgadmin4 download)
You all have great answers...but then on the experience i just had, the simplest way, which worked for me right away is to install the new version of pgadmin4 without necessarily uninstall the existing one.
That is what i did and i was able to still see all my databases and tables unchanged and untempered.
Just run the installation and you are good to go
You can also downgrade your PgAdmin. I didn't want to change anything in registry editor. So I downloaded and installed pgadmin4-3.6. It works fine on Windows 10 (x64).
I just upgraded PG Admin from v4.28 to V4.29 and it resolved my issue. One can download the latest version from here for Linux, here for Windows and here for Mac.
This is similar to vialy's recomendation. Thanks Vialy's for your input it save my day... :)
I had the same issue with pgAdmin 4.28 using Chrome Browser on windows 10. It started working after I switched to Edge Browser.

Wrong paths in Codename One preferences

When I need to input a path in Codename One preferences, for example to set up the icon or the certificates to use, I use the browse button. However the path that is then filled up in the associated field leads to the jre (java runtime environnement) folder instead of the parent folder of the file I selected.
Moreover the path is preceded by "file:" where it should not be there.
Here is an example to make it clearer :
As a workaround I manually paste the folder path where the file I want to use resides, and then paste it in the field. So as it is a little bit annoying, I was wondering if I could do something to make it work as it should ?
Please note : my setup involves Eclipse Mars running under Linux 64 with Oracle's Java 8 JDK.
Any help appreciated,
This seems to be related to this issue, I wasn't able to reproduce it in full although I did fix the file: prefix. The paths I got were correct despite all my attempts.
My only guess is that this might be an issue that affected an earlier version of the tool so I've added a version number to the title (1.13 in my current version). If this still happens in the next plugin update and the title of the preferences is 1.13 or newer I'd like to know.

db derby StartNetworkServer

I have problem with starting derby server.
My derby version: db-derby-10.11.1.1
I followed this tutorial:
http://db.apache.org/derby/papers/DerbyTut/ns_intro.html
but after typing: startNetworkServer.bat there is no response:
https://www.dropbox.com/s/bo1tgfj8gf2533i/derby_issue.PNG?dl=0
Could you help me?
Maybe there is some problem with my localhost?
I think that i install Derby correctly because after typing: java org.apache.derby.tools.sysinfo
I got some result
regards
The bug is in the localization (for me in cs localization) and the derby server does not print exceptions by default.
Workaround: Under windows in the console run the following commands:
set "DERBY_OPTS=-Duser.language=en -Dderby.drda.debug=true"
startNetworkServer.bat
The first line adds two options for java/derby. First option to change the local language to en and the second one enables printing debug messages to the console.
The second line runs the server (add path if needed).
Another workaround is adding the missing localization key DRDA_MissingNetworkJar.S to file org\apache\derby\loc\drda\messages_cs.properties inside derbynet.jar.
I had this problem with using derby in 1.8.0_45 but changing the DERBY_HOME back to 1.8.0_31 solved it.
This may occurs due to different Java version in your local.
Try using jdk 11. It works fine and networkserver gets started.
Please check out different versions so that you may get solution.

How do you uninstall / remove MarkLogic 7 on MacOS X?

Does anyone know how to completely remove MarkLogic 7 on MacOSX?
I've read their documentation which says:
To entirely remove MarkLogic, remove the following directories:
~/Library/MarkLogic
~/Library/Application Support/MarkLogic
~/Library/StartupItems/MarkLogic
~/Library/PreferencePanes/MarkLogic.prefPane
But I don't have those folders. I have no idea where it's been installed!
Then it says:
To make Mac OS X completely forget it ever had a MarkLogic installation, run the following command from a terminal window:
sudo pkgutil --forget com.marklogic.server
But that didn't seem to do anything. I still have it in my System Preferences.
My guess is that when you say you don't have those folders, you mean that you don't see ~/Library when you open Finder (please comment if that's not the case). You can make the Library directory appear by:
Open Finder
Click on your home directory
Click the Settings icon (gear)
Click Show View Options
Check the Show Library Folder option
Now you should be able to see the Library folder and you'll be able to remove those directories.
Note: I don't know your background, so forgive me if this is too basic, but the ~/Library directory contains a bunch of stuff that OS X uses to make your system run. It's hidden because making mistakes in there can cause problems that are tricky to fix. If the contents of ~/Library are not familiar to you, you might want to un-check that option when you're done.
Dave is probably right. But just in case, you can use that prefpane to stop MarkLogic, then use the Error Log button to open the log. Start MarkLogic and the first new line in the log will tell you where it is:
Notice: Starting MarkLogic Server 7.0-3 x86_64 in /Users/${USER}/Library/MarkLogic
with data in /Users/${USER}/Library/Application Support/MarkLogic/Data
Also, don't delete ~/Library/PreferencePanes/MarkLogic.prefPane, but remove the preference pane by right-clicking on it in System Preferences. It will then be deleted, but you can't remove its icon from System Preferences if you have deleted the preference pane.

Resources