[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
[Hibernate-JIRA] Created: (HHH-6541) ColumnValues.applyColumnValues tests presence of uniqueValue but reads nameValue
by Erik Bertelsen (JIRA)
ColumnValues.applyColumnValues tests presence of uniqueValue but reads nameValue
--------------------------------------------------------------------------------
Key: HHH-6541
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6541
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 4.0.0.Beta4
Environment: 4.0.0.Beta4, postgresql 9
Reporter: Erik Bertelsen
In https://github.com/hibernate/hibernate-core/blob/master/hibernate-core/sr... in the method applyColumnValues, the following lines are present:
AnnotationValue nameValue = columnAnnotation.value( "name" );
if ( nameValue != null ) {
this.name = nameValue.asString();
}
AnnotationValue uniqueValue = columnAnnotation.value( "unique" );
if ( uniqueValue != null ) {
this.unique = nameValue.asBoolean();
}
Note that this.unique is set from nameValue.asBoolean instead of the intended uniqueValue.asBoolean. This causes an IlleArgumentException (unless nameValue happens to be a valid boolean value). Only uniqueValue seems to be affected, the remaining properties look ok.
Suggested fix:
replace 'this.unique = nameValue.asBoolean();' by 'this.unique = uniqueValue.asBoolean();'
Consequence of this bug: It is not possible to annotate a property of an entity class by:
@Column(name = "someName", unique = true)
--
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-5882) JPA lazy Load problem on many-to-one property getter
by Leo Deng (JIRA)
JPA lazy Load problem on many-to-one property getter
----------------------------------------------------
Key: HHH-5882
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5882
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0
Environment: Windows 7, JDK 1.6 ,MySQL 5.5
Reporter: Leo Deng
Priority: Critical
Attachments: TestJPA.zip
Hibernate could not work properly when I use lazy load in many-to-one situation.you can run the test case in attachment.
I try to get primary-key property of parent object which get from child object property.Hibernate query the parent object from database by foreign key successfully. But when I try to use org.hibernate.property.Getter Interface to read some property, hibernate return null to me.
My code in attachment can be described as follow:
<1>Test function "TestEagerLoadManyToOne" using Eager load can pass the test. Code logic are:
1)Load Child object from database
2)Get "parentObj" property and test whether "parent_id" field in parent is NULL;
2)Use org.hibernate.property.Getter to get "parent_id" field and test the result.
<2>Test function "TestLazyLoadManyToOne" do exactly same thing just like "TestEagerLoadManyToOne", but the "Child" class change "parentObj" property to lazy load mode. this test function could not pass.
Please fix this issue. It's crucial to my project.
--
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
13 years
[Hibernate-JIRA] Created: (HHH-6678) Update base jDocBook styles
by Steve Ebersole (JIRA)
Update base jDocBook styles
---------------------------
Key: HHH-6678
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6678
Project: Hibernate Core
Issue Type: Task
Components: documentation
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 4.0.0.next
{quote}
For those projects still using the jbossorg-jdocbook-style dependency, you should consider upgrading your pom.xml files to reference the new pressgang-xslt style bundle.
The jbossorg-jdocbook-style dependencies are no longer maintained. PressGang has taken over maintenance of these assets, with a big thanks to Geoffrey for improving the base styles considerably. At the moment, Geoffrey is doing the lion's share of this work and PressGang needs more shipmates to assist with this important work. If you have CSS skills, and a small amount of time to donate, I'd love to hear from you.
You can get the required dependencies for your pom by investigating the pom.xml for the PressGang JBoss Documentation Guide. The new styles are used to give the JBoss Documentation Guide the look and feel.
You can learn more about the styles here: http://www.jboss.org/pressgang/basestyles.html
You can learn more about the JBoss Documentation Guide here: http://www.jboss.org/pressgang/jdg.html
The direct link to the pom.xml config PressGang uses for the guide is here: http://svn.jboss.org/repos/pressgang/pressgang-documentation-guide/trunk/...
Any questions? Please get in touch using the methods described on the PressGang pages listed above. PressGang is on IRC (freenode.org #PressGang) and Twitter (@PressGang).
{quote}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[Hibernate-JIRA] Created: (HCANN-9) Unable to reference JPA entity beans in a different package
by Krashan Brahmanjara (JIRA)
Unable to reference JPA entity beans in a different package
-----------------------------------------------------------
Key: HCANN-9
URL: http://opensource.atlassian.com/projects/hibernate/browse/HCANN-9
Project: Hibernate Commons Annotations
Issue Type: Bug
Environment: Hibernate Annotations 3.4.0.GA in Jboss 5.1.0.GA
Reporter: Krashan Brahmanjara
Problem described in
https://forum.hibernate.org/viewtopic.php?f=1&t=998404
Example
Two classes test.jpa.db1.Card ant test.jpa.db2.Cards are in different packages in the same jar and @ManyToOne fails if deployed on Jboss server
... but it work if these clases are together in the same package.
... it not fails on Weblogic with OpenJpa
Stack trace
09:53:37,609 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=test-services-ear
.ear/test-services-ejb-3.0.alfa-SNAPSHOT.jar#test-services-jpa state=Create
org.hibernate.AnnotationException: @OneToOne or @ManyToOne on test.jpa.db1.Card.podm references an unknown ent
ity: test.jpa.db2.Cards
at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:81)
at org.hibernate.cfg.AnnotationConfiguration.processEndOfQueue(AnnotationConfiguration.java:456)
at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:438)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:309)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
at org.jbtest.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
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.jbtest.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at org.jbtest.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
Tested workarounds, both doesn't work:
- adding an orm.xml file with entries like:
<entity>test.jpa.db1.Card</entity>
<entity>test.jpa.db2.Cards</entity>
- adding an hibernate extensions to class definition like:
@Entity
@org.hibernate.annotations.Entity
@Table(name = "card")
public class Card implements Serializable {
--
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
13 years
[Hibernate-JIRA] Created: (HHH-2907) ability to apply 'generation strategy' to generated properties
by Steve Ebersole (JIRA)
ability to apply 'generation strategy' to generated properties
--------------------------------------------------------------
Key: HHH-2907
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2907
Project: Hibernate3
Issue Type: New Feature
Components: core
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Priority: Minor
Fix For: 3.3
Currently, the support for generated properties allows only for db-generated values (ala triggers etc). Would be great to allow the user to provide a seperate (optional) strategy for generating the generated values.
It would be nice to have a generic solution, which we can build on top of for the more common use cases. Also, we may need to use a name other than 'generated' in the annotations to avoid conflicts with the current @Generated annotation; for now lets use the term @Dynamic.
Consider mapping a 'created timestamp' column. Currently, provided we are using a trigger, that would look like:
@Generated(INSERT) Date created;
The strategy here (^^) is implicitly 'db', as the db is taking care of the generation. In the most generic form, that could be written as:
@Dynamic(time=INSERT,strategy=DB) Date created;
Additionally, since this is such a common case, also allow this:
@CreationTimestamp Date created;
The final form would also allow the definition of strategies. As an example, consider:
@CreationTimestamp(strategy=NOW) Date created;
Here we are not relying on the db to generate the value, but are explicitly telling Hibernate to do it (basically 'use the current timestamp to generate a value here whenever we do an insert').
--
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
13 years