[Hibernate-JIRA] Created: (HHH-6881) identity strategy AUTO uses SequenceStyleGenerator on mssql
by andreas bleicher (JIRA)
identity strategy AUTO uses SequenceStyleGenerator on mssql
-----------------------------------------------------------
Key: HHH-6881
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6881
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 4.0.0.CR2
Environment: Hibernate 4.0.0.CR2, JBoss 7.0.2, MSSQL2008, JTDS-1.2.5
Reporter: andreas bleicher
Priority: Blocker
we are using identity generation with default strategy (GenerationType.AUTO) to support different DBMS (mssql, oracle, mysql)
our Id annotations:
{Code}
@Id
@GeneratedValue
public long getId()
{
return id;
}
{Code}
since upgrading to jboss7/hibernate4 we get the following error on mssql when persisting a new entity:
14:33:10,373 ERROR [org.hibernate.id.enhanced.TableStructure] (http--127.0.0.1-8080-3) could not read a hi value: java.sql.SQLException:
invalid object name 'hibernate_sequence'.
the reason is that instead of the IdentityGenerator the SequenceStyleGenerator is used although we are using the correct MSSQLServerDialect and it returns supportsIdentityColumns() = true. The SequenceStyleGenerator tries to find the 'hibernate_sequence' table which does not exist
workaround for mssql by changing code to:
{Code}
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
public long getId()
{
return id;
}
{Code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[Hibernate-JIRA] Created: (HHH-6606) org.hibernate.metamodel.source.annotations.util.EmbeddableHierarchyTest#testEmbeddableHierarchy fails on openjdk
by Strong Liu (JIRA)
org.hibernate.metamodel.source.annotations.util.EmbeddableHierarchyTest#testEmbeddableHierarchy fails on openjdk
----------------------------------------------------------------------------------------------------------------
Key: HHH-6606
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6606
Project: Hibernate Core
Issue Type: Bug
Components: metamodel
Affects Versions: 4.0.0.CR1
Reporter: Strong Liu
Assignee: Hardy Ferentschik
Fix For: 4.0.0.next
Hardy, i'm assigning this to you since you wrote this test :)
{code}
junit.framework.AssertionFailedError: wrong class expected:<org.hibernate.metamodel.source.annotations.util.EmbeddableHierarchyTest$1A> but was:<org.hibernate.metamodel.source.annotations.util.EmbeddableHierarchyTest$1C>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:283)
at junit.framework.Assert.assertEquals(Assert.java:64)
at org.hibernate.metamodel.source.annotations.util.EmbeddableHierarchyTest.testEmbeddableHierarchy(EmbeddableHierarchyTest.java:72)
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:616)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.hibernate.testing.junit4.FailureExpectedHandler.evaluate(FailureExpectedHandler.java:59)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.hibernate.testing.junit4.BeforeClassCallbackHandler.evaluate(BeforeClassCallbackHandler.java:43)
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.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years