Error on installing pl/java on windows 7 x64 and PostgreSQL 9.0.
CREATE FUNCTION sqlj.java_call_handler()
RETURNS language_handler AS 'pljava'
LANGUAGE C;
Error:
ERROR: could not load library
"C:/Program
Files/PostgreSQL/9.0/lib/pljava.dll":
The specified module could not be
found.
*** Error ***
ERROR: could not load library
"C:/Program
Files/PostgreSQL/9.0/lib/pljava.dll":
The specified module could not be
found. SQL state: 58P01
But I'm sure that pljava.dll exists in C:/Program Files/PostgreSQL/9.0/lib
I found it's possible to install PL/Java procedural language on PostgreSQL 9.0 64 bit on Windows 7 64 bit (I had same errore message as yours). I see (C:/Program Files path) that you have 64 bit version of PostgreSQL, so you need 64 bit JRE (assuming C:\Program Files\Java\jre6):
Download PL/Java 64 bit binary
package from pgFoundry
(that is,
pljava-x86_64-w64-mingw32-pg9.0-1.4.2.tar.gz)
Unpack archive to C:\Program Files\PostgreSQL\9.0\share\pljava directory
Put pljava.dll into C:\Program
Files\PostgreSQL\9.0\lib directory
Add into postgresql.conf (data):
custom_variable_classes = 'pljava'
pljava.classpath='C:\\Program Files\\PostgreSQL\\9.0\\share\\pljava\\pljava.jar'
Add into PATH (My Computer → Properties → Advanced → Environment Variables):
;C:\Program Files\Java\jre6\bin;C:\Program Files\Java\jre6\bin\server
(you can create another JRE_HOME variable if you like and then write ;%JRE_HOME%\bin;%JRE_HOME%\bin\server)
After that restart PostgreSQL service (postgresql-x64-9.0) and load C:\Program Files\PostgreSQL\9.0\share\pljava\install.sql again. Check:
postgres=# SELECT lanname FROM pg_language;
lanname
----------
internal
c
sql
plpgsql
java
javau
(6 rows)
I had the exact same error and followed the instructions to a T, but still the same problem. Turns out my PATH statement for the jre included quotes - assumed I needed them because of spaces in the directory names. Removed the quotes from around the jre paths and the lights came on.
Hope this helps!
Related
I use Windows 10 and Qt version 4.8.6 (msvc).
I try to connect to my postgres database but I always got the error 'driver not loaded'.
I copied libpq.dll to the path of the executable and in the directory plugins, which I copied under the executable path.
This is my code:
dbPhilo.setHostName("127.0.0.1");
dbPhilo.setPort(5433);
dbPhilo.setDatabaseName("postgres");
dbPhilo.setUserName("postgres");
dbPhilo.setPassword("toor");
if(dbPhilo.open())
...
In the documentation, this line doesn't work:
qmake -- PSQL_INCDIR=C:/psql/include PSQL_LIBDIR=C:/psql/lib/ms
It shows me the documentation of qmake.
Is there a way to download the correct dll from a website ?
Thank you for your help.
I want to consult my Prolog project from the eclipse console.
I Installed: SWI PROLOG 32 bit and ECLIPSE LUNA 32 bit
About environment system variable...
I added SWI_HOME_DIR with my path of swi prolog, that is C:\Program Files(x86)\swipl;
I added to path variable at the end ;%PrologPath%\bin;%PrologPath%\lib\jpl.jar ;
What should I do to get the output of the prolog-project to my console ? What kind of project should i build in eclipse, and what kind of java file should I create ?
Can someone give me some code to consult my prolog-project ? My prolog-project is in the prolog home ( C:\Program Files (x86)\swipl\project1\src\file.pl )
I have been trying to run MongoDB on WAMP all day and It shows the error: Fatal Error: MongoClient class not found. I have a windows 64 bit, Wamp 32 bit ( after trying and failing at running wamp 64), MongoDB 64 bit. I downloaded mongo php_driver from https://s3.amazonaws.com/drivers.mongodb.org/php/index.html. Copied php_mongo-1.5.1-5.4-vc9.dll to the php extension folder as php_mongo.dll. Added it as extension in php.ini (configuration setting file). My php.ini extension section looks like this:
extension=php_bz2.dll
extension=php_curl.dll
extension=php_com_dotnet.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
extension=php_shmop.dll
extension=php_mongo.dll
I've reboot the server. I don't see Mongo on the phpinfo() file and also the php error log files shows the following:
c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - %1 is not a valid Win32 application.
PHP Warning: PHP Startup: mongo: Unable to initialize module
Please tell me what I am missing because I have tried everything.
Thank you!
To fix the php_intl.dll error do the following using the wmapmanager menus
wampmanager -> Apache -> Version -> and click on the 2.4.9 version number
This will cause wampmanager to rebuild all the SYMLINKS in the \wamp\bin\apache\apache2.4.9\bin folder.
As to the mongo error, are you sure you are editing the correct php.ini file.
Again use the wampmanager menu system to edit the correct php.ini file
wampmanager -> PHP -> php.ini
I expect the extension was not added to this file so add
extension=php_mongo.dll
like you did to the PHP CLI version of the ini file.
On ubuntu 11.10 I installed eclipse from repositories, installed adt and cdt plugins. I am able to compile the hello-jni example using command line, but i would like to use eclipse for the task.
I followed the guide here: http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and defined a PATH variable in eclipse preferences (window->preferences->c/c++->environment), pointing to the ndk-r7b folder. But the project won't buid. I get this error:
(Cannot run program "ndk-build"
(in directory "/home/athos/android/ndk-r7b/samples/hello-jni"):
java.io.IOException:
error=2, File o directory non esistente)
(last line should be "no such file or directory" in english)
If I specify "${PATH}/ndk-build" or "/home/athos/android/ndk-r7b/ndk-build" as the build command. i get this:
/home/lavoro/android/ndk-r7b/ndk-build
ERROR: Cannot find 'make' program. Please install Cygwin make package
/home/lavoro/android/ndk-r7b/ndk-build: 40: dirname: not found
or define the GNUMAKE variable to point to it.
If I define the GNUMAKE variable in window->preferences->c/c++->environment i get this:
ERROR: Your GNUMAKE variable is defined to an invalid name: /usr/bin/make
Please fix it to point to a valid make executable (e.g. /usr/bin/make)
Which is funny, since It suggests the exact same directory I indicated. Make is installed and present at the indicated location.
What am I missing?
It's a bit ugly, but you can always put
/fully/qualified/path/to/ndk-build
In your build command.
i have a C++ application compiled with VS 2008 with pdb file enabled. After i tried to use dv command to display local vars, it shows the following message:
Unable to enumerate locals, HRESULT0x80004005
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
Note that:
i've run the "dv" command on the
correct frame which has the symbol
file.
i can use "dt" command successfully.
i've included the symbol path
and the pdb file has been loaded
successfully as following:
start end module name
00400000 0043f000 helloworld (private pdb symbols) c:\test...
Does anyone know the cause? Is there any configuration i missed to enable local var watch? Or VS 2008 pdb is not supported by windbg (i'm using the latest windbg version)?
Sorry. i found the windbg has been updated to 6.12 and mine is 6.6. And the issue disappeared after i installed the 6.12.