New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom UserType with Hibernate, Regression #644

Closed
beat2 opened this Issue Jan 31, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@beat2

beat2 commented Jan 31, 2014

Hi

There seems to be a regression from issue #240 . We tried to upgrade from 2.8.2 to 3.3.0 and got the following:

Cannot execute HibernateDomainExporter: org.hibernate.MappingException: Could not determine type for: ch.bedag.gba.capitastra.dao.hibernate.usertypes.ErstellTimestampUserType, at table: AVGBSLieferung, for columns: [org.hibernate.mapping.Column(erstellZeitpunkt)]

Property definition in Java Superclass:

private Timestamp erstellZeitpunkt;

In mapping file:

<property name="erstellZeitpunkt" type="ch.bedag.gba.capitastra.dao.hibernate.usertypes.ErstellTimestampUserType"/>
@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 3, 2014

Member

Could you provide the full stacktrace?

Member

timowest commented Feb 3, 2014

Could you provide the full stacktrace?

@beat2

This comment has been minimized.

Show comment
Hide comment
@beat2

beat2 Feb 4, 2014

Hi, of course here is the stacktrace:

Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot execute HibernateDomainExporter
        at ch.bedag.gba.maven.plugin.querydsl.HibernateExportMojo.execute(HibernateExportMojo.java:64)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: com.mysema.query.QueryException: org.hibernate.MappingException: Could not determine type for: ch.bedag.gba.capitastra.dao.hibernate.usertypes.ErstellTimestampUserType, at table: AVGBSLieferung, for columns: [org.hibernate.mapping.Column(erstellZeitpunkt)]
        at com.mysema.query.jpa.codegen.AbstractDomainExporter.execute(AbstractDomainExporter.java:142)
        at ch.bedag.gba.maven.plugin.querydsl.HibernateExportMojo.execute(HibernateExportMojo.java:62)
        ... 21 more
Caused by: org.hibernate.MappingException: Could not determine type for: ch.bedag.gba.capitastra.dao.hibernate.usertypes.ErstellTimestampUserType, at table: AVGBSLieferung, for columns: [org.hibernate.mapping.Column(erstellZeitpunkt)]
        at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:316)
        at org.hibernate.mapping.Property.getType(Property.java:81)
        at com.mysema.query.jpa.codegen.HibernateDomainExporter.getPropertyType(HibernateDomainExporter.java:267)
        at com.mysema.query.jpa.codegen.HibernateDomainExporter.handleProperty(HibernateDomainExporter.java:220)
        at com.mysema.query.jpa.codegen.HibernateDomainExporter.collectTypes(HibernateDomainExporter.java:203)
        at com.mysema.query.jpa.codegen.AbstractDomainExporter.execute(AbstractDomainExporter.java:140)
        ... 22 more

beat2 commented Feb 4, 2014

Hi, of course here is the stacktrace:

Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot execute HibernateDomainExporter
        at ch.bedag.gba.maven.plugin.querydsl.HibernateExportMojo.execute(HibernateExportMojo.java:64)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: com.mysema.query.QueryException: org.hibernate.MappingException: Could not determine type for: ch.bedag.gba.capitastra.dao.hibernate.usertypes.ErstellTimestampUserType, at table: AVGBSLieferung, for columns: [org.hibernate.mapping.Column(erstellZeitpunkt)]
        at com.mysema.query.jpa.codegen.AbstractDomainExporter.execute(AbstractDomainExporter.java:142)
        at ch.bedag.gba.maven.plugin.querydsl.HibernateExportMojo.execute(HibernateExportMojo.java:62)
        ... 21 more
Caused by: org.hibernate.MappingException: Could not determine type for: ch.bedag.gba.capitastra.dao.hibernate.usertypes.ErstellTimestampUserType, at table: AVGBSLieferung, for columns: [org.hibernate.mapping.Column(erstellZeitpunkt)]
        at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:316)
        at org.hibernate.mapping.Property.getType(Property.java:81)
        at com.mysema.query.jpa.codegen.HibernateDomainExporter.getPropertyType(HibernateDomainExporter.java:267)
        at com.mysema.query.jpa.codegen.HibernateDomainExporter.handleProperty(HibernateDomainExporter.java:220)
        at com.mysema.query.jpa.codegen.HibernateDomainExporter.collectTypes(HibernateDomainExporter.java:203)
        at com.mysema.query.jpa.codegen.AbstractDomainExporter.execute(AbstractDomainExporter.java:140)
        ... 22 more
@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 4, 2014

Member

Could you try again with the latest SNAPSHOT?

Member

timowest commented Feb 4, 2014

Could you try again with the latest SNAPSHOT?

@beat2

This comment has been minimized.

Show comment
Hide comment
@beat2

beat2 Feb 5, 2014

Hi Timo

Tried it and this issue seems to be fixed, but... got a lot of other errors which seems to be related to generics:

[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nStamm/QPersonStammMaster.java:[61,120] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\b
edag\gba\capitastra\model\personStamm\QPersonStammMaster.java:61: type parameter ch.bedag.gba.capitastra.model.personGb.QPersonGbMaster is not within its bound
[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nStamm/QPersonStammMaster.java:[61,155] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\b
edag\gba\capitastra\model\personStamm\QPersonStammMaster.java:61: <A,E>createList(java.lang.String,java.lang.Class<? super A>,java.lang.Class<? super E>,com.mys
ema.query.types.path.PathInits) in com.mysema.query.types.path.BeanPath<ch.bedag.gba.capitastra.model.personStamm.PersonStammMaster> cannot be applied to <ch.be
dag.gba.capitastra.model.personGb.PersonGbMaster,ch.bedag.gba.capitastra.model.personGb.QPersonGbMaster>(java.lang.String,java.lang.Class<ch.bedag.gba.capitastr
a.model.personGb.PersonGbMaster>,java.lang.Class<ch.bedag.gba.capitastra.model.personGb.QPersonGbMaster>,com.mysema.query.types.path.PathInits)
[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nGb/QPersonGbMaster.java:[55,36] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\bedag\gb
a\capitastra\model\personGb\QPersonGbMaster.java:55: type parameter ch.bedag.gba.capitastra.model.personGb.QPersonGb is not within its bound
[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nGb/QPersonGbMaster.java:[55,62] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\bedag\gb
a\capitastra\model\personGb\QPersonGbMaster.java:55: <A,E>createSet(java.lang.String,java.lang.Class<? super A>,java.lang.Class<? super E>,com.mysema.query.type
s.path.PathInits) in com.mysema.query.types.path.BeanPath<ch.bedag.gba.capitastra.model.personGb.PersonGbMaster<?>> cannot be applied to <ch.bedag.gba.capitastr
a.model.personGb.PersonGb,ch.bedag.gba.capitastra.model.personGb.QPersonGb>(java.lang.String,java.lang.Class<ch.bedag.gba.capitastra.model.personGb.PersonGb>,ja
va.lang.Class<ch.bedag.gba.capitastra.model.personGb.QPersonGb>,com.mysema.query.types.path.PathInits)

beat2 commented Feb 5, 2014

Hi Timo

Tried it and this issue seems to be fixed, but... got a lot of other errors which seems to be related to generics:

[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nStamm/QPersonStammMaster.java:[61,120] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\b
edag\gba\capitastra\model\personStamm\QPersonStammMaster.java:61: type parameter ch.bedag.gba.capitastra.model.personGb.QPersonGbMaster is not within its bound
[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nStamm/QPersonStammMaster.java:[61,155] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\b
edag\gba\capitastra\model\personStamm\QPersonStammMaster.java:61: <A,E>createList(java.lang.String,java.lang.Class<? super A>,java.lang.Class<? super E>,com.mys
ema.query.types.path.PathInits) in com.mysema.query.types.path.BeanPath<ch.bedag.gba.capitastra.model.personStamm.PersonStammMaster> cannot be applied to <ch.be
dag.gba.capitastra.model.personGb.PersonGbMaster,ch.bedag.gba.capitastra.model.personGb.QPersonGbMaster>(java.lang.String,java.lang.Class<ch.bedag.gba.capitastr
a.model.personGb.PersonGbMaster>,java.lang.Class<ch.bedag.gba.capitastra.model.personGb.QPersonGbMaster>,com.mysema.query.types.path.PathInits)
[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nGb/QPersonGbMaster.java:[55,36] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\bedag\gb
a\capitastra\model\personGb\QPersonGbMaster.java:55: type parameter ch.bedag.gba.capitastra.model.personGb.QPersonGb is not within its bound
[ERROR] /C:/work/workspace_gbso2/capitastra-parent-branch_new/capcore-parent/capcore-infrastructure/target/generated-sources/ch/bedag/gba/capitastra/model/perso
nGb/QPersonGbMaster.java:[55,62] C:\work\workspace_gbso2\capitastra-parent-branch_new\capcore-parent\capcore-infrastructure\target\generated-sources\ch\bedag\gb
a\capitastra\model\personGb\QPersonGbMaster.java:55: <A,E>createSet(java.lang.String,java.lang.Class<? super A>,java.lang.Class<? super E>,com.mysema.query.type
s.path.PathInits) in com.mysema.query.types.path.BeanPath<ch.bedag.gba.capitastra.model.personGb.PersonGbMaster<?>> cannot be applied to <ch.bedag.gba.capitastr
a.model.personGb.PersonGb,ch.bedag.gba.capitastra.model.personGb.QPersonGb>(java.lang.String,java.lang.Class<ch.bedag.gba.capitastra.model.personGb.PersonGb>,ja
va.lang.Class<ch.bedag.gba.capitastra.model.personGb.QPersonGb>,com.mysema.query.types.path.PathInits)
@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 8, 2014

Member

Could you create a new ticket for the generics issues and provide an example output file?

Member

timowest commented Feb 8, 2014

Could you create a new ticket for the generics issues and provide an example output file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment