Git Product home page Git Product logo

Comments (8)

jcflack avatar jcflack commented on July 19, 2024

On 11/25/2015 10:00 AM, jbsloan2000 wrote:

I am struggling to install pljava on Windows 7 Sp1 with Postgres 9.4.

When I run the following command:
CREATE FUNCTION sqlj.java_call_handler()
RETURNS language_handler AS 'pljava'
LANGUAGE C;

I receive the following error:
ERROR: could not load library "C:/Program Files/PostgreSQL/9.4/lib/pljava.dll": The specified procedure could not be found.

From what I can tell this is due to the jvm.dll not being found by the system path, but i have the PATH variable set to C:\Program Files\Java\jre1.8.0_66\bin\server; which contains my jvm.dll file. What's more, I have run a sysinternals process monitor and can see the postgres,exe access the jvm.dll file when I run the code.

Hi,

Just so I know, did you build your PL/Java from the source here
on github, or did you obtain it prebuilt somewhere (if so, where)?

My Windows knowledge is sketchy, but on typical platforms, finding
the .dll would not be dependent on your PATH variable exactly, but
instead on the setting of dynamic_library_path in postgres. Could
you do a SHOW dynamic_library_path; to check where that is
pointing?

(If it says something inscrutable like $libdir, then run
pg_config at the command line and look for the PKGLIBDIR value.)

There is a significant revision of the build/install process in
the works right now that should make this whole process a lot
simpler, and is very close to becoming a pull request soon, just
needing a bit more testing on Windows and Mac (only the people
I have been counting on to test on those platforms seem to be
extra busy this week). How much time pressure are you under?
Would you be able to wait a bit for an improved process?

from pljava.

jbsloan2000 avatar jbsloan2000 commented on July 19, 2024

Thanks for your reply. Would prefer not to wait, but think the improved process will be welcomed!

I have two different versions of pljava, one that was included with the software that I was trying to install but seems to be compatible with Postgres 9.3 rather than 9.4 which I have installed. So I also downloaded from pgfoundry (via github) and have tried using that one. "pljava-x86_64-w64-mingw32-pg9.1-snapshot.20120525.0.tar.gz"

My $libdir location is the C:\Program Files\PostgreSQL\9.4\lib directory where pljava.dll is installed.

Since posting, I did some additional troubleshooting and using a dependency walker tool in Windows found that the PLjava.dll is dependent on some dll's that are missing from my computer and apparently not compatible with Windows 7. They seem to be related to the MS Visual C++ redistributable, but I have tried uninstalling and reinstalling vc_redist_x64.exe with no luck.

Missing DLL's are listed below:

api-ms-win-APPMODEL-runtime-l1-1-0.dll
api-ms-win-CORE-WINRT-ERROR-l1-1-0.dll
api-ms-win-CORE-WINRT-l1-1-0.dll
api-ms-win-CORE-WINRT-ROBUFFER-l1-1-0.dll
api-ms-win-CORE-WINRT-STRING-l1-1-0.dll
api-ms-win-SHCORE-SHCALING-l1-1-0.dll
DCOMP.DLL
IESHIMS.DLL

from pljava.

jbsloan2000 avatar jbsloan2000 commented on July 19, 2024

Just a quick follow up, those DLL's may be a wild goose chase as they seem to appear with some frequency in the Dependency Walker tool I am using.

from pljava.

jcflack avatar jcflack commented on July 19, 2024

On 11/25/2015 10:58 AM, jbsloan2000 wrote:

Just a quick follow up, those DLL's may be a wild goose chase as they seem to appear with some frequency in the Dependency Walker tool I am using.

On the other hand, they could be pertinent. I noticed your error
message did not say "could not load library because it wasn't there",
but said "could not load library" because a "procedure could not be
found", and that might be consistent with some transitive
dependency missing.

If you have MSVC, you are surely better off building a fresh
PL/Java; even the newest packages on pgfoundry are something like
four years old.

There's a bit of workaround needed with three variables
(log_min_messages, client_min_messages, and session_timezone)
that isn't committed yet, but I might get something in tonight
or tomorrow.

from pljava.

jbsloan2000 avatar jbsloan2000 commented on July 19, 2024

Unfortunately, I don't have MSVC. I could download express, but wouldn't know what I need to do to build it and can't find Windows directions on the github site.

How long until the updated installer should be ready (more or less?) Are talking days, weeks, or months?

from pljava.

jcflack avatar jcflack commented on July 19, 2024

On 11/25/15 11:42, jbsloan2000 wrote:

Unfortunately, I don't have MSVC. I could download express, but wouldn't
know what I need to do to build it and can't find Windows directions on the
github site.

I've asked and been told that Express ought to work, so it might be worth
a try. There is a file msvc-build-notes.txt in the top level directory
(they don't reflect the install changes in progress yet, but I think they
should be pretty sound for building). Later tonight I'll try to commit
workarounds for the three unresolved symbols that complicate the Windows
build.

How long until the updated installer should be ready (more or less?)
Are talking days, weeks, or months?

I'm only waiting to make a pull request out of it until a couple people
can tell me there's nothing dumb I missed that breaks it on Windows or Mac,
which I'm not able to test for myself. Unfortunately one got really busy
this week and the other got sick. :/

If you're open to testing the bleeding edge, let me know a way to contact
you that won't stretch out this github ticket.

-Chap

from pljava.

jbsloan2000 avatar jbsloan2000 commented on July 19, 2024

Chap,
I started to go down the route of compiling my own dll, but when I was reading the notes, it looks like it is not yet compatible with Postgres 9.4. So, I just went back to Postgres 9.3 and it installed fine.
Thank you for your assistance on Wednesday.
JB

Date: Wed, 25 Nov 2015 15:55:14 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [pljava] Error installing pljava with Windows 7 64 Bit and Postgres 9.4 (#71)

On 11/25/15 11:42, jbsloan2000 wrote:

Unfortunately, I don't have MSVC. I could download express, but wouldn't

know what I need to do to build it and can't find Windows directions on the

github site.

I've asked and been told that Express ought to work, so it might be worth

a try. There is a file msvc-build-notes.txt in the top level directory

(they don't reflect the install changes in progress yet, but I think they

should be pretty sound for building). Later tonight I'll try to commit

workarounds for the three unresolved symbols that complicate the Windows

build.

How long until the updated installer should be ready (more or less?)

Are talking days, weeks, or months?

I'm only waiting to make a pull request out of it until a couple people

can tell me there's nothing dumb I missed that breaks it on Windows or Mac,

which I'm not able to test for myself. Unfortunately one got really busy

this week and the other got sick. :/

If you're open to testing the bleeding edge, let me know a way to contact

you that won't stretch out this github ticket.

-Chap


Reply to this email directly or view it on GitHub.

from pljava.

jcflack avatar jcflack commented on July 19, 2024

I started to go down the route of compiling my own dll, but when I was reading the notes, it looks like it is
not yet compatible with Postgres 9.4. So, I just went back to Postgres 9.3 and it installed fine.

Thanks for the follow-up. If in the future your travel plans call for PostgreSQL 9.4, please check back, because it will be supported once the work in progress is merged. I'll leave this ticket open until that happens, which should be shortly.

-Chap

from pljava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.