agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] Deployment Descriptor Problem
9+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-06 19:48
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
0 siblings, 1 reply; 9+ messages in thread
From: @ 2006-10-06 19:48 UTC (permalink / raw)
Hi,
I cannot get install_jar() to read/execute by Deployment Descriptor. I
have tried many different ways to get this to work and all have failed. I
am using:
PL/Java 1.3.0
PostGreSQL 8.1.0.
Java 1.5.07
My jar contains the following files:
---------------------------------------------------------------------------
> jar -tvf VinDecoder.jar
0 Fri Oct 06 15:27:56 EDT 2006 META-INF/
137 Fri Oct 06 15:27:58 EDT 2006 META-INF/MANIFEST.MF
0 Fri Oct 06 15:27:34 EDT 2006 com/
0 Fri Oct 06 15:27:34 EDT 2006 com/sg/
0 Fri Oct 06 15:27:36 EDT 2006 com/sg/vin/
536 Fri Oct 06 15:27:36 EDT 2006 com/sg/vin/VinDecoderTest.java
448 Fri Oct 06 15:27:36 EDT 2006 com/sg/vin/VinDecoderException.class
1160 Fri Oct 06 15:27:36 EDT 2006 com/sg/vin/VinDecoder.class
374 Fri Oct 06 15:27:36 EDT 2006 com/sg/vin/VinDecoderException.java
828 Fri Oct 06 15:27:36 EDT 2006 com/sg/vin/VinDecoder.java
1078 Fri Oct 06 15:27:36 EDT 2006 com/sg/vin/VinDecoderTest.class
0 Fri Oct 06 15:27:36 EDT 2006 deployment/
268 Fri Oct 06 15:27:36 EDT 2006 deployment/VinDecoder.ddr
My manifest looks like this:
---------------------------------------------------------------------------
Name: deployment/VinDecoder.ddr
SQLJDeploymentDescriptor: TRUE
My VinDecoder.ddr file contains:
---------------------------------------------------------------------------
SQLActions[] = {
"BEGIN INSTALL
CREATE FUNCTION getVinInfo(VARCHAR)
RETURNS VARCHAR
AS 'com.sg.vin.VinDecoder.getVinInfo(java.lang.String)'
LANGUAGE java;
END INSTALL",
"BEGIN REMOVE
DROP FUNCTION getVinInfo();
END REMOVE"
}
When I install using the following command:
---------------------------------------------------------------------------
select sqlj.install_jar('file:/my/dir/VinDecoder.jar', 'VinDecoder', true);
The result is:
---------------------------------------------------------------------------
-- Executing query:
select sqlj.install_jar('file:/home/jross/VinDecoder.jar', 'VinDecoder',
true);
Total query runtime: 32 ms.
1 rows retrieved.
I see no errors in the postgres log file. Please help!! I have no idea why
this will not read/use my Deployment Descriptor.
Thanks!
-Joshua-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061006/b3dce190/attachment.html;
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-09 06:37 `
2006-10-09 06:44 ` [Pljava-dev] Deployment Descriptor Problem
0 siblings, 1 reply; 9+ messages in thread
From: @ 2006-10-09 06:37 UTC (permalink / raw)
Hi, Joshua Ross,
Joshua Ross wrote:
> My manifest looks like this:
> ---------------------------------------------------------------------------
> Name: deployment/VinDecoder.ddr
> SQLJDeploymentDescriptor: TRUE
When looking at the examples.jar built with pljava, it looks like this:
----
Manifest-Version: 1.0
Name: deployment/examples.ddr
SQLJDeploymentDescriptor: TRUE
----
Did you try to add the Manifest-Version: statement, including the blank
line?
When looking at the Manifest Specification from SUN, it seems that the
Version descriptor is mandatory:
<http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR Manifest>
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061009/0d655781/attachment.bin;
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-09 06:44 `
2006-10-09 15:18 ` [Pljava-dev] Deployment Descriptor Problem
0 siblings, 1 reply; 9+ messages in thread
From: @ 2006-10-09 06:44 UTC (permalink / raw)
Hi, Josh,
Markus Schaber wrote:
> When looking at the examples.jar built with pljava, it looks like this:
It seems that my mailer has somehow broken the linefeeds, the corrected
version is here:
> ----
> Manifest-Version: 1.0
>
> Name: deployment/examples.ddr
> SQLJDeploymentDescriptor: TRUE
> ----
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061009/f86f9947/attachment.bin;
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:44 ` [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-09 15:18 `
2006-10-10 08:15 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-15 08:38 ` [Pljava-dev] Deployment Descriptor Problem
0 siblings, 2 replies; 9+ messages in thread
From: @ 2006-10-09 15:18 UTC (permalink / raw)
Hi Markus,
Thanks for the help and suggestions!
Ok, changed my mainfest to:
-------------------------------------------------------------
> cat mainClass
Mainifest-Version: 1.0
Name: deployment/VinDecoder.ddr
SQLJDeploymentDescriptor: TRUE
Main-Class: VinDecoderTest
I tested this and it failed to read/execute my DeploymentDescriptor file.
So I started double checking some things and I found that if I extract the
manifest from the JAR it seems Java automatically puts those headers into
the manifest during packaging:
-------------------------------------------------------------
> jar xvf VinDecoder.jar META-INF/MANIFEST.MF
inflated: META-INF/MANIFEST.MF
> cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.5.0_07 (Sun Microsystems Inc.)
Main-Class: VinDecoderTest
SQLJDeploymentDescriptor: TRUE
Mainifest-Version: 1.0
Name: deployment/VinDecoder.ddr
What isn't very good here is that the order in which the Name and
SQLJDeploymentDescriptor are listed. So I updated the manifest in the file
to be like this(including blank line at the end of the file):
------------------------------------------------------------------------
Manifest-Version: 1.0
Created-By: 1.5.0_07 (Sun Microsystems Inc.)
Main-Class: VinDecoderTest
SQLJDeploymentDescriptor: TRUE
Name: deployment/VinDecoder.ddr
And then updated the manifest in the jar file:
------------------------------------------------------------------------
> jar uvmf META-INF/MANIFEST.MF VinDecoder.jar
updated manifest
This still failed to correctly read/execute my DeploymentDescriptor file.
:(
I tried several different variations on the manifest file and could not get
this to work. Help!?
Thanks,
-Joshua-
On 10/9/06, Markus Schaber <schabi at logix-tt.com> wrote:
>
> Hi, Josh,
>
> Markus Schaber wrote:
> > When looking at the examples.jar built with pljava, it looks like this:
>
> It seems that my mailer has somehow broken the linefeeds, the corrected
> version is here:
>
> > ----
> > Manifest-Version: 1.0
> >
> > Name: deployment/examples.ddr
> > SQLJDeploymentDescriptor: TRUE
> > ----
>
>
>
> --
> Markus Schaber | Logical Tracking&Tracing International AG
> Dipl. Inf. | Software Development GIS
>
> Fight against software patents in Europe! www.ffii.org
> www.nosoftwarepatents.org
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061009/d6ec384b/attachment.html;
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:44 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 15:18 ` [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-10 08:15 `
2006-10-15 08:38 ` [Pljava-dev] Deployment Descriptor Problem
1 sibling, 1 reply; 9+ messages in thread
From: @ 2006-10-10 08:15 UTC (permalink / raw)
Joshua Ross wrote:
> What isn't very good here is that the order in which the Name and
> SQLJDeploymentDescriptor are listed. So I updated the manifest in the
> file to be like this(including blank line at the end of the file):
> ------------------------------------------------------------------------
> Manifest-Version: 1.0
> Created-By: 1.5.0_07 (Sun Microsystems Inc.)
> Main-Class: VinDecoderTest
> SQLJDeploymentDescriptor: TRUE
> Name: deployment/VinDecoder.ddr
>
The order of your entries is wrong. The 'Name' entry must come before the entries that
applies to that named entry (in this case the SQLJDeploymentDescriptor). The MANIFEST.MF
suggested by Markus is correct:
> > ----
> > Manifest-Version: 1.0
> >
> > Name: deployment/examples.ddr
> > SQLJDeploymentDescriptor: TRUE
> > ----
>
>
Kind Regards,
Thomas Hallgren
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:44 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 15:18 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-10 08:15 ` [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-15 08:38 `
2006-10-16 19:00 ` [Pljava-dev] Deployment Descriptor Problem
0 siblings, 1 reply; 9+ messages in thread
From: @ 2006-10-15 08:38 UTC (permalink / raw)
Hi, Joshua,
Thomas Hallgren wrote:
> The order of your entries is wrong. The 'Name' entry must come before the entries that
> applies to that named entry (in this case the SQLJDeploymentDescriptor). The MANIFEST.MF
> suggested by Markus is correct:
>
>> > ----
>> > Manifest-Version: 1.0
>> >
>> > Name: deployment/examples.ddr
>> > SQLJDeploymentDescriptor: TRUE
>> > ----
Also, don't omit the empty line, which divides Header and Body.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061015/a55ab0db/attachment.bin;
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:44 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 15:18 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-10 08:15 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-15 08:38 ` [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-16 19:00 `
0 siblings, 0 replies; 9+ messages in thread
From: @ 2006-10-16 19:00 UTC (permalink / raw)
Ok, not ommitting the empty line corrected the manifest "reorganization"
that I was seeing when creating the jar. My manifest before jar creation:
> cat mainClass
-------------------------------------------------------------------------------------------
Manifest-Version: 1.0
Name: deployment/VinDecoder.ddr
SQLJDeploymentDescriptor: TRUE
And inside the jar it is:
-------------------------------------------------------------------------------------------
> jar xvf VinDecoder.jar META-INF/MANIFEST.MF
inflated: META-INF/MANIFEST.MF
> cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.5.0_07 (Sun Microsystems Inc.)
Name: deployment/VinDecoder.ddr
SQLJDeploymentDescriptor: TRUE
However, my deployment descriptor still was not read/executed during
install. My deployment descriptor is:
> cat deployment/VinDecoder.ddr
SQLActions[] = {
"BEGIN INSTALL
CREATE FUNCTION getVinInfo(VARCHAR)
RETURNS VARCHAR
AS 'com.sg.vin.VinDecoder.getVinInfo(java.lang.String)'
LANGUAGE java;
END INSTALL",
"BEGIN REMOVE
DROP FUNCTION getVinInfo(VARCHAR);
END REMOVE"
}
I am expecting to see something about it in the console when I install the
jar but I don't. The results of the installation are shown below:
-- Executing query:
select sqlj.install_jar('file:/home/jross/VinDecoder/VinDecoder.jar',
'VinDecoder', true);
Total query runtime: 297 ms.
1 rows retrieved.
After adding the classpath if I try to execute the function it does not
exist and I get this error message.
ERROR: function getvininfo(character varying) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You may need to
add explicit type casts.
I think I have everything correct per our previous emails so I am still
confused why this deployment descriptor will not work. Do I need to use a
different jar creator?
Thanks!
-Joshua-
On 10/15/06, Markus Schaber <schabi at logix-tt.com> wrote:
>
> Hi, Joshua,
>
> Thomas Hallgren wrote:
>
> > The order of your entries is wrong. The 'Name' entry must come before
> the entries that
> > applies to that named entry (in this case the SQLJDeploymentDescriptor).
> The MANIFEST.MF
> > suggested by Markus is correct:
> >
> >> > ----
> >> > Manifest-Version: 1.0
> >> >
> >> > Name: deployment/examples.ddr
> >> > SQLJDeploymentDescriptor: TRUE
> >> > ----
>
> Also, don't omit the empty line, which divides Header and Body.
> HTH,
> Markus
> --
> Markus Schaber | Logical Tracking&Tracing International AG
> Dipl. Inf. | Software Development GIS
>
> Fight against software patents in Europe! www.ffii.org
> www.nosoftwarepatents.org
>
>
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061016/38994b88/attachment.html;
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:44 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 15:18 ` [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-15 08:38 `
2006-10-16 18:42 ` [Pljava-dev] Deployment Descriptor Problem
1 sibling, 1 reply; 9+ messages in thread
From: @ 2006-10-15 08:38 UTC (permalink / raw)
Hi, Joshua,
Joshua Ross wrote:
> So I started double checking some things and I found that if I
> extract the manifest from the JAR it seems Java automatically puts those
> headers into the manifest during packaging:
Which tool do you use to create the jar? Do you use any auto-magic options?
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061015/a0e6d126/attachment.bin;
^ permalink raw reply [nested|flat] 9+ messages in thread
* [Pljava-dev] Deployment Descriptor Problem
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:44 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-09 15:18 ` [Pljava-dev] Deployment Descriptor Problem
2006-10-15 08:38 ` [Pljava-dev] Deployment Descriptor Problem
@ 2006-10-16 18:42 `
0 siblings, 0 replies; 9+ messages in thread
From: @ 2006-10-16 18:42 UTC (permalink / raw)
No, command line creation, i.e.
> jar cvmf mainClass VinDecoder.jar com doc deployment
added manifest
adding: com/(in = 0) (out= 0)(stored 0%)
adding: com/sg/(in = 0) (out= 0)(stored 0%)
...
...
On 10/15/06, Markus Schaber <schabi at logix-tt.com> wrote:
>
> Hi, Joshua,
>
> Joshua Ross wrote:
> > So I started double checking some things and I found that if I
> > extract the manifest from the JAR it seems Java automatically puts those
> > headers into the manifest during packaging:
>
> Which tool do you use to create the jar? Do you use any auto-magic
> options?
>
>
> HTH,
> Markus
> --
> Markus Schaber | Logical Tracking&Tracing International AG
> Dipl. Inf. | Software Development GIS
>
> Fight against software patents in Europe! www.ffii.org
> www.nosoftwarepatents.org
>
>
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20061016/c0b298e5/attachment.html;
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2006-10-16 19:00 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-06 19:48 [Pljava-dev] Deployment Descriptor Problem
2006-10-09 06:37 `
2006-10-09 06:44 `
2006-10-09 15:18 `
2006-10-10 08:15 `
2006-10-15 08:38 `
2006-10-16 19:00 `
2006-10-15 08:38 `
2006-10-16 18:42 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox