Yeah the v5.2
<https://github.com/etiennestuder/gradle-jooq-plugin/tree/v5.2> is the
plugin version. In their release they wrote -> *Upgrades to jOOQ 3.13.5 *
I tried exactly this
version = project.ext.get('jooq.version') // '3.14.1
but i think there is an issue with xml code generation. It complains the
xml is not valid. Then i did
configurations['classpath'].resolutionStrategy.eachDependency {
if (requested.group == 'org.jooq') {
useVersion '3.14.1'
}
}
Then the generation works but it generates the wrong java code.
When i am using 3.15.3 without anything it works like a charme
[email protected] schrieb am Dienstag, 10. November 2020 um 16:00:58 UTC+1:
> From what I can tell from their documentation, there are two versions that
> you can specify. The one you specified affects only code generation (I
> think?)
>
> The other one can be seen here:
> https://github.com/etiennestuder/gradle-jooq-plugin#gradle-groovy-dsl-2
>
> So, this one:
> version = project.ext.get('jooq.version')
> On Tue, Nov 10, 2020 at 3:55 PM Patrick Brunmayr <[email protected]>
> wrote:
>
>> I just copy the generated sources into a project folder. Then when i
>> wanted to compile it got those errors.
>>
>> Maybe a future version of this plugin will handle a newer jooq version?
>>
>> [email protected] schrieb am Dienstag, 10. November 2020 um 15:34:16
>> UTC+1:
>>
>>> Thanks for your update. That looks correct as far as the code generation
>>> is concerned. But how do you compile the generated output?
>>>
>>> On Tue, Nov 10, 2020 at 3:17 PM Patrick Brunmayr <[email protected]>
>>> wrote:
>>>
>>>> The gradle configuration
>>>>
>>>> jooq {
>>>> version = project.ext.get('jooq.version')
>>>> edition = nu.studer.gradle.jooq.JooqEdition.PRO
>>>> configurations {
>>>> main { // name of the jOOQ configuration
>>>> generateSchemaSourceOnCompilation = true // default (can be
>>>> omitted)
>>>>
>>>> generationTool {
>>>> logging = org.jooq.meta.jaxb.Logging.WARN
>>>> jdbc {
>>>> driver = 'oracle.jdbc.driver.OracleDriver'
>>>> url =
>>>> 'jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=atlogoracletest.pbs.local)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=
>>>> PRBPDE.db.logitek.at)))'
>>>> user = 'PRICING_BPDE'
>>>> password = 'PRICING_BPDE'
>>>> }
>>>> generator {
>>>> name = 'org.jooq.codegen.DefaultGenerator'
>>>> database {
>>>> name = 'org.jooq.meta.oracle.OracleDatabase'
>>>> inputSchema = 'PRICING_BPDE'
>>>> outputSchemaToDefault = true
>>>> includes = ['API_CLIENT', 'API_CLIENT_PRICE_TYPE',
>>>> 'API_CLIENT_SCOPE', 'API_CONSUMER', 'API_SCOPE', 'CUSTOMER',
>>>> 'CUSTOMER_ACE', 'CUSTOMER_PRICE_CONTAINER',
>>>> 'CUSTOMER_PRICE_CONTAINER_ACE',
>>>> 'CUSTOMER_PRICE_CONTAINER_URN', 'CUSTOMER_URN', 'DEALER', 'DEALER_ACE',
>>>> 'DEALER_PRODUCT_CATALOG', 'DEALER_PRODUCT_CATALOG_ACE',
>>>> 'DEALER_PRODUCT_CATALOG_URN', 'DEALER_URN', 'PRICE',
>>>> 'PRICE_CALCULATION_TYPE', 'PRICE_CONTAINER', 'PRICE_CONTAINER_ACE',
>>>> 'PRICE_CONTAINER_URN', 'PRICE_TYPE', 'PRICE_TYPE_URN', 'PRICE_URN',
>>>> 'PRODUCT', 'PRODUCT_ACE', 'PRODUCT_CATALOG', 'PRODUCT_CATALOG_ACE',
>>>> 'PRODUCT_CATALOG_PRODUCT', 'PRODUCT_CATALOG_PRODUCT_URN',
>>>> 'PRODUCT_CATALOG_URN', 'PRODUCT_URN'].join("|")
>>>> }
>>>> generate {
>>>> deprecated = false
>>>> records = true
>>>> immutablePojos = false
>>>> fluentSetters = false
>>>> }
>>>> target {
>>>> packageName =
>>>> 'at.logitek.pricing.model.core.persistence.jooq'
>>>> directory = 'build/generated-src/jooq/main' // default (can
>>>> be omitted)
>>>> }
>>>> strategy.name = 'org.jooq.codegen.DefaultGeneratorStrategy'
>>>> }
>>>> }
>>>> }
>>>> }
>>>> }
>>>>
>>>> Patrick Brunmayr schrieb am Dienstag, 10. November 2020 um 15:13:37
>>>> UTC+1:
>>>>
>>>>> jooqGenerator - The classpath used to invoke the jOOQ code generator.
>>>>> Add your JDBC driver, generator extensions, and additional dependencies
>>>>> here.
>>>>> +--- org.jooq:jooq-codegen -> org.jooq.pro:jooq-codegen:3.14.1
>>>>> | +--- org.jooq.pro:jooq:3.14.1
>>>>> | | +--- org.reactivestreams:reactive-streams:1.0.2 -> 1.0.3
>>>>> | | \--- javax.xml.bind:jaxb-api:2.3.1
>>>>> | | \--- javax.activation:javax.activation-api:1.2.0
>>>>> | \--- org.jooq.pro:jooq-meta:3.14.1
>>>>> | \--- org.jooq.pro:jooq:3.14.1 (*)
>>>>>
>>>>>
>>>>> Patrick Brunmayr schrieb am Dienstag, 10. November 2020 um 15:10:15
>>>>> UTC+1:
>>>>>
>>>>>> *When i run it i get this*
>>>>>>
>>>>>> cvc-complex-type.2.4.a: Ung�ltiger Content wurde beginnend mit
>>>>>> Element
>>>>>> '{"http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":primaryKeyTypes}'
>>>>>> gefunden.
>>>>>> '{"http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":generatedAnnotationDate,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":constructorPropertiesAnnotation,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":constructorPropertiesAnnotationOnPojos,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":constructorPropertiesAnnotationOnRecords,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":pojosAsJavaRecordClasses,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":pojosAsScalaCaseClasses,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":pojosAsKotlinDataClasses,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":jpaVersion, "
>>>>>> http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":globalDomainReferences,
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":commentsOnEmbeddables,
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":generatedSerialVersionUID,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":maxMembersPerInitialiser,
>>>>>>
>>>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":newline, "
>>>>>> http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd":indentation}' wird
>>>>>> erwartet.
>>>>>>
>>>>>> i added this
>>>>>>
>>>>>> configurations['classpath'].resolutionStrategy.eachDependency {
>>>>>> if (requested.group == 'org.jooq') {
>>>>>> useVersion '3.14.1'
>>>>>> }
>>>>>> }
>>>>>>
>>>>>>
>>>>>> Patrick Brunmayr schrieb am Dienstag, 10. November 2020 um 15:07:08
>>>>>> UTC+1:
>>>>>>
>>>>>>> I downloaded the enterprise version, installed it in my local maven
>>>>>>> and tried to use it from gradle script so there is no other dependency
>>>>>>>
>>>>>>>
>>>>>>> [email protected] schrieb am Dienstag, 10. November 2020 um
>>>>>>> 15:02:49 UTC+1:
>>>>>>>
>>>>>>>> Hi Patrick,
>>>>>>>>
>>>>>>>> Thanks for your message.
>>>>>>>>
>>>>>>>> There hasn't been any such fix in jOOQ 3.14.3. But I don't think we
>>>>>>>> have such a problem, currently. The most likely reason why you're
>>>>>>>> seeing
>>>>>>>> this kind of compilation error is because you're generating code with
>>>>>>>> jOOQ
>>>>>>>> version X and trying to compile it with an older jOOQ version Y. This
>>>>>>>> can
>>>>>>>> happen, for example, due to a transitive dependency that you might be
>>>>>>>> using
>>>>>>>> via Spring Boot or some other framework. If you're using Maven, please
>>>>>>>> check "mvn dependency:tree" to see the jOOQ version, see also:
>>>>>>>>
>>>>>>>> https://blog.jooq.org/2019/06/26/how-to-use-jooqs-commercial-distributions-with-spring-boot/
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Lukas
>>>>>>>>
>>>>>>>> On Tue, Nov 10, 2020 at 2:58 PM Patrick Brunmayr <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> So it seems it got fixed in 3.14.3 ?
>>>>>>>>>
>>>>>>>>> Patrick Brunmayr schrieb am Dienstag, 10. November 2020 um
>>>>>>>>> 14:50:40 UTC+1:
>>>>>>>>>
>>>>>>>>>> *Following DDL given*
>>>>>>>>>>
>>>>>>>>>> CREATE TABLE API_CLIENT
>>>>>>>>>> (
>>>>>>>>>> ID RAW(16) NOT NULL
>>>>>>>>>> , API_CONSUMER_ID RAW(16) NOT NULL
>>>>>>>>>> , APP_ID VARCHAR2(256 CHAR) NOT NULL
>>>>>>>>>> , ACTIVE NUMBER(*, 0) DEFAULT 1 NOT NULL
>>>>>>>>>> , LAST_MODIFIED TIMESTAMP(6) NOT NULL
>>>>>>>>>> , PRICING_DOMAIN VARCHAR2(256 CHAR) NOT NULL
>>>>>>>>>> , TRUSTED NUMBER(*, 0) DEFAULT 0 NOT NULL
>>>>>>>>>> , NAME VARCHAR2(128 CHAR)
>>>>>>>>>> , CREATED TIMESTAMP(6) NOT NULL
>>>>>>>>>> )
>>>>>>>>>>
>>>>>>>>>> will create this field in the Table
>>>>>>>>>>
>>>>>>>>>> public final TableField<ApiClientRecord, LocalDateTime> CREATED =
>>>>>>>>>> createField(DSL.name("CREATED"), SQLDataType.LOCALDATETIME
>>>>>>>>>> (6).nullable(false), this, "");
>>>>>>>>>>
>>>>>>>>>> *which leads to error*
>>>>>>>>>>
>>>>>>>>>> error: cannot find symbol
>>>>>>>>>> public final TableField<ApiClientRecord, LocalDateTime>
>>>>>>>>>> LAST_MODIFIED = createField(DSL.name("LAST_MODIFIED"),
>>>>>>>>>> SQLDataType.LOCALDATETIME(6).nullable(false), this, "");
>>>>>>>>>>
>>>>>>>>>> ^
>>>>>>>>>> symbol: method LOCALDATETIME(int)
>>>>>>>>>> location: class SQLDataType
>>>>>>>>>>
>>>>>>>>>> It seems there is no matching constructor with a precision. How
>>>>>>>>>> to fix this?
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "jOOQ User Group" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to [email protected].
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>> https://groups.google.com/d/msgid/jooq-user/58b1849d-a83f-4e05-baba-6ab0b550430an%40googlegroups.com
>>>>>>>>>
>>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/58b1849d-a83f-4e05-baba-6ab0b550430an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "jOOQ User Group" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>>
>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/jooq-user/d6bda473-48f9-4d7d-8522-7b8dcd80155fn%40googlegroups.com
>>>>
>>>> <https://groups.google.com/d/msgid/jooq-user/d6bda473-48f9-4d7d-8522-7b8dcd80155fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jooq-user/375150ae-500b-4507-af08-f9b6ce7c0d4bn%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jooq-user/375150ae-500b-4507-af08-f9b6ce7c0d4bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/96316444-15b1-49a6-bb8b-058ae8605e19n%40googlegroups.com.