From: | Chapman Flack <chap(at)anastigmatix(dot)net> |
---|---|
To: | |
Subject: | Re: [Pljava-dev] Possible bug in trigger annotations |
Date: | 2016-02-07 23:32:22 |
Message-ID: | 56B7D406.5040406@anastigmatix.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
On 02/07/16 17:34, Petr Michálek wrote:
> "org.postgresql.util.PSQLException: ERROR: Triggers can not have a java
> parameter declaration."
>
> Workaround is replace "(org.postgresql.pljava.TriggerData)" with "" in file
> pljava.ddr
> Please confirm the bug or tell me what I'm doing wrong.
Bug. I've opened https://github.com/tada/pljava/issues/92 for it. Thanks!
> And I have little comment to documentation. I didn't found if the javac
> generate pljava.ddr or annotation is read by deployer. For example IDE
> (Eclipse) does not generate pljava.ddr (do not know why) and I must run
> javac.
I am not sure exactly what you are asking, but as far as how pljava.ddr
is generated, it is generated by the Java compiler at the same time as
it compiles classes.
The pljava-api jar file has to be on the classpath given to the compiler,
so the compiler finds the generator class. For example, the Hello example
https://tada.github.io/pljava/use/hello.html
shows building with Maven, with pljava-api added as a dependency; that
automatically puts pljava-api's jar file on the compiler classpath.
If you run javac by hand, of course you can add that jar with -cp.
(If you do not have the separate pljava-api jar, you can point the
compiler to the full pljava jar, which also contains all the api classes.
Come to think of it, I should add pljava-api to what gets packaged in
the self-extracting jar.)
Ordinarily, you would notice if that jar were not on the classpath, because
the compiler would not find the annotation classes.
As to why Eclipse does not generate the file, I have no immediate answer.
Does Eclipse have any settings to enable/disable annotation processing?
If you find the solution before I do I'll happily add it in an Eclipse
special topic in the docs.
Even when using javac or maven, I do find it useful to do a clean before
every recompile. Otherwise, sometimes the tools will be 'smart' and
run the compiler on only some source files that have changed, and then
the generated ddr will be incomplete, containing only what was in the files
the compiler looked at. That is definitely something I should add to docs.
-Chap
_______________________________________________
Pljava-dev mailing list
Pljava-dev(at)lists(dot)pgfoundry(dot)org
http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
From | Date | Subject | |
---|---|---|---|
Next Message | Chapman Flack | 2016-02-08 00:56:15 | Re: [Pljava-dev] Possible bug in trigger annotations |
Previous Message | Petr Michálek | 2016-02-07 22:34:34 | [Pljava-dev] Possible bug in trigger annotations |