This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Problem using Roo with with Postgres & MongoDB cross-store aspect supportPage Title Module

To get around the hibernate annotation complaint about not finding a usable Id, I added an Id into my domain objects, as an experiment. This hack apparently satisfied hibernate's requirements during load time and allowed TC server to start, hinting that this is really a bug in the way the aspects are (or are not) resolved during load time weaving.

Comment

Still having problems getting cross-store persistence working with Roo after including the dependency on the spring-data mongo build snapshot (spring-data-mongodb-80aa057) while using roo build snapshot (spring-roo-51be0cd)

Both entities persist properly, but when retrieving the JPA entity I get a stack overflow

Code:

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.StackOverflowError
at java.lang.Long.toString(Long.java:97)
at java.lang.String.valueOf(String.java:2945)
at java.lang.Long.toString(Long.java:740)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at com.test.domain.JpaEntity_Roo_ToString.ajc$interMethod$com_test_domain_JpaEntity_Roo_ToString$com_test_domain_JpaEntity$toString(JpaEntity_Roo_ToString.aj:10)
at com.test.domain.JpaEntity.toString(JpaEntity.java:1)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at org.springframework.data.mongodb.crossstore.MongoChangeSetPersister.getPersistentId(MongoChangeSetPersister.java:108)
at org.springframework.data.mongodb.crossstore.MongoDocumentBacking.ajc$interMethod$org_springframework_data_mongodb_crossstore_MongoDocumentBacking$org_springframework_data_mongodb_crossstore_DocumentBacked$get_persistent_id(MongoDocumentBacking.aj:198)
at com.test.domain.JpaEntity.get_persistent_id(JpaEntity.java:1)
at org.springframework.data.mongodb.crossstore.MongoDocumentBacking.ajc$interMethodDispatch1$org_springframework_data_mongodb_crossstore_MongoDocumentBacking$org_springframework_data_mongodb_crossstore_DocumentBacked$get_persistent_id(MongoDocumentBacking.aj)
at com.test.domain.JpaEntity_Roo_JavaBean.mongoEntity_aroundBody1$advice(JpaEntity_Roo_JavaBean.aj:245)
at com.test.domain.JpaEntity_Roo_JavaBean.ajc$interMethod$com_test_domain_JpaEntity_Roo_JavaBean$com_test_domain_JpaEntity$getMongoEntity(JpaEntity_Roo_JavaBean.aj:19)
at com.test.domain.JpaEntity.getMongoEntity(JpaEntity.java:1)
at com.test.domain.JpaEntity_Roo_JavaBean.ajc$interMethodDispatch1$com_test_domain_JpaEntity_Roo_JavaBean$com_test_domain_JpaEntity$getMongoEntity(JpaEntity_Roo_JavaBean.aj)
at com.test.domain.JpaEntity_Roo_ToString.ajc$interMethod$com_test_domain_JpaEntity_Roo_ToString$com_test_domain_JpaEntity$toString(JpaEntity_Roo_ToString.aj:11)
at com.test.domain.JpaEntity.toString(JpaEntity.java:1)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at org.springframework.data.mongodb.crossstore.MongoChangeSetPersister.getPersistentId(MongoChangeSetPersister.java:108)
at org.springframework.data.mongodb.crossstore.MongoDocumentBacking.ajc$interMethod$org_springframework_data_mongodb_crossstore_MongoDocumentBacking$org_springframework_data_mongodb_crossstore_DocumentBacked$get_persistent_id(MongoDocumentBacking.aj:198)
at com.test.domain.JpaEntity.get_persistent_id(JpaEntity.java:1)
at org.springframework.data.mongodb.crossstore.MongoDocumentBacking.ajc$interMethodDispatch1$org_springframework_data_mongodb_crossstore_MongoDocumentBacking$org_springframework_data_mongodb_crossstore_DocumentBacked$get_persistent_id(MongoDocumentBacking.aj)
at com.test.domain.JpaEntity_Roo_JavaBean.mongoEntity_aroundBody1$advice(JpaEntity_Roo_JavaBean.aj:245)
at com.test.domain.JpaEntity_Roo_JavaBean.ajc$interMethod$com_test_domain_JpaEntity_Roo_JavaBean$com_test_domain_JpaEntity$getMongoEntity(JpaEntity_Roo_JavaBean.aj:19)
at com.test.domain.JpaEntity.getMongoEntity(JpaEntity.java:1)
at com.test.domain.JpaEntity_Roo_JavaBean.ajc$interMethodDispatch1$com_test_domain_JpaEntity_Roo_JavaBean$com_test_domain_JpaEntity$getMongoEntity(JpaEntity_Roo_JavaBean.aj)
at com.test.domain.JpaEntity_Roo_ToString.ajc$interMethod$com_test_domain_JpaEntity_Roo_ToString$com_test_domain_JpaEntity$toString(JpaEntity_Roo_ToString.aj:11)
at com.test.domain.JpaEntity.toString(JpaEntity.java:1)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at org.springframework.data.mongodb.crossstore.MongoChangeSetPersister.getPersistentId(MongoChangeSetPersister.java:108)
at org.springframework.data.mongodb.crossstore.MongoDocumentBacking.ajc$interMethod$org_springframework_data_mongodb_crossstore_MongoDocumentBacking$org_springframework_data_mongodb_crossstore_DocumentBacked$get_persistent_id(MongoDocumentBacking.aj:198)
at com.test.domain.JpaEntity.get_persistent_id(JpaEntity.java:1)
at org.springframework.data.mongodb.crossstore.MongoDocumentBacking.ajc$interMethodDispatch1$org_springframework_data_mongodb_crossstore_MongoDocumentBacking$org_springframework_data_mongodb_crossstore_DocumentBacked$get_persistent_id(MongoDocumentBacking.aj)
at com.test.domain.JpaEntity_Roo_JavaBean.mongoEntity_aroundBody1$advice(JpaEntity_Roo_JavaBean.aj:245)
at com.test.domain.JpaEntity_Roo_JavaBean.ajc$interMethod$com_test_domain_JpaEntity_Roo_JavaBean$com_test_domain_JpaEntity$getMongoEntity(JpaEntity_Roo_JavaBean.aj:19)
at com.test.domain.JpaEntity.getMongoEntity(JpaEntity.java:1)
at com.test.domain.JpaEntity_Roo_JavaBean.ajc$interMethodDispatch1$com_test_domain_JpaEntity_Roo_JavaBean$com_test_domain_JpaEntity$getMongoEntity(JpaEntity_Roo_JavaBean.aj)
at com.test.domain.JpaEntity_Roo_ToString.ajc$interMethod$com_test_domain_JpaEntity_Roo_ToString$com_test_domain_JpaEntity$toString(JpaEntity_Roo_ToString.aj:11)
at com.test.domain.JpaEntity.toString(JpaEntity.java:1)
at java.lang.String.valueOf(String.java:2826)

So far, I have not been able to get cross-store persistence working with Roo in either the milestone nor nightly builds. Does anyone else have it working??