Message-ID: <56B7D406.5040406@anastigmatix.net> Date: Sun, 07 Feb 2016 18:32:22 -0500 From: Chapman Flack MIME-Version: 1.0 References: In-Reply-To: Subject: Re: [Pljava-dev] Possible bug in trigger annotations Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On 02/07/16 17:34, Petr Mich=E1lek wrote: > "org.postgresql.util.PSQLException: ERROR: Triggers can not have a java > parameter declaration." > = > Workaround is replace "(org.postgresql.pljava.TriggerData)" with "" in fi= le > 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@lists.pgfoundry.org http://lists.pgfoundry.org/mailman/listinfo/pljava-dev