public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chapman Flack <[email protected]>
To: Kartik Ohri <[email protected]>
Cc: [email protected]
Subject: Re: Starting build-system work (Windows/Mac users please speak up)
Date: Sat, 23 May 2020 11:06:22 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAASLQ4Mbcw1-qmq9m3dJ83cE50nKcwjJAKomrjMihj7KHxcpBQ@mail.gmail.com>
References: <[email protected]>
	<CAASLQ4N0waxE9JKXjcLD=oAYz8NdgVAjBQd7FWGkuCOghFy8ng@mail.gmail.com>
	<[email protected]>
	<CAASLQ4M4rMaL3gi23+jA-sfLU5DbhN+PTr9Jw3YxmTV_0juvbg@mail.gmail.com>
	<[email protected]>
	<CAASLQ4OB0SK1bLV=N8Sxuz2dDphkYjVA2007q351m1y8mn15Dg@mail.gmail.com>
	<[email protected]>
	<CAASLQ4Mbcw1-qmq9m3dJ83cE50nKcwjJAKomrjMihj7KHxcpBQ@mail.gmail.com>

On 05/23/20 03:16, Kartik Ohri wrote:
>>
>> Also -Psaxon-examples is needed to build a set of XML examples that are
>> not built by default.
>
> ERROR: java.sql.SQLNonTransientException: Unable to find static method
> org.postgresql.pljava.example.saxon.S9.like_regex with signature
> (String,String,String,boolean)boolean
> 
> 5638
> 
> CONTEXT: SQL statement "CREATE OR REPLACE FUNCTION javatest.like_regex(

Good, good! In the 1.6 branch, PL/Java now has a validator, which will
produce an error at CREATE FUNCTION time if anything the function depends
on can't be resolved. (In 1.5, you would be able to create the function,
and only find out it didn't work later when trying to call it.)

The Saxon examples depend on the Saxon jar, which hasn't been installed
or isn't on the classpath. So there are two ways to proceed:

1. sqlj.install_jar the Saxon jar first, and sqlj.set_classpath to put
   it on the classpath, before the sqlj.install_jar of the examples jar.

   After a build completes, the needed jar will be present in the local
   Maven repository as
   .m2/repository/net/sf/saxon/Saxon-HE/*/Saxon-HE-*.jar

   The * is there for the Saxon version, which could change with time.
   In a build from a clean slate, there should be only one version there.
   If .m2/repository is being cached, it is possible from time to time
   Maven will find a later Saxon version available and download it and
   an older one will still be there, and a script would have to select
   the latest match.

2. Or, SET check_function_bodies TO off; before the sqlj.install_jar for
   the examples, and dependencies won't be checked. That will be more like
   the old 1.5 behavior, where the CREATE FUNCTION will succeed, but later
   the function won't work.

> I was unable to find this issue in Github Issues. Is this a known issue or
> should I file one on Github or is this an error due to some
> misconfiguration in the build environment ?

If the PL/Java documentation that you are reading is what is online
at https://tada.github.io/pljava/ then it's worth remembering that what
is published there is the latest *released* version's documentation,
for 1.5.5 at the moment. So there's nothing in that version about the
function validator.

As you're working on the never-yet-released 1.6.0-SNAPSHOT branch,
the best way to read the documentation is to generate it locally

  mvn  site  site:stage

and then point your browser at the local file
  target/staging/index.html

However, just at the moment the javadoc build is failing for me.
I'm quite sure it worked in February when I committed 5ee9b6b.

This is one of those moments when I do not love Maven. I'll take
a look at what's broken this time.


Regards,
-Chap





view thread (47+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Starting build-system work (Windows/Mac users please speak up)
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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