I'll try this fix and see if I can switch to 3.14.

I'm happy to report that the problem in the title and at the origin of this 
discussion has been fixed with https://github.com/jOOQ/jOOQ/issues/10928.

As a side note, I suspect there is an occasional tendency of jOOQ to 
swallow exceptions and, in so doing, obfuscating the problems. This is one 
case: I got no exception in my application, only in the MCVE. Running my 
application, what I saw was that a field was "null" when it should have not 
been. It was fetched, an exception was thrown during the mapping, but I had 
no trace of it.

Another problem that I currently have, is that, if I run several concurrent 
read-only transactions, many of them will fail. But if I run the same 
multi-step queries without placing them inside a transaction (it's not 
really needed, at this moment, it's just future-proofing), they work just 
fine. When debugging the transaction, I see there is an exception 
somewhere, but I still have to manage put my hands on the original one: I 
just see successive, generic, exceptions thrown by jOOQ. More on this topic 
in future.

Thanks again for helping me!

Maurizio.

On Wednesday, 11 November 2020 at 13:53:45 UTC+1 [email protected] wrote:

> I'm looking into this again now, because someone else seems to have had 
> the same issue:
> https://groups.google.com/g/jooq-user/c/pGuWEt-q8Es
>
> The answer seems to be here:
> https://github.com/etiennestuder/gradle-jooq-plugin#gradle-groovy-dsl-3
>
> Things work when I add
>
> buildscript {
>
>     configurations['classpath'].resolutionStrategy.eachDependency {
>         if (requested.group == 'org.jooq') {
>             useVersion '3.14.3'
>         }
>     }
> }
>
> Some additional inspiration 
> here:https://github.com/etiennestuder/gradle-jooq-plugin/blob/master/example/specify_jooq_config_xml_schema_version/build.gradle
>
> I'll be happy to look into further issues, but again, showing what you did 
> *exactly* will be very helpful in helping you debug your issues.
>
> Thanks,
> Lukas
>
> On Fri, Nov 6, 2020 at 6:25 PM Maurizio <[email protected]> wrote:
>
>> I'm configuring jOOQ using the gradle plugin 
>>
>> *id 'nu.studer.jooq' version '5.2'*
>>
>> It should be the latest version (
>> https://plugins.gradle.org/plugin/nu.studer.jooq). Can it be used with 
>> 3.14.1?
>>
>> This is the XML configuration file that is generated.
>>
>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>> <configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.13.0.xsd";>
>> <logging>WARN</logging>
>> <onError>FAIL</onError>
>> <jdbc>
>> <driver>org.postgresql.Driver</driver>
>> <url>jdbc:postgresql://localhost:****/******************</url>
>> <user>***********</user>
>> <password>***********</password>
>> <properties>
>> <property>
>> <key>ssl</key>
>> <value>true</value>
>> </property>
>> <property>
>> <key>sslmode</key>
>> <value>require</value>
>> </property>
>> </properties>
>> </jdbc>
>> <generator>
>> <name>org.jooq.codegen.DefaultGenerator</name>
>> <strategy>
>> <name>org.jooq.codegen.DefaultGeneratorStrategy</name>
>> </strategy>
>> <database>
>> <name>org.jooq.meta.postgres.PostgresDatabase</name>
>> <regexMatchesPartialQualification>true</regexMatchesPartialQualification>
>> <sqlMatchesPartialQualification>true</sqlMatchesPartialQualification>
>> <includes>.*</includes>
>> <excludes></excludes>
>> <includeExcludeColumns>false</includeExcludeColumns>
>> <includeTables>true</includeTables>
>> <includeEmbeddables>true</includeEmbeddables>
>> <includeRoutines>true</includeRoutines>
>> <includeTriggerRoutines>false</includeTriggerRoutines>
>> <includePackages>true</includePackages>
>> <includePackageRoutines>true</includePackageRoutines>
>> <includePackageUDTs>true</includePackageUDTs>
>> <includePackageConstants>true</includePackageConstants>
>> <includeUDTs>true</includeUDTs>
>> <includeSequences>true</includeSequences>
>> <includeIndexes>true</includeIndexes>
>> <includePrimaryKeys>true</includePrimaryKeys>
>> <includeUniqueKeys>true</includeUniqueKeys>
>> <includeForeignKeys>true</includeForeignKeys>
>> <includeCheckConstraints>true</includeCheckConstraints>
>> <includeSystemIndexes>false</includeSystemIndexes>
>> <includeSystemCheckConstraints>false</includeSystemCheckConstraints>
>> <includeInvisibleColumns>true</includeInvisibleColumns>
>> <recordVersionFields></recordVersionFields>
>> <recordTimestampFields></recordTimestampFields>
>> <syntheticIdentities></syntheticIdentities>
>> <syntheticPrimaryKeys></syntheticPrimaryKeys>
>> <overridePrimaryKeys></overridePrimaryKeys>
>> <dateAsTimestamp>false</dateAsTimestamp>
>> <ignoreProcedureReturnValues>false</ignoreProcedureReturnValues>
>> <unsignedTypes>true</unsignedTypes>
>> <integerDisplayWidths>true</integerDisplayWidths>
>> <inputCatalog></inputCatalog>
>> <outputCatalogToDefault>false</outputCatalogToDefault>
>> <inputSchema>public</inputSchema>
>> <outputSchemaToDefault>false</outputSchemaToDefault>
>> <schemaVersionProvider></schemaVersionProvider>
>> <catalogVersionProvider></catalogVersionProvider>
>> <orderProvider></orderProvider>
>>
>> <forceIntegerTypesOnZeroScaleDecimals>true</forceIntegerTypesOnZeroScaleDecimals>
>> <logSlowQueriesAfterSeconds>5</logSlowQueriesAfterSeconds>
>> <logSlowResultsAfterSeconds>5</logSlowResultsAfterSeconds>
>> <forcedTypes>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.ProjectId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidProjectIdConverter
>> </converter>
>> <includeExpression>.*\..*project_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.UserId</userType>
>> <converter>x.y.z.studio.database_entities.converters.UuidUserIdConverter
>> </converter>
>> <includeExpression>.*\..*user_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.ArrangementId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidArrangementIdConverter
>> </converter>
>> <includeExpression>.*\..*arrangement_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.ArrangementVersionId</userType>
>> <converter>
>>
>> x.y.z.studio.database_entities.converters.UuidArrangementVersionIdConverter
>> </converter>
>> <includeExpression>.*\..*arrangement_version_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.audio.rhythm.BarIndex</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.IntBarIndexConverter
>> </converter>
>> <includeExpression>.*\..*bar_index.*</includeExpression>
>> <includeTypes>integer</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.RhythmicAnalysisId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidAnalyzedTrackIdConverter
>> </converter>
>> <includeExpression>.*\..*rhythmic_analysis_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.ArrangementTrackId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidArrangementTrackIdConverter
>> </converter>
>> <includeExpression>.*\..*arrangement_track_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.audio.TrackId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidTrackIdConverter
>> </converter>
>> <includeExpression>.*\..*track_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.BeatsId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidBeatsIdConverter
>> </converter>
>> <includeExpression>.*\..*beats_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.BarsId</userType>
>> <converter>x.y.z.studio.database_entities.converters.UuidBarsIdConverter
>> </converter>
>> <includeExpression>.*\..*bars_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.ClipId</userType>
>> <converter>x.y.z.studio.database_entities.converters.UuidClipIdConverter
>> </converter>
>> <includeExpression>.*\..*clip_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.ClipFolderId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidClipFolderIdConverter
>> </converter>
>> <includeExpression>.*\..*clip_folder_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.studio.identifiers.ProcessingRequestId</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.UuidProcessingRequestIdConverter
>> </converter>
>> <includeExpression>.*\..*processing_request_id.*</includeExpression>
>> <includeTypes>uuid</includeTypes>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>x.y.z.color.Color</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.StringColorConverter
>> </converter>
>> <includeExpression>.*\..*color.*</includeExpression>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> <forcedType>
>> <userType>java.time.Instant</userType>
>> <converter>
>> x.y.z.studio.database_entities.converters.OffsetDateTimeInstantConverter
>> </converter>
>> <includeExpression>.*\..*creation_timestamp.*</includeExpression>
>> <nullability>ALL</nullability>
>> <objectType>ALL</objectType>
>> </forcedType>
>> </forcedTypes>
>> </database>
>> <generate>
>> <indexes>true</indexes>
>> <relations>true</relations>
>> <sequenceFlags>true</sequenceFlags>
>> <implicitJoinPathsToOne>true</implicitJoinPathsToOne>
>> <deprecated>false</deprecated>
>> <deprecationOnUnknownTypes>true</deprecationOnUnknownTypes>
>> <instanceFields>true</instanceFields>
>> <generatedAnnotation>false</generatedAnnotation>
>> <generatedAnnotationType>DETECT_FROM_JDK</generatedAnnotationType>
>> <nonnullAnnotation>false</nonnullAnnotation>
>> <nonnullAnnotationType>javax.annotation.Nonnull</nonnullAnnotationType>
>> <nullableAnnotation>false</nullableAnnotation>
>> <nullableAnnotationType>javax.annotation.Nullable</nullableAnnotationType>
>> <routines>true</routines>
>> <sequences>true</sequences>
>> <udts>true</udts>
>> <queues>true</queues>
>> <links>true</links>
>> <keys>true</keys>
>> <tables>true</tables>
>> <embeddables>true</embeddables>
>> <records>true</records>
>> <recordsImplementingRecordN>true</recordsImplementingRecordN>
>> <pojos>true</pojos>
>> <pojosEqualsAndHashCode>false</pojosEqualsAndHashCode>
>> <pojosToString>true</pojosToString>
>> <immutablePojos>false</immutablePojos>
>> <serializablePojos>true</serializablePojos>
>> <interfaces>false</interfaces>
>> <immutableInterfaces>false</immutableInterfaces>
>> <serializableInterfaces>true</serializableInterfaces>
>> <daos>false</daos>
>> <jpaAnnotations>false</jpaAnnotations>
>> <validationAnnotations>false</validationAnnotations>
>> <springAnnotations>false</springAnnotations>
>> <globalObjectReferences>true</globalObjectReferences>
>> <globalCatalogReferences>true</globalCatalogReferences>
>> <globalSchemaReferences>true</globalSchemaReferences>
>> <globalTableReferences>true</globalTableReferences>
>> <globalSequenceReferences>true</globalSequenceReferences>
>> <globalUDTReferences>true</globalUDTReferences>
>> <globalRoutineReferences>true</globalRoutineReferences>
>> <globalQueueReferences>true</globalQueueReferences>
>> <globalLinkReferences>true</globalLinkReferences>
>> <globalKeyReferences>true</globalKeyReferences>
>> <globalIndexReferences>true</globalIndexReferences>
>> <javadoc>true</javadoc>
>> <comments>true</comments>
>> <commentsOnCatalogs>true</commentsOnCatalogs>
>> <commentsOnSchemas>true</commentsOnSchemas>
>> <commentsOnTables>true</commentsOnTables>
>> <commentsOnColumns>true</commentsOnColumns>
>> <commentsOnUDTs>true</commentsOnUDTs>
>> <commentsOnAttributes>true</commentsOnAttributes>
>> <commentsOnPackages>true</commentsOnPackages>
>> <commentsOnRoutines>true</commentsOnRoutines>
>> <commentsOnParameters>true</commentsOnParameters>
>> <commentsOnSequences>true</commentsOnSequences>
>> <commentsOnLinks>true</commentsOnLinks>
>> <commentsOnQueues>true</commentsOnQueues>
>> <commentsOnKeys>true</commentsOnKeys>
>> <sources>true</sources>
>> <sourcesOnViews>true</sourcesOnViews>
>> <fluentSetters>true</fluentSetters>
>> <javaBeansGettersAndSetters>false</javaBeansGettersAndSetters>
>> <varargSetters>false</varargSetters>
>> <fullyQualifiedTypes></fullyQualifiedTypes>
>> <emptyCatalogs>false</emptyCatalogs>
>> <emptySchemas>false</emptySchemas>
>> <javaTimeTypes>true</javaTimeTypes>
>> <primaryKeyTypes>false</primaryKeyTypes>
>> <newline>\n</newline>
>> </generate>
>> <target>
>> <packageName>x.y.z.studio.database_entities.jooq</packageName>
>> <directory>
>> /A/B/C/build/generated/source/jooq/main
>> </directory>
>> <encoding>UTF-8</encoding>
>> <clean>true</clean>
>> </target>
>> </generator>
>> </configuration>
>>
>> The namespace is xmlns="http://www.jooq.org/xsd/jooq-codegen-3.13.0.xsd";. 
>> Is this correct?
>> This is the file that I found in tmp/generateJooq after trying to build 
>> with jOOQ 3.14.1 and getting that error message.
>>
>> Thanks,
>>
>> Maurizio
>>
>> On Friday, 6 November 2020 at 17:08:26 UTC+1 [email protected] wrote:
>>
>>> Thanks for your message
>>>
>>> On Fri, Nov 6, 2020 at 4:29 PM Maurizio <[email protected]> wrote:
>>>
>>>> I never was able to switch to 3.14, because I get this error message 
>>>> when running the code generation:
>>>>
>>>> *cvc-complex-type.2.4.a: Invalid content was found starting with 
>>>> element '{"http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":primaryKeyTypes}'. One 
>>>> of '{"http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":generatedAnnotationDate,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":constructorPropertiesAnnotation,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":constructorPropertiesAnnotationOnPojos,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":constructorPropertiesAnnotationOnRecords,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":pojosAsJavaRecordClasses,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":pojosAsScalaCaseClasses,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":pojosAsKotlinDataClasses,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":jpaVersion, 
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":globalDomainReferences, 
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":commentsOnEmbeddables, 
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":generatedSerialVersionUID,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":maxMembersPerInitialiser,
>>>>  
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":newline, 
>>>> "http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd 
>>>> <http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd>":indentation}' is 
>>>> expected.*
>>>>
>>>> I could not google anything about it. 
>>>>
>>>
>>> This is an XSD validation error. Your configuration XML seems to be 
>>> invalid. Now, I'd have to see it in order to be able to help you to see 
>>> what's wrong...
>>>  
>>>
>>>> I had in mind to talk about this issue later. I, too, wanted to use 
>>>> 3.14 in order to benefit from the dedicated Kotlin generator.
>>>>
>>>> Could you help me with that?
>>>>
>>>
>>> If you help me help you :)
>>>
>>> Cheers
>>> Lukas
>>>
>> -- 
>>
> 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/82181f3d-b692-440b-9fcb-9b950692bdb1n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jooq-user/82181f3d-b692-440b-9fcb-9b950692bdb1n%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/c9b04940-fde9-41d6-9aa8-e58e84551d9cn%40googlegroups.com.

Reply via email to