public inbox for [email protected]  
help / color / mirror / Atom feed
[Pljava-dev] Issue with SunMSCAPI jar file
3+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] Issue with SunMSCAPI jar file
@ 2010-03-29 21:44  
  0 siblings, 1 reply; 3+ messages in thread

From:  @ 2010-03-29 21:44 UTC (permalink / raw)

I'm testing out the 1.4 PL/Java version. In the code we're invoking from
Postgres, there is a setup for SSL. The whole thing runs normally outside
of Postgres.

However within Postgres, it gives the error:

ERROR:  java.lang.NoClassDefFoundError: Could not initialize class
sun.security.mscapi.SunMSCAPI

 

On the surface of it, this means sunmscapi.jar not found. But I did add
this jar file to the classpath. In any case, it is at the normal location
in the JRE installation, and since the jvm.dll from the JRE is in the
system path and seen by pl/java (simple calls without the SSL part work
fine), I assume it sees the file sunmscapi.jar as well.

 

I notice that many times, the error in PL/Java is not exactly the
underlying cause. For example when it says pljava.dll not found, it in
fact means jvm.dll is not found, and pljava.dll can't be initialized. So I
suspect it's something similar here. But without a more detailed error
message, I'm not sure how to go about a fix. Maybe sunmscapi.jar is making
use of some services that can't be found or initialized?

 

Any idea? Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100329/9e595f66/attachment.html;



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] Issue with SunMSCAPI jar file
@ 2010-03-30 06:02  
  parent: 
  0 siblings, 1 reply; 3+ messages in thread

From:  @ 2010-03-30 06:02 UTC (permalink / raw)

An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100330/82bbb5dd/attachment.html;



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] Issue with SunMSCAPI jar file
@ 2010-03-30 18:23  
  parent: 
  0 siblings, 0 replies; 3+ messages in thread

From:  @ 2010-03-30 18:23 UTC (permalink / raw)

Hi Thomas,

 

I think it's likely something in the initialization of MSCAPI that failed.
It turns out MSCAPI is just one of the many cryptographic providers for
Java (it's last in the list actually). So I commented it out (in
java.security), and the error is gone. SSL is still ok.

By doing this I probably lose out some functionalities (MS crypto
library?) but for the time being it works for me.

 

By the way I'm not sure about what you said regarding javaU. If only
untrusted Java can open sockets and access files, that seems
counter-intuitive to me. My code to open sockets has 'java' as the
language, and it seems to work just fine.

 

Thang

 

From: pljava-dev-bounces at pgfoundry.org
[mailto:pljava-dev-bounces at pgfoundry.org] On Behalf Of Thomas Hallgren
Sent: Monday, March 29, 2010 11:02 PM
To: pljava-dev at pgfoundry.org
Subject: Re: [Pljava-dev] Issue with SunMSCAPI jar file

 

Hi Thang,
A NoClassDefFoundError is usually an indication that the class in question
indeed is found but something that it depends on is missing or cannot
initialize. Perhaps an external access is attempted when this happens?
PL/Java will prevent the process from opening sockets and access files in
the file system unless you run it as a non trusted ( javaU ) language.

HTH,
Thomas Hallgren


On 03/29/2010 11:44 PM, Thang Le wrote: 

I'm testing out the 1.4 PL/Java version. In the code we're invoking from
Postgres, there is a setup for SSL. The whole thing runs normally outside
of Postgres.

However within Postgres, it gives the error:

ERROR:  java.lang.NoClassDefFoundError: Could not initialize class
sun.security.mscapi.SunMSCAPI

 

On the surface of it, this means sunmscapi.jar not found. But I did add
this jar file to the classpath. In any case, it is at the normal location
in the JRE installation, and since the jvm.dll from the JRE is in the
system path and seen by pl/java (simple calls without the SSL part work
fine), I assume it sees the file sunmscapi.jar as well.

 

I notice that many times, the error in PL/Java is not exactly the
underlying cause. For example when it says pljava.dll not found, it in
fact means jvm.dll is not found, and pljava.dll can't be initialized. So I
suspect it's something similar here. But without a more detailed error
message, I'm not sure how to go about a fix. Maybe sunmscapi.jar is making
use of some services that can't be found or initialized?

 

Any idea? Thanks!

 
 
_______________________________________________
Pljava-dev mailing list
Pljava-dev at pgfoundry.org
http://pgfoundry.org/mailman/listinfo/pljava-dev

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100330/23cb3fb2/attachment.html;




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2010-03-30 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29 21:44 [Pljava-dev] Issue with SunMSCAPI jar file 
2010-03-30 06:02 ` 
2010-03-30 18:23   ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox