[Hibernate-JIRA] Created: (HHH-6276) org.hibernate.test.cache.ehcache.EhCacheRegionFactoryImpl fails due to no slf4j in test configuration
by Strong Liu (JIRA)
org.hibernate.test.cache.ehcache.EhCacheRegionFactoryImpl fails due to no slf4j in test configuration
-----------------------------------------------------------------------------------------------------
Key: HHH-6276
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6276
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 4.0.0.Alpha3
Reporter: Strong Liu
Assignee: Strong Liu
Fix For: 4.0.0.Beta1
org.hibernate.testing.junit4.CallbackException: org.hibernate.testing.junit4.BaseCoreFunctionalTestCase#buildSessionFactory
at org.hibernate.testing.junit4.TestClassMetadata.invokeCallback(TestClassMetadata.java:199)
at org.hibernate.testing.junit4.TestClassMetadata.performCallbacks(TestClassMetadata.java:190)
at org.hibernate.testing.junit4.TestClassMetadata.performBeforeClassCallbacks(TestClassMetadata.java:181)
at org.hibernate.testing.junit4.BeforeClassCallbackHandler.evaluate(BeforeClassCallbackHandler.java:42)
at org.hibernate.testing.junit4.AfterClassCallbackHandler.evaluate(AfterClassCallbackHandler.java:42)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:51)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:63)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75)
at $Proxy3.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:48)
at org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFailureDispatch.java:31)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:129)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:69)
at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:63)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:318)
at org.hibernate.annotations.common.Version.<clinit>(Version.java:37)
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.<clinit>(JavaReflectionManager.java:73)
at org.hibernate.cfg.Configuration.createReflectionManager(Configuration.java:2356)
at org.hibernate.cfg.Configuration.createReflectionManager(Configuration.java:2352)
at org.hibernate.cfg.Configuration.reset(Configuration.java:267)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:258)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:262)
at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.constructConfiguration(BaseCoreFunctionalTestCase.java:132)
at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.buildConfiguration(BaseCoreFunctionalTestCase.java:122)
at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.buildSessionFactory(BaseCoreFunctionalTestCase.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.testing.junit4.TestClassMetadata.invokeCallback(TestClassMetadata.java:196)
... 33 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[Hibernate-JIRA] Created: (HSEARCH-744) NullPointerException when using a range query on a numeric field and searching for values below a given boundary
by Nikita D (JIRA)
NullPointerException when using a range query on a numeric field and searching for values below a given boundary
-----------------------------------------------------------------------------------------------------------------
Key: HSEARCH-744
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-744
Project: Hibernate Search
Issue Type: Bug
Components: query
Affects Versions: 3.4.0.Final
Environment: Hibernate Core 3.6.3, MySQL 5.1.55
Reporter: Nikita D
When using the query API to search for values below a boundary, a NullPointerException is thrown if the field is a numeric field (annotated with @NumericField). Example query:
{code}
Query luceneQuery = qb
.range()
.onField("myNumericField")
.below(myMaxValue)
.createQuery();
{code}
The problem is in NumericFieldUtils.createNumericRangeQuery(), which always uses the "from" value to determine the class. For a "below" query, the "from" value is null.
Stacktrace:
{code}
java.lang.NullPointerException
at org.hibernate.search.bridge.util.NumericFieldUtils.createNumericRangeQuery(NumericFieldUtils.java:17)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsRangeQueryBuilder.createQuery(ConnectedMultiFieldsRangeQueryBuilder.java:104)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsRangeQueryBuilder.createQuery(ConnectedMultiFieldsRangeQueryBuilder.java:79)
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[Hibernate-JIRA] Created: (HHH-5306) Dialect resolution: Cannot set a custom dialect resolver programatically or using hibernate.cfg.xml
by Nikita D (JIRA)
Dialect resolution: Cannot set a custom dialect resolver programatically or using hibernate.cfg.xml
---------------------------------------------------------------------------------------------------
Key: HHH-5306
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5306
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.2, 3.5.1, 3.5.0-Final, 3.5.0-CR-2, 3.5.0-CR-1, 3.5.0-Beta-4, 3.5.0-Beta-3, 3.5.0-Beta-2, 3.5.0.Beta-1, 3.3.2
Reporter: Nikita D
Priority: Minor
Starting with version 3.3, Hibernate introduced an extremely useful dialect resolution feature (http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#por...). The problem is with the configuration of a custom dialect resolver:
* Setting the property Environment.DIALECT_RESOLVERS in the Configuration of a SessionFactory doesn't work, because DialectFactory only reads from Environment.getProperties(), which is only the global properties (system properties plus the hibernate.properties file).
* Setting a system property programatically is not safe, because the Environment class caches the system properties in a static constant, so if it's loaded before the code that sets the system property, the property will not be picked up.
* The registerDialectResolver() method on DialectFactory is not public.
Ideally, it should be possible to configure a custom dialect resolver by setting the property Environment.DIALECT_RESOLVERS on a Configuration object, just as one would configure an explicit dialect. Alternatively, I think an acceptable "quick fix" would be to expose the registerDialectResolver() method on DialectFactory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months