org.hibernate.search.exception.SearchException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • So, this is an early report for which I'm not 100% what the underlying issue is, and I'm still having issues getting my environment up and running. But you guys asked for early reports, so here goes A number of my @IndexedEmbedded relations are being reported as non-existing in queries. For example {code} @DiscriminatorValue(value = "WPT") @ClassBridge(impl=WallPostClassBridge.class,index=org.hibernate.search.annotations.Index.YES,analyze=Analyze.NO,store=Store.NO) @Indexed(interceptor=WallPostIndexingInterceptor.class) public class WallPost extends BaseWallPost{ @OneToMany(cascade=CascadeType.ALL, orphanRemoval=true,mappedBy="post", fetch=FetchType.LAZY) @IndexedEmbedded(prefix="sponsor.",indexNullAs=Field.DEFAULT_NULL_TOKEN) public List<SponsoredPost> getSponsored() { return sponsored; } } {code} {code} @Entity @Table(name="SponsoredPost") public class SponsoredPost{ @OneToOne(cascade=CascadeType.ALL,optional=false,fetch=FetchType.EAGER) @JoinColumn(name="FK_TargetProfileId", nullable=false, updatable=false) @IndexedEmbedded(prefix="profile.") @NotNull public TargetProfile getProfile() { return profile; } } {code} {code} Entity @Table(name="TargetProfile") public class TargetProfile{ @ManyToMany(fetch=FetchType.LAZY) @JoinTable(name="TargetProfile_Tags" ,joinColumns=@JoinColumn(name="targetProfileId") ,inverseJoinColumns=@JoinColumn(name="tagId") ) @IndexedEmbedded(prefix="tag.") public Set<Tag> getTags() { return tags; } } {code} The exception I'm seeing is: {code} org.hibernate.search.exception.SearchException: Unable to find field sponsor.profile.tag.id in nl.project.model.social.WallPost at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.objectToString(DocumentBuilderIndexedEntity.java:674) at org.hibernate.search.query.dsl.impl.FieldContext.objectToString(FieldContext.java:69) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.buildSearchTerm(ConnectedMultiFieldsTermQueryBuilder.java:129) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:83) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:64) at nl.project.dao.hibernate.WallDaoHibernate.getSponsoredPosts(WallDaoHibernate.java:2367) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) at com.sun.proxy.$Proxy173.getSponsoredPosts(Unknown Source) at nl.project.integration.SponsoredPostTest.testSponsoredPostInvalid(SponsoredPostTest.java:477) {code}
    via by Marc Schipperheyn,
  • So, this is an early report for which I'm not 100% what the underlying issue is, and I'm still having issues getting my environment up and running. But you guys asked for early reports, so here goes A number of my @IndexedEmbedded relations are being reported as non-existing in queries. For example {code} @DiscriminatorValue(value = "WPT") @ClassBridge(impl=WallPostClassBridge.class,index=org.hibernate.search.annotations.Index.YES,analyze=Analyze.NO,store=Store.NO) @Indexed(interceptor=WallPostIndexingInterceptor.class) public class WallPost extends BaseWallPost{ @OneToMany(cascade=CascadeType.ALL, orphanRemoval=true,mappedBy="post", fetch=FetchType.LAZY) @IndexedEmbedded(prefix="sponsor.",indexNullAs=Field.DEFAULT_NULL_TOKEN) public List<SponsoredPost> getSponsored() { return sponsored; } } {code} {code} @Entity @Table(name="SponsoredPost") public class SponsoredPost{ @OneToOne(cascade=CascadeType.ALL,optional=false,fetch=FetchType.EAGER) @JoinColumn(name="FK_TargetProfileId", nullable=false, updatable=false) @IndexedEmbedded(prefix="profile.") @NotNull public TargetProfile getProfile() { return profile; } } {code} {code} Entity @Table(name="TargetProfile") public class TargetProfile{ @ManyToMany(fetch=FetchType.LAZY) @JoinTable(name="TargetProfile_Tags" ,joinColumns=@JoinColumn(name="targetProfileId") ,inverseJoinColumns=@JoinColumn(name="tagId") ) @IndexedEmbedded(prefix="tag.") public Set<Tag> getTags() { return tags; } } {code} The exception I'm seeing is: {code} org.hibernate.search.exception.SearchException: Unable to find field sponsor.profile.tag.id in nl.project.model.social.WallPost at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.objectToString(DocumentBuilderIndexedEntity.java:674) at org.hibernate.search.query.dsl.impl.FieldContext.objectToString(FieldContext.java:69) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.buildSearchTerm(ConnectedMultiFieldsTermQueryBuilder.java:129) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:83) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:64) at nl.project.dao.hibernate.WallDaoHibernate.getSponsoredPosts(WallDaoHibernate.java:2367) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) at com.sun.proxy.$Proxy173.getSponsoredPosts(Unknown Source) at nl.project.integration.SponsoredPostTest.testSponsoredPostInvalid(SponsoredPostTest.java:477) {code}
    via by Marc Schipperheyn,
    • org.hibernate.search.exception.SearchException: Unable to find field sponsor.profile.tag.id in nl.project.model.social.WallPost at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.objectToString(DocumentBuilderIndexedEntity.java:674) at org.hibernate.search.query.dsl.impl.FieldContext.objectToString(FieldContext.java:69) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.buildSearchTerm(ConnectedMultiFieldsTermQueryBuilder.java:129) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:83) at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:64) at nl.project.dao.hibernate.WallDaoHibernate.getSponsoredPosts(WallDaoHibernate.java:2367) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) at com.sun.proxy.$Proxy173.getSponsoredPosts(Unknown Source) at nl.project.integration.SponsoredPostTest.testSponsoredPostInvalid(SponsoredPostTest.java:477)
    No Bugmate found.