agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] Problem with PLJava on production machine
12+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-11 08:39
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-11 08:39 UTC (permalink / raw)
Hello,
I am working with PLJava on my development machine fine (win 7).
But when I try to install a jar on the production machine:
select sqlj.install_jar('file:///tmp/tmengine.jar','tmengine',true)
I always get a java.lang.NullPointerException error
This happens for all jars, even the helloworld example.
Creating and executing this function works fine:
CREATE FUNCTION getsysprop(VARCHAR)
RETURNS VARCHAR
AS 'java.lang.System.getProperty'
LANGUAGE java;
SELECT getsysprop('user.home');
This executes correctly and gives me the right result.
Any idea what might be causing this?
Machine runs Centos 5 - 32bit
DB is postgres 8.4
JRE 1.6
Or any suggestions on how I can get more debug info?
Thanks,
Bart
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problem-with-PLJava-on-production-machine-tp3424689p3424689....
Sent from the PL/Java mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-11 09:10
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-11 09:10 UTC (permalink / raw)
Hi Bart,
when it comes to strange errors with CentOS or RHEL my fist suggestion is to check whether SELinux is set to Enforce or not (use 'getenforce' to find out).
If it is set to 'Enforcing' I suggest you try it again after setting 'setenforce Permissive'. It probably will work afterwards, also check file permissions.
Regards,
Wolfgang
.........................................................................................................................................
WOLFGANG RIESE
ITE
HH, Raum 415
Tel.: +49 (0)40 42834-240
http://www.zbw.eu
ZBW - Deutsche Zentralbibliothek f?r Wirtschaftswissenschaften
Leibniz-Informationszentrum Wirtschaft
- Standort Hamburg -
Neuer Jungfernstieg 21
20354 Hamburg
.........................................................................................................................................
> -----Urspr?ngliche Nachricht-----
> Von: pljava-dev-bounces at pgfoundry.org [mailto:pljava-dev-
> bounces at pgfoundry.org] Im Auftrag von bartdeman
> Gesendet: Freitag, 11. M?rz 2011 09:39
> An: pljava-dev at pgfoundry.org
> Betreff: [Pljava-dev] Problem with PLJava on production machine
>
> Hello,
>
> I am working with PLJava on my development machine fine (win 7).
>
> But when I try to install a jar on the production machine:
> select sqlj.install_jar('file:///tmp/tmengine.jar','tmengine',true)
>
> I always get a java.lang.NullPointerException error
>
> This happens for all jars, even the helloworld example.
>
> Creating and executing this function works fine:
>
> CREATE FUNCTION getsysprop(VARCHAR)
> RETURNS VARCHAR
> AS 'java.lang.System.getProperty'
> LANGUAGE java;
>
> SELECT getsysprop('user.home');
>
> This executes correctly and gives me the right result.
>
> Any idea what might be causing this?
> Machine runs Centos 5 - 32bit
> DB is postgres 8.4
> JRE 1.6
>
> Or any suggestions on how I can get more debug info?
>
> Thanks,
> Bart
>
>
>
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Problem-with-PLJava-on-production-
> machine-tp3424689p3424689.html
> Sent from the PL/Java mailing list archive at Nabble.com.
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pljava-dev
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-11 09:17
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-11 09:17 UTC (permalink / raw)
On 03/11/11 1:10 AM, Riese Wolfgang wrote:
> Hi Bart,
>
> when it comes to strange errors with CentOS or RHEL my fist suggestion is to check whether SELinux is set to Enforce or not (use 'getenforce' to find out).
> If it is set to 'Enforcing' I suggest you try it again after setting 'setenforce Permissive'. It probably will work afterwards, also check file permissions.
I'd check file permissions FIRST. the POSTGRES process has to have
access to your jar files.
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-11 10:10
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-11 10:10 UTC (permalink / raw)
Hello,
Thanks for the quick answers already.
For the permissions: I checked that already and tried out several things:
chmod 777 of file and folder, and chown postgres/chgrp postgres for the jar
files.
But unfortunately the same error remains.
For selinux: this should be disabled:
getenforce returns 'Disabled'
Any more suggestions?
Thanks a lot,
Bart
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problem-with-PLJava-on-production-machine-tp3424689p3424784....
Sent from the PL/Java mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-11 10:19
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-11 10:19 UTC (permalink / raw)
On 03/11/11 2:10 AM, bartdeman wrote:
> Hello,
>
> Thanks for the quick answers already.
>
> For the permissions: I checked that already and tried out several things:
> chmod 777 of file and folder, and chown postgres/chgrp postgres for the jar
> files.
> But unfortunately the same error remains.
are all folders above the folder containing this file o:rx ?
btw, it doesn't have to be and shouldn't be 777. 755 or 775 at most.
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-11 11:20
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-11 11:20 UTC (permalink / raw)
John R Pierce wrote:
>
>
>
> are all folders above the folder containing this file o:rx ?
>
>
yes they are.
Another thing I tried is installing the jar in a db on my dev machine, and
then dumping the db and restoring it on the production machine.
When executing any of the functions in the jar, I get the same
NullPointerException.
Can I somehow increase the verbosity of the output?
Thanks,
Bart
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problem-with-PLJava-on-production-machine-tp3424689p3424886....
Sent from the PL/Java mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-11 13:28
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-11 13:28 UTC (permalink / raw)
i found some more detailed error logging, maybe that helps:
debijloke2 2011-03-11 14:20:33.257 CET DEBUG: JavaVM created
debijloke2 2011-03-11 14:20:33.257 CET DEBUG: Getting Backend class
pljava.jar
debijloke2 2011-03-11 14:20:33.326 CET DEBUG: Backend class was there
debijloke2 2011-03-11 14:20:33.507 CET DEBUG: 11 Mar 11 14:20:33
org.postgresql.pljava.internal.Backend Using SecurityManager for trusted
language
debijloke2 2011-03-11 14:20:33.528 CET DEBUG: className =
'org.postgresql.pljava.management.Commands', methodName = 'installJar',
parameters = 'null', returnType = 'null'
debijloke2 2011-03-11 14:20:33.528 CET DEBUG: 11 Mar 11 14:20:33
org.postgresql.pljava.sqlj.Loader Creating typeMappings for schema sqlj
debijloke2 2011-03-11 14:20:33.540 CET DEBUG: Loading class
org.postgresql.pljava.management.Commands
debijloke2 2011-03-11 14:20:33.541 CET DEBUG: Obtaining method
org.postgresql.pljava.management.Commands.installJar
(Ljava/lang/String;Ljava/lang/String;Z)V
java.lang.NullPointerException
at org.postgresql.pljava.internal.Tuple.getObject(Tuple.java:37)
at
org.postgresql.pljava.jdbc.SPIResultSet.getObjectValue(SPIResultSet.java:185)
at
org.postgresql.pljava.jdbc.ObjectResultSet.getNumber(ObjectResultSet.java:403)
at
org.postgresql.pljava.jdbc.ObjectResultSet.getInt(ObjectResultSet.java:152)
at
org.postgresql.pljava.management.Commands.getJarId(Commands.java:903)
at
org.postgresql.pljava.management.Commands.getJarId(Commands.java:935)
at
org.postgresql.pljava.management.Commands.installJar(Commands.java:977)
at
org.postgresql.pljava.management.Commands.installJar(Commands.java:534)
debijloke2 2011-03-11 14:20:33.544 CET ERROR:
java.lang.NullPointerException
debijloke2 2011-03-11 14:20:33.544 CET STATEMENT: select
sqlj.install_jar('file:///tmp/testZE.jar','test',false);
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problem-with-PLJava-on-production-machine-tp3424689p3425065....
Sent from the PL/Java mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-03-12 21:29
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-03-12 21:29 UTC (permalink / raw)
ok, finally got it working!
it seems the binary from the download site did not work on my system. (i
used pljava-i686-pc-linux-gnu-pg8.4-1.4.2.tar.gz)
I have built my own binary from source, and that one works perfect.
thanks a lot for the help!
regards,
Bart
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problem-with-PLJava-on-production-machine-tp3424689p3523452....
Sent from the PL/Java mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-04-15 23:31
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-04-15 23:31 UTC (permalink / raw)
Hi,
Sorry about the delayed reply.
On Sat, 12 Mar 2011 21:29:21 -0000, bartdeman
<bart.de.man at ticketmatic.com> wrote:
> ok, finally got it working!
>
> it seems the binary from the download site did not work on my system. (i
> used pljava-i686-pc-linux-gnu-pg8.4-1.4.2.tar.gz)
>
> I have built my own binary from source, and that one works perfect.
Thank you, that may actually be helpful. The official binaries are built
on Ubuntu (32bit) and Debian (64bit).
I'll see if I can get a hold of a RHEL/Centos system to test it myself in
the not too distant future.
--
Johann Oskarsson http://www.2ndquadrant.com/ |[]
PostgreSQL Development, 24x7 Support, Training and Services --+--
|
Blog: http://my.opera.com/myrkraverk/blog/
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-04-15 23:41
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-04-15 23:41 UTC (permalink / raw)
Sorry to intrude on your discussion...
Is the 64-bit verson of PL/Java for Windows 64-bit or for Postgres 64-bit.
I tried getting the 32-bit version of PL/Java to run on Windows 64-bit
with a 32-bit version of Postgres, but could not get that to work
because the loader kept trying to link the 32-bit DLLs against 64-bit
Windows libraries.
I need to be able to run PL/Java on both 32-bit Windows and 64-bit Windows.
Cheers, Eric
On 2011-04-15 4:31 PM, Johann 'Myrkraverk' Oskarsson wrote:
> Hi,
>
> Sorry about the delayed reply.
>
> On Sat, 12 Mar 2011 21:29:21 -0000, bartdeman
> <bart.de.man at ticketmatic.com> wrote:
>
>> ok, finally got it working!
>>
>> it seems the binary from the download site did not work on my system. (i
>> used pljava-i686-pc-linux-gnu-pg8.4-1.4.2.tar.gz)
>>
>> I have built my own binary from source, and that one works perfect.
>
> Thank you, that may actually be helpful. The official binaries are
> built on Ubuntu (32bit) and Debian (64bit).
>
> I'll see if I can get a hold of a RHEL/Centos system to test it myself
> in the not too distant future.
>
>
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-04-18 07:24
parent:
0 siblings, 1 reply; 12+ messages in thread
From: @ 2011-04-18 07:24 UTC (permalink / raw)
I've got a 64 bit Windows 7 installation running 64 bit Postgres. I can confirm that the 32 bit PL/java doesn't load in that environment.
Regards
David JL Gradwell, M.A. (Cantab), F.B.C.S.
Chartered IT Professional
Head of Consulting
VocaLink
?
t: ?+44 (0)870 920 8516
m:+44 (0)7920 143 639
e: ?david.gradwell at vocalink.com
w: http://www.vocalink.com
-----Original Message-----
From: pljava-dev-bounces at pgfoundry.org [mailto:pljava-dev-bounces at pgfoundry.org] On Behalf Of Eric Kolotyluk
Sent: 16 April 2011 00:41
To: pljava-dev at pgfoundry.org
Subject: Re: [Pljava-dev] Problem with PLJava on production machine
Sorry to intrude on your discussion...
Is the 64-bit verson of PL/Java for Windows 64-bit or for Postgres 64-bit.
I tried getting the 32-bit version of PL/Java to run on Windows 64-bit
with a 32-bit version of Postgres, but could not get that to work
because the loader kept trying to link the 32-bit DLLs against 64-bit
Windows libraries.
I need to be able to run PL/Java on both 32-bit Windows and 64-bit Windows.
Cheers, Eric
On 2011-04-15 4:31 PM, Johann 'Myrkraverk' Oskarsson wrote:
> Hi,
>
> Sorry about the delayed reply.
>
> On Sat, 12 Mar 2011 21:29:21 -0000, bartdeman
> <bart.de.man at ticketmatic.com> wrote:
>
>> ok, finally got it working!
>>
>> it seems the binary from the download site did not work on my system. (i
>> used pljava-i686-pc-linux-gnu-pg8.4-1.4.2.tar.gz)
>>
>> I have built my own binary from source, and that one works perfect.
>
> Thank you, that may actually be helpful. The official binaries are
> built on Ubuntu (32bit) and Debian (64bit).
>
> I'll see if I can get a hold of a RHEL/Centos system to test it myself
> in the not too distant future.
>
>
_______________________________________________
Pljava-dev mailing list
Pljava-dev at pgfoundry.org
http://pgfoundry.org/mailman/listinfo/pljava-dev
*****************************************************
This email is issued by a VocaLink group company. It is confidential and intended for the exclusive use of the addressee only. You should not disclose its contents to any other person. If you are not the addressee (or responsible for delivery of the message to the addressee), please notify the originator immediately by return message and destroy the original message. The contents of this email will have no contractual effect unless it is otherwise agreed between a specific VocaLink group company and the recipient.
The VocaLink group companies include, among others: VocaLink Limited (Company No 06119048, VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House, Homestead Road, Rickmansworth, WD3 1FX. United Kingdom, Voca Limited (Company no 1023742, VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House, Three Rivers Court, Homestead Road, Rickmansworth, Hertfordshire. WD3 1FX. United Kingdom, LINK Interchange Network Limited (Company No 3565766, VAT No. 907 9619 87) which is registered in England and Wales at registered office Arundel House, 1 Liverpool Gardens, Worthing, West Sussex, BN11 1SL and VocaLink Holdings Limited (Company No 06119036, VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House, Homestead Road, Rickmansworth, WD3 1FX. United Kingdom.
The views and opinions expressed in this email may not reflect those of any member of the VocaLink group. This message and any attachments have been scanned for viruses prior to leaving the VocaLink group network; however, VocaLink does not guarantee the security of this message and will not be responsible for any damages arising as a result of any virus being passed on or arising from any alteration of this message by a third party. The VocaLink group may monitor emails sent to and from the VocaLink group network.
This message has been checked for all email viruses by MessageLabs.
*************************************************************
^ permalink raw reply [nested|flat] 12+ messages in thread
* [Pljava-dev] Problem with PLJava on production machine
@ 2011-04-18 08:13
parent:
0 siblings, 0 replies; 12+ messages in thread
From: @ 2011-04-18 08:13 UTC (permalink / raw)
Hi David,
I don't understand the urge to load a 32-bit Java VM into a 64 bit process. Why would anyone like to do that? It doubt
that it will ever work. If you have a 64-bit Postgres, I'm fairly convinced you'll need a 64-bit PL/Java binary.
- thomas
On 2011-04-18 09:24, David Gradwell wrote:
> I've got a 64 bit Windows 7 installation running 64 bit Postgres. I can confirm that the 32 bit PL/java doesn't load in that environment.
>
> Regards
>
> David JL Gradwell, M.A. (Cantab), F.B.C.S.
> Chartered IT Professional
> Head of Consulting
> VocaLink
>
> t: +44 (0)870 920 8516
> m:+44 (0)7920 143 639
> e: david.gradwell at vocalink.com
> w: http://www.vocalink.com
>
> -----Original Message-----
> From: pljava-dev-bounces at pgfoundry.org [mailto:pljava-dev-bounces at pgfoundry.org] On Behalf Of Eric Kolotyluk
> Sent: 16 April 2011 00:41
> To: pljava-dev at pgfoundry.org
> Subject: Re: [Pljava-dev] Problem with PLJava on production machine
>
> Sorry to intrude on your discussion...
>
> Is the 64-bit verson of PL/Java for Windows 64-bit or for Postgres 64-bit.
>
> I tried getting the 32-bit version of PL/Java to run on Windows 64-bit
> with a 32-bit version of Postgres, but could not get that to work
> because the loader kept trying to link the 32-bit DLLs against 64-bit
> Windows libraries.
>
> I need to be able to run PL/Java on both 32-bit Windows and 64-bit Windows.
>
> Cheers, Eric
>
> On 2011-04-15 4:31 PM, Johann 'Myrkraverk' Oskarsson wrote:
>> Hi,
>>
>> Sorry about the delayed reply.
>>
>> On Sat, 12 Mar 2011 21:29:21 -0000, bartdeman
>> <bart.de.man at ticketmatic.com> wrote:
>>
>>> ok, finally got it working!
>>>
>>> it seems the binary from the download site did not work on my system. (i
>>> used pljava-i686-pc-linux-gnu-pg8.4-1.4.2.tar.gz)
>>>
>>> I have built my own binary from source, and that one works perfect.
>> Thank you, that may actually be helpful. The official binaries are
>> built on Ubuntu (32bit) and Debian (64bit).
>>
>> I'll see if I can get a hold of a RHEL/Centos system to test it myself
>> in the not too distant future.
>>
>>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pljava-dev
>
>
>
>
> *****************************************************
> This email is issued by a VocaLink group company. It is confidential and intended for the exclusive use of the addressee only. You should not disclose its contents to any other person. If you are not the addressee (or responsible for delivery of the message to the addressee), please notify the originator immediately by return message and destroy the original message. The contents of this email will have no contractual effect unless it is otherwise agreed between a specific VocaLink group company and the recipient.
>
> The VocaLink group companies include, among others: VocaLink Limited (Company No 06119048, VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House, Homestead Road, Rickmansworth, WD3 1FX. United Kingdom, Voca Limited (Company no 1023742, VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House, Three Rivers Court, Homestead Road, Rickmansworth, Hertfordshire. WD3 1FX. United Kingdom, LINK Interchange Network Limited (Company No 3565766, VAT No. 907 9619 87) which is registered in England and Wales at registered office Arundel House, 1 Liverpool Gardens, Worthing, West Sussex, BN11 1SL and VocaLink Holdings Limited (Company No 06119036, VAT No. 907 9619 87) which is registered in England and Wales at registered office Drake House, Homestead Road, Rickmansworth, WD3 1FX. United Kingdom.
>
> The views and opinions expressed in this email may not reflect those of any member of the VocaLink group. This message and any attachments have been scanned for viruses prior to leaving the VocaLink group network; however, VocaLink does not guarantee the security of this message and will not be responsible for any damages arising as a result of any virus being passed on or arising from any alteration of this message by a third party. The VocaLink group may monitor emails sent to and from the VocaLink group network.
>
> This message has been checked for all email viruses by MessageLabs.
> *************************************************************
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pljava-dev
^ permalink raw reply [nested|flat] 12+ messages in thread
end of thread, other threads:[~2011-04-18 08:13 UTC | newest]
Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-11 08:39 [Pljava-dev] Problem with PLJava on production machine
2011-03-11 09:10 `
2011-03-11 09:17 `
2011-03-11 10:10 `
2011-03-11 10:19 `
2011-03-11 11:20 `
2011-03-11 13:28 `
2011-03-12 21:29 `
2011-04-15 23:31 `
2011-04-15 23:41 `
2011-04-18 07:24 `
2011-04-18 08:13 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox