Hi,
I am having an issue with the configuration for one-to-many relationships.
At JPADS.html I am entering the following:
<script src="JPADS_js/sc/DataSourceLoader?dataSource=conexionListValue,conexionValueList"></script>
Which is supposed to load the datasources I need. However, these datasources are connected by a one-to-many relationship and I am getting the following traceback:
0] DEBUG DataSourceAnnotations - Generating data source 'ListValue' for class bean.hb.ListValue
=== 2012-12-19 12:07:45,484 [58-0] DEBUG DataSourceAnnotations - Generating data source 'Object' for class java.lang.Object
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Fields are annotated.
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Generating field 'serialVersionUID' of type long
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Skipping.
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Generating field 'id' of type java.lang.Long
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {primaryKey=true, name=id, length=255, canEdit=true, required=true, type=integer}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'description' of type java.lang.String
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=description, length=128, canEdit=true, required=false, type=text}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'name' of type java.lang.String
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=name, length=128, canEdit=true, required=false, type=text}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'value' of type java.lang.Integer
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=value, type=integer}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'valueList' of type bean.hb.ValueList
=== 2012-12-19 12:07:45,546 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=valueList, type=any}
=== 2012-12-19 12:07:46,062 [58-0] ERROR DataSourceLoader - Exception while attempting to load a DataSource
org.hibernate.AnnotationException: @OneToOne or @ManyToOne on bean.hb.ListValue.valueList references an unknown entity: bean.hb.ValueList
at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:109)
at org.hibernate.cfg.Configuration.processEndOfQueue(Configuration.java:1521)
at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(Configuration.java:1446)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1351)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1733)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1784)
at com.isomorphic.hibernate.HibernateDataSource.init(HibernateDataSource.java:411)
at com.isomorphic.datasource.DataSource.initialize(DataSource.java:400)
at com.isomorphic.dataso
...
I understand that the problem is that the datasource ListValue references a datasource, ValueList, that has not been processed yet. However, a similar issue happens if I let it process ValueList datasource first. Is there any way to declare datasource references before these are processed?
It seems to me that there should be an obvious solution for this problem as most users of Hibernate Datasource have interconnected tables. However, I cannot find it. Could you please help?
Regards,
I am having an issue with the configuration for one-to-many relationships.
At JPADS.html I am entering the following:
<script src="JPADS_js/sc/DataSourceLoader?dataSource=conexionListValue,conexionValueList"></script>
Which is supposed to load the datasources I need. However, these datasources are connected by a one-to-many relationship and I am getting the following traceback:
0] DEBUG DataSourceAnnotations - Generating data source 'ListValue' for class bean.hb.ListValue
=== 2012-12-19 12:07:45,484 [58-0] DEBUG DataSourceAnnotations - Generating data source 'Object' for class java.lang.Object
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Fields are annotated.
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Generating field 'serialVersionUID' of type long
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Skipping.
=== 2012-12-19 12:07:45,515 [58-0] DEBUG DataSourceAnnotations - Generating field 'id' of type java.lang.Long
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {primaryKey=true, name=id, length=255, canEdit=true, required=true, type=integer}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'description' of type java.lang.String
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=description, length=128, canEdit=true, required=false, type=text}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'name' of type java.lang.String
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=name, length=128, canEdit=true, required=false, type=text}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'value' of type java.lang.Integer
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=value, type=integer}
=== 2012-12-19 12:07:45,531 [58-0] DEBUG DataSourceAnnotations - Generating field 'valueList' of type bean.hb.ValueList
=== 2012-12-19 12:07:45,546 [58-0] DEBUG DataSourceAnnotations - Field configuration generated: {name=valueList, type=any}
=== 2012-12-19 12:07:46,062 [58-0] ERROR DataSourceLoader - Exception while attempting to load a DataSource
org.hibernate.AnnotationException: @OneToOne or @ManyToOne on bean.hb.ListValue.valueList references an unknown entity: bean.hb.ValueList
at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:109)
at org.hibernate.cfg.Configuration.processEndOfQueue(Configuration.java:1521)
at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(Configuration.java:1446)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1351)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1733)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1784)
at com.isomorphic.hibernate.HibernateDataSource.init(HibernateDataSource.java:411)
at com.isomorphic.datasource.DataSource.initialize(DataSource.java:400)
at com.isomorphic.dataso
...
I understand that the problem is that the datasource ListValue references a datasource, ValueList, that has not been processed yet. However, a similar issue happens if I let it process ValueList datasource first. Is there any way to declare datasource references before these are processed?
It seems to me that there should be an obvious solution for this problem as most users of Hibernate Datasource have interconnected tables. However, I cannot find it. Could you please help?
Regards,
Comment