java.lang.NullPointerException

Stack Overflow | Headchopperz | 1 month ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I have upgraded the application from 5.6.0.Beta3 to 5.6.1.Final without reindexing. The index structure was generated by 5.6.0.Beta3 but read by 5.6.1.Final. I received the following exception {code} java.lang.NullPointerException at org.hibernate.search.query.hibernate.impl.EntityInfoLoadKey.hashCode(EntityInfoLoadKey.java:47) at java.util.HashMap.hash(HashMap.java:338) at java.util.HashMap.put(HashMap.java:611) at org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:82) at org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:58) at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:199) at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:157) at org.hibernate.demos.HibernateSearchWithDbIT.lambda$queryOnSingleField$1(HibernateSearchWithDbIT.java:110) at org.hibernate.demos.HibernateSearchWithDbIT$$Lambda$16/1653153736.accept(Unknown Source) at org.hibernate.demos.TestBase.inTransaction(TestBase.java:21) at org.hibernate.demos.HibernateSearchWithDbIT.queryOnSingleField(HibernateSearchWithDbIT.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [2017-03-13 14:47:55,445][INFO ][org.hibernate.jpa.internal.util.LogHelper] HHH000204: Processing PersistenceUnitInfo [ name: videoGamePu ...] [2017-03-13 14:47:55,536][INFO ][org.hibernate.Version ] HHH000412: Hibernate Core {5.1.3.Final} [2017-03-13 14:47:55,537][INFO ][org.hibernate.cfg.Environment] HHH000206: hibernate.properties not found [2017-03-13 14:47:55,538][INFO ][org.hibernate.cfg.Environment] HHH000021: Bytecode provider name : javassist [2017-03-13 14:47:55,577][INFO ][org.hibernate.annotations.common.Version] HCANN000001: Hibernate Commons Annotations {5.0.1.Final} [2017-03-13 14:47:55,768][WARN ][org.hibernate.orm.connections.pooling] HHH10001002: Using Hibernate built-in connection pool (not for production use!) [2017-03-13 14:47:55,769][INFO ][org.hibernate.orm.connections.pooling] HHH10001005: using driver [null] at URL [jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1] [2017-03-13 14:47:55,769][INFO ][org.hibernate.orm.connections.pooling] HHH10001001: Connection properties: {user=sa} [2017-03-13 14:47:55,769][INFO ][org.hibernate.orm.connections.pooling] HHH10001003: Autocommit mode: false [2017-03-13 14:47:55,772][INFO ][org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl] HHH000115: Hibernate connection pool size: 20 (min=1) [2017-03-13 14:47:55,936][INFO ][org.hibernate.dialect.Dialect] HHH000400: Using dialect: org.hibernate.dialect.H2Dialect [2017-03-13 14:47:56,307][INFO ][org.hibernate.search.engine.Version] HSEARCH000034: Hibernate Search 5.6.0.Final [2017-03-13 14:47:56,443][INFO ][org.hibernate.orm.connections.access] HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@71984c3] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode. [2017-03-13 14:47:56,446][INFO ][org.hibernate.orm.connections.access] HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@1bc715b8] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode. [2017-03-13 14:47:56,464][INFO ][org.hibernate.tool.schema.internal.SchemaCreatorImpl] HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@2c104774' [2017-03-13 14:47:56,765][INFO ][io.searchbox.client.AbstractJestClient] Setting server pool to a list of 1 servers: [http://127.0.0.1:9200] [2017-03-13 14:47:56,766][INFO ][io.searchbox.client.JestClientFactory] Using multi thread/connection supporting pooling connection manager [2017-03-13 14:47:56,837][INFO ][io.searchbox.client.JestClientFactory] Using custom GSON instance [2017-03-13 14:47:56,838][INFO ][io.searchbox.client.JestClientFactory] Node Discovery disabled... [2017-03-13 14:47:56,838][INFO ][io.searchbox.client.JestClientFactory] Idle connection reaping disabled... [2017-03-13 14:47:57,191][ERROR][org.hibernate.search.exception.impl.LogErrorHandler] HSEARCH000058: Exception occurred org.hibernate.search.elasticsearch.client.impl.BulkRequestFailedException: HSEARCH400008: Elasticsearch request failed. Request: ======== Operation: Bulk URI:/_bulk?refresh=true Data: {"index":{"_id":"4","_index":"org.hibernate.demos.hswithes.model.videogame","_type":"org.hibernate.demos.hswithes.model.VideoGame"}} {"id":"4","title":"Revenge of the Samurai","description":"The Samurai is mad and takes revenge","rating":8,"tags":["action","real-time","anime"],"publisher":{"name":"Samurai Games, Inc."},"characters":[{"nickName":"Luigi"},{"nickName":"Dash"}]} {"index":{"_id":"5","_index":"org.hibernate.demos.hswithes.model.videogame","_type":"org.hibernate.demos.hswithes.model.VideoGame"}} {"id":"5","title":"Tanaka\u0027s return","description":"The famous Samurai Tanaka returns","rating":10,"tags":["action","round-based"],"publisher":{"name":"Samurai Games, Inc."},"characters":[{"nickName":"Frank"},{"nickName":"Dash"},{"nickName":"Luigi"}]} {"index":{"_id":"6","_index":"org.hibernate.demos.hswithes.model.videogame","_type":"org.hibernate.demos.hswithes.model.VideoGame"}} {"id":"6","title":"Ninja Castle","description":"7 Ninjas live in a castle","rating":5,"publisher":{"name":"Samurai Games, Inc."},"characters":[{"nickName":"Frank"}]} Response: ========= Status: 200 Error message: One or more of the items in the Bulk request failed, check BulkResult.getItems() for more information. Cluster name: null Cluster status: null Operation: index Index: org.hibernate.demos.hswithes.model.videogame Type: org.hibernate.demos.hswithes.model.VideoGame Id: 4 Status: 400 Error: {"type":"strict_dynamic_mapping_exception","reason":"mapping set to strict, dynamic introduction of [id] within [org.hibernate.demos.hswithes.model.VideoGame] is not allowed"} Operation: index Index: org.hibernate.demos.hswithes.model.videogame Type: org.hibernate.demos.hswithes.model.VideoGame Id: 5 Status: 400 Error: {"type":"strict_dynamic_mapping_exception","reason":"mapping set to strict, dynamic introduction of [id] within [org.hibernate.demos.hswithes.model.VideoGame] is not allowed"} Operation: index Index: org.hibernate.demos.hswithes.model.videogame Type: org.hibernate.demos.hswithes.model.VideoGame Id: 6 Status: 400 Error: {"type":"strict_dynamic_mapping_exception","reason":"mapping set to strict, dynamic introduction of [id] within [org.hibernate.demos.hswithes.model.VideoGame] is not allowed"} Subsequent failures: Entity org.hibernate.demos.hswithes.model.VideoGame Id 4 Work Type org.hibernate.search.backend.AddLuceneWork Entity org.hibernate.demos.hswithes.model.VideoGame Id 5 Work Type org.hibernate.search.backend.AddLuceneWork Entity org.hibernate.demos.hswithes.model.VideoGame Id 6 Work Type org.hibernate.search.backend.AddLuceneWork org.hibernate.search.elasticsearch.client.impl.BulkRequestFailedException: HSEARCH400008: Elasticsearch request failed. Request: ======== Operation: Bulk URI:/_bulk?refresh=true Data: {"index":{"_id":"4","_index":"org.hibernate.demos.hswithes.model.videogame","_type":"org.hibernate.demos.hswithes.model.VideoGame"}} {"id":"4","title":"Revenge of the Samurai","description":"The Samurai is mad and takes revenge","rating":8,"tags":["action","real-time","anime"],"publisher":{"name":"Samurai Games, Inc."},"characters":[{"nickName":"Luigi"},{"nickName":"Dash"}]} {"index":{"_id":"5","_index":"org.hibernate.demos.hswithes.model.videogame","_type":"org.hibernate.demos.hswithes.model.VideoGame"}} {"id":"5","title":"Tanaka\u0027s return","description":"The famous Samurai Tanaka returns","rating":10,"tags":["action","round-based"],"publisher":{"name":"Samurai Games, Inc."},"characters":[{"nickName":"Frank"},{"nickName":"Dash"},{"nickName":"Luigi"}]} {"index":{"_id":"6","_index":"org.hibernate.demos.hswithes.model.videogame","_type":"org.hibernate.demos.hswithes.model.VideoGame"}} {"id":"6","title":"Ninja Castle","description":"7 Ninjas live in a castle","rating":5,"publisher":{"name":"Samurai Games, Inc."},"characters":[{"nickName":"Frank"}]} Response: ========= Status: 200 Error message: One or more of the items in the Bulk request failed, check BulkResult.getItems() for more information. Cluster name: null Cluster status: null Operation: index Index: org.hibernate.demos.hswithes.model.videogame Type: org.hibernate.demos.hswithes.model.VideoGame Id: 4 Status: 400 Error: {"type":"strict_dynamic_mapping_exception","reason":"mapping set to strict, dynamic introduction of [id] within [org.hibernate.demos.hswithes.model.VideoGame] is not allowed"} Operation: index Index: org.hibernate.demos.hswithes.model.videogame Type: org.hibernate.demos.hswithes.model.VideoGame Id: 5 Status: 400 Error: {"type":"strict_dynamic_mapping_exception","reason":"mapping set to strict, dynamic introduction of [id] within [org.hibernate.demos.hswithes.model.VideoGame] is not allowed"} Operation: index Index: org.hibernate.demos.hswithes.model.videogame Type: org.hibernate.demos.hswithes.model.VideoGame Id: 6 Status: 400 Error: {"type":"strict_dynamic_mapping_exception","reason":"mapping set to strict, dynamic introduction of [id] within [org.hibernate.demos.hswithes.model.VideoGame] is not allowed"} at org.hibernate.search.elasticsearch.client.impl.JestClient.executeBulkRequest(JestClient.java:225) at org.hibernate.search.elasticsearch.client.impl.BulkRequest.execute(BulkRequest.java:61) at org.hibernate.search.elasticsearch.client.impl.BackendRequestProcessor.doExecute(BackendRequestProcessor.java:106) at org.hibernate.search.elasticsearch.client.impl.BackendRequestProcessor.executeSync(BackendRequestProcessor.java:76) at org.hibernate.search.elasticsearch.impl.ElasticsearchIndexManager.performOperations(ElasticsearchIndexManager.java:424) at org.hibernate.search.backend.impl.LocalBackendQueueProcessor.applyWork(LocalBackendQueueProcessor.java:38) at org.hibernate.search.backend.impl.WorkQueuePerIndexSplitter.commitOperations(WorkQueuePerIndexSplitter.java:46) at org.hibernate.search.backend.impl.BatchedQueueingProcessor.performWorks(BatchedQueueingProcessor.java:83) at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.afterCompletion(PostTransactionWorkQueueSynchronization.java:76) at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnAfterTx.doAfterTransactionCompletion(EventSourceTransactionContext.java:187) at org.hibernate.engine.spi.ActionQueue$AfterTransactionCompletionProcessQueue.afterTransactionCompletion(ActionQueue.java:957) at org.hibernate.engine.spi.ActionQueue.afterTransactionCompletion(ActionQueue.java:491) at org.hibernate.internal.SessionImpl.afterTransactionCompletion(SessionImpl.java:2369) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.afterTransactionCompletion(JdbcCoordinatorImpl.java:497) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.afterCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:167) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$200(JdbcResourceLocalTransactionCoordinatorImpl.java:38) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:233) at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65) at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:61) at org.hibernate.demos.TestBase.inTransaction(TestBase.java:22) at org.hibernate.demos.HibernateSearchWithDbIT.setUpTestData(HibernateSearchWithDbIT.java:43) at org.hibernate.demos.HibernateSearchWithDbIT.setUpEmf(HibernateSearchWithDbIT.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Process finished with exit code 255 {code} The root cause is that the {{_source}} includes the id in 5.6.0.Final and uses it to retrieve the entity id whereas the 5.6.0.Beta3 did not include it and was expecting the id from the index structure proper. I wonder a few things: - should we have thrown the inner exception of the bulk operations instead of swallowing (strict mapping error). - should we catch any EntityInfo with a null id early on during query and raise a more meaningful exception? That one is a rhetorical question, of course we should. - should we be more lenient toward older mappings and fallback to reading id the old fashion way?

    Hibernate JIRA | 2 weeks ago | Emmanuel Bernard
    java.lang.NullPointerException
  2. 0

    I have run into an issue after moving from Search 3.1 to 3.4.1 and later to 4.0.Beta2. The issue is that when loading an result entity from a hibernate search query the load fails if the result entity has an associated entity where the id types are dissimilar. For example if I have Company with an id type of Long and employee with id type of Integer and I search and the result is the company entity my search throws the following stack trace. {code} caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.hibernate.type.descriptor.java.IntegerTypeDescriptor.unwrap(IntegerTypeDescriptor.java:36) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$1.doBind(IntegerTypeDescriptor.java:57) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:82) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:305) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:300) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1909) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.bindParameterValues(Loader.java:1880) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1758) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doQuery(Loader.java:828) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doList(Loader.java:2449) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doList(Loader.java:2435) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.list(Loader.java:2271) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:121) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1484) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:373) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.search.query.hibernate.impl.CriteriaObjectsInitializer.initializeObjects(CriteriaObjectsInitializer.java:107) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:91) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:72) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:211) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:147) [hibernate-search-orm-4.0.0.Beta2.jar:] at com.domain.search.SearchUtil.search(SearchUtil.java:55) [classes:] {code}

    Hibernate JIRA | 5 years ago | Cody Lerum
    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    I have run into an issue after moving from Search 3.1 to 3.4.1 and later to 4.0.Beta2. The issue is that when loading an result entity from a hibernate search query the load fails if the result entity has an associated entity where the id types are dissimilar. For example if I have Company with an id type of Long and employee with id type of Integer and I search and the result is the company entity my search throws the following stack trace. {code} caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.hibernate.type.descriptor.java.IntegerTypeDescriptor.unwrap(IntegerTypeDescriptor.java:36) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$1.doBind(IntegerTypeDescriptor.java:57) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:82) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:305) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:300) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1909) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.bindParameterValues(Loader.java:1880) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1758) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doQuery(Loader.java:828) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doList(Loader.java:2449) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.doList(Loader.java:2435) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.Loader.list(Loader.java:2271) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:121) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1484) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:373) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2] at org.hibernate.search.query.hibernate.impl.CriteriaObjectsInitializer.initializeObjects(CriteriaObjectsInitializer.java:107) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:91) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:72) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:211) [hibernate-search-orm-4.0.0.Beta2.jar:] at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:147) [hibernate-search-orm-4.0.0.Beta2.jar:] at com.domain.search.SearchUtil.search(SearchUtil.java:55) [classes:] {code}

    Hibernate JIRA | 5 years ago | Cody Lerum
    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
  5. 0

    Hibernate Search: GenericJDBCException: could not extract ResultSet

    Stack Overflow | 7 months ago | Humoyun
    org.hibernate.exception.GenericJDBCException: could not extract ResultSet

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.hibernate.search.query.hibernate.impl.EntityInfoLoadKey.hashCode()
    2. Hibernate Search ORM
      EntityInfoLoadKey.hashCode
      1. org.hibernate.search.query.hibernate.impl.EntityInfoLoadKey.hashCode(EntityInfoLoadKey.java:47)
      1 frame
    3. Java RT
      HashMap.put
      1. java.util.HashMap.hash(HashMap.java:338)
      2. java.util.HashMap.put(HashMap.java:611)
      2 frames
    4. Hibernate Search ORM
      FullTextQueryImpl.getResultList
      1. org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:82)
      2. org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:58)
      3. org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:207)
      4. org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:157)
      4 frames
    5. com.nestedbird.models
      EventController.search
      1. com.nestedbird.models.core.EntitySearch.search(EntitySearch.java:30)
      2. com.nestedbird.models.event.EventController.search(EventController.java:67)
      2 frames
    6. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.GeneratedMethodAccessor704.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
      2 frames
    7. com.zeroturnaround.jrebelbase
      q.methodInvoke
      1. com.zeroturnaround.jrebelbase.facade.q.methodInvoke(SourceFile:532)
      1 frame
    8. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java:498)
      1 frame
    9. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
      2 frames
    10. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
      8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
      8 frames
    11. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      1 frame
    12. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
      1 frame
    13. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      1 frame
    14. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    15. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    16. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    17. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:105)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    18. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    19. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
      2. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
      3. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
      4. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      5. org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
      6. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      7. org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
      8. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      9. org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
      10. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      11. org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:150)
      12. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      13. org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
      14. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      15. org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
      16. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      17. org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
      18. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      19. org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
      20. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      20 frames
    20. org.springframework.security
      CsrfFilter.doFilterInternal
      1. org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
      1 frame
    21. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    22. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      1 frame
    23. org.springframework.security
      HeaderWriterFilter.doFilterInternal
      1. org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
      1 frame
    24. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    25. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      2. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      3 frames
    26. org.springframework.security
      WebAsyncManagerIntegrationFilter.doFilterInternal
      1. org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
      1 frame
    27. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    28. Spring Security
      FilterChainProxy.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
      2. org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
      3. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
      3 frames
    29. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
      2 frames
    30. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    31. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    32. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    33. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    34. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    35. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    36. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      2 frames
    37. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    38. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      4. org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:96)
      5. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
      6. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
      7. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      8. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
      10 frames
    39. Grizzly HTTP
      SocketProcessorBase.run
      1. org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
      2. org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      3. org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
      4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
      5. org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      5 frames
    40. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    41. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    42. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame