[Hibernate-JIRA] Commented: (HHH-1293) java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
by Bong Munoz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=c... ]
Bong Munoz commented on HHH-1293:
---------------------------------
My apologies. I was too hasty. I had a copy of Hibernate 3.1.1 earlier in my classpath when I was running my test case. It appears that this issue has been resolved with Hibernate 3.2.0 GA.
> java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
> -----------------------------------------------------------------------------
>
> Key: HHH-1293
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.1
> Reporter: Andreas Schildbach
> Assignee: Scott Marlow
> Priority: Blocker
> Fix For: 3.2.0.cr4
> Attachments: CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch3, CGLIBLazyInitializer.patch4, CGLIBProxyFactory.patch3, HibernateLazyInitializerTest.java, TestProcess.xml, hibernate.properties, hibernate3.jar, manysessions.tgz, patch.CGLIBLazyInitializer.java
>
>
> As documented in
> http://forum.hibernate.org/viewtopic.php?t=940119
> some people (including me) are getting this exception with the final release of Hibernate 3.1:
> java.lang.NoSuchMethodError: de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
> at de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
> at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
> at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
> at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
> at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
> at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
> at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378)
> at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
> at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
> at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
> at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
> at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
> at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
> The exception varies with the actual persistent class in use. Most people seem to be using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very start of the application, but it takes "several invocations"/"some time" until it appear, but then it appears very often.
--
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
19 years, 6 months
[Hibernate-JIRA] Commented: (HHH-1293) java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=c... ]
Max Rydahl Andersen commented on HHH-1293:
------------------------------------------
...and please also show that the debug log printing out Hibernate 3.2.0.GA and not some other "hidden" hibernate version.
> java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
> -----------------------------------------------------------------------------
>
> Key: HHH-1293
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.1
> Reporter: Andreas Schildbach
> Assignee: Scott Marlow
> Priority: Blocker
> Fix For: 3.2.0.cr4
> Attachments: CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch3, CGLIBLazyInitializer.patch4, CGLIBProxyFactory.patch3, HibernateLazyInitializerTest.java, TestProcess.xml, hibernate.properties, hibernate3.jar, manysessions.tgz, patch.CGLIBLazyInitializer.java
>
>
> As documented in
> http://forum.hibernate.org/viewtopic.php?t=940119
> some people (including me) are getting this exception with the final release of Hibernate 3.1:
> java.lang.NoSuchMethodError: de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
> at de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
> at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
> at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
> at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
> at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
> at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
> at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378)
> at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
> at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
> at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
> at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
> at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
> at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
> The exception varies with the actual persistent class in use. Most people seem to be using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very start of the application, but it takes "several invocations"/"some time" until it appear, but then it appears very often.
--
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
19 years, 6 months
[Hibernate-JIRA] Commented: (HHH-1293) java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=c... ]
Max Rydahl Andersen commented on HHH-1293:
------------------------------------------
could you please show the stacktrace you get ? just to verify what you are *actually* seeing ?
> java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
> -----------------------------------------------------------------------------
>
> Key: HHH-1293
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.1
> Reporter: Andreas Schildbach
> Assignee: Scott Marlow
> Priority: Blocker
> Fix For: 3.2.0.cr4
> Attachments: CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch3, CGLIBLazyInitializer.patch4, CGLIBProxyFactory.patch3, HibernateLazyInitializerTest.java, TestProcess.xml, hibernate.properties, hibernate3.jar, manysessions.tgz, patch.CGLIBLazyInitializer.java
>
>
> As documented in
> http://forum.hibernate.org/viewtopic.php?t=940119
> some people (including me) are getting this exception with the final release of Hibernate 3.1:
> java.lang.NoSuchMethodError: de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
> at de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
> at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
> at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
> at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
> at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
> at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
> at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378)
> at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
> at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
> at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
> at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
> at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
> at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
> The exception varies with the actual persistent class in use. Most people seem to be using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very start of the application, but it takes "several invocations"/"some time" until it appear, but then it appears very often.
--
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
19 years, 6 months
[Hibernate-JIRA] Updated: (HHH-1293) java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
by Bong Munoz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=all ]
Bong Munoz updated HHH-1293:
----------------------------
Attachment: HibernateLazyInitializerTest.java
TestProcess.xml
hibernate.properties
I am able to reproduce this problem consistently using jBPM 3.1.1 and Hibernate 3.2.0 GA on Linux running kernel 2.4.31 and Sun Client VM build 1.5.0_06-b05.
I apologize if I am reporting this issue indirectly through jBPM but that is how I can consistently reproduce the problem.
I created 62 process instances then, in a loop, complete the single task instance of each process instance by creating a JbpmContext, ending the task instance, then closing the JbpmContext. I will get the NoSuchMethodError exception on the 33rd iteration.
The error does not occur for 50 process instances. I get the error on the 24th iterator for 75 process instances and on the 17th iteration for 100 process instances. I haven't tried other combinations.
I hope this helps. In the meantime my workaround is to create the JbpmContext outside the loop and close it only after going through all the process instances.
I've attached the JUnit test case, the jBPM process definition file, and the hibernate.properties file. I use the default hibernate.cfg.xml from the jBPM archive.
> java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
> -----------------------------------------------------------------------------
>
> Key: HHH-1293
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.1
> Reporter: Andreas Schildbach
> Assignee: Scott Marlow
> Priority: Blocker
> Fix For: 3.2.0.cr4
> Attachments: CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch3, CGLIBLazyInitializer.patch4, CGLIBProxyFactory.patch3, HibernateLazyInitializerTest.java, TestProcess.xml, hibernate.properties, hibernate3.jar, manysessions.tgz, patch.CGLIBLazyInitializer.java
>
>
> As documented in
> http://forum.hibernate.org/viewtopic.php?t=940119
> some people (including me) are getting this exception with the final release of Hibernate 3.1:
> java.lang.NoSuchMethodError: de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
> at de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
> at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
> at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
> at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
> at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
> at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
> at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378)
> at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
> at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
> at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
> at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
> at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
> at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
> The exception varies with the actual persistent class in use. Most people seem to be using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very start of the application, but it takes "several invocations"/"some time" until it appear, but then it appears very often.
--
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
19 years, 6 months
[Hibernate-JIRA] Commented: (HBX-688) hbm2java is not generating the @Version annotation for the <version ...> element
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-688?page=co... ]
Max Rydahl Andersen commented on HBX-688:
-----------------------------------------
use forum.hibernate.org for usage questions.
> hbm2java is not generating the @Version annotation for the <version ...> element
> --------------------------------------------------------------------------------
>
> Key: HBX-688
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-688
> Project: Hibernate Tools
> Type: Bug
> Components: hbm2java
> Versions: 3.1.beta5
> Reporter: Sean Dawson
>
>
> See http://forum.hibernate.org/viewtopic.php?p=2310547#2310547
> Given a mapping file:
> ----
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <!-- Generated Jun 13, 2006 3:27:21 PM by Hibernate Tools 3.1.0.beta5 -->
> <hibernate-mapping>
> <class name="Sample" table="Sample">
> <id name="id" type="java.lang.Long">
> <column name="id" />
> <generator class="native" />
> </id>
> <version name="version" column="version"/>
> <property name="value" column="value" type="string"/>
> </class>
> </hibernate-mapping>
> ----
> the following ejb is generated (via hbm2java, ejb3="true", jdk5="true":
> ----
> // default package
> // Generated Jun 16, 2006 3:23:35 PM by Hibernate Tools 3.1.0.beta5
> import javax.persistence.Column;
> import javax.persistence.Entity;
> import javax.persistence.GeneratedValue;
> import javax.persistence.Id;
> import javax.persistence.Table;
> /**
> * Sample generated by hbm2java
> */
> @Entity
> @Table(name="Sample"
> )
> public class Sample implements java.io.Serializable {
> // Fields
> private Long id;
> private Integer version;
> private String value;
> // Constructors
> /** default constructor */
> public Sample() {
> }
> /** full constructor */
> public Sample(String value) {
> this.value = value;
> }
>
>
> // Property accessors
> @Id @GeneratedValue
>
> @Column(name="id", unique=false, nullable=false, insertable=true, updatable=true)
> public Long getId() {
> return this.id;
> }
>
> public void setId(Long id) {
> this.id = id;
> }
>
> @Column(name="version", unique=false, nullable=false, insertable=true, updatable=true)
> public Integer getVersion() {
> return this.version;
> }
>
> public void setVersion(Integer version) {
> this.version = version;
> }
>
> @Column(name="value", unique=false, nullable=true, insertable=true, updatable=true)
> public String getValue() {
> return this.value;
> }
>
> public void setValue(String value) {
> this.value = value;
> }
> }
> -----
> There should be a @Version annotation on the version property!
--
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
19 years, 6 months
[Hibernate-JIRA] Commented: (HBX-688) hbm2java is not generating the @Version annotation for the <version ...> element
by Eric Amram (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-688?page=co... ]
Eric Amram commented on HBX-688:
--------------------------------
Would it be possible to specify the name of the column in the reveng.cfg.xml (i.e. a different name than "version") ?
> hbm2java is not generating the @Version annotation for the <version ...> element
> --------------------------------------------------------------------------------
>
> Key: HBX-688
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-688
> Project: Hibernate Tools
> Type: Bug
> Components: hbm2java
> Versions: 3.1.beta5
> Reporter: Sean Dawson
>
>
> See http://forum.hibernate.org/viewtopic.php?p=2310547#2310547
> Given a mapping file:
> ----
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <!-- Generated Jun 13, 2006 3:27:21 PM by Hibernate Tools 3.1.0.beta5 -->
> <hibernate-mapping>
> <class name="Sample" table="Sample">
> <id name="id" type="java.lang.Long">
> <column name="id" />
> <generator class="native" />
> </id>
> <version name="version" column="version"/>
> <property name="value" column="value" type="string"/>
> </class>
> </hibernate-mapping>
> ----
> the following ejb is generated (via hbm2java, ejb3="true", jdk5="true":
> ----
> // default package
> // Generated Jun 16, 2006 3:23:35 PM by Hibernate Tools 3.1.0.beta5
> import javax.persistence.Column;
> import javax.persistence.Entity;
> import javax.persistence.GeneratedValue;
> import javax.persistence.Id;
> import javax.persistence.Table;
> /**
> * Sample generated by hbm2java
> */
> @Entity
> @Table(name="Sample"
> )
> public class Sample implements java.io.Serializable {
> // Fields
> private Long id;
> private Integer version;
> private String value;
> // Constructors
> /** default constructor */
> public Sample() {
> }
> /** full constructor */
> public Sample(String value) {
> this.value = value;
> }
>
>
> // Property accessors
> @Id @GeneratedValue
>
> @Column(name="id", unique=false, nullable=false, insertable=true, updatable=true)
> public Long getId() {
> return this.id;
> }
>
> public void setId(Long id) {
> this.id = id;
> }
>
> @Column(name="version", unique=false, nullable=false, insertable=true, updatable=true)
> public Integer getVersion() {
> return this.version;
> }
>
> public void setVersion(Integer version) {
> this.version = version;
> }
>
> @Column(name="value", unique=false, nullable=true, insertable=true, updatable=true)
> public String getValue() {
> return this.value;
> }
>
> public void setValue(String value) {
> this.value = value;
> }
> }
> -----
> There should be a @Version annotation on the version property!
--
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
19 years, 6 months
[Hibernate-JIRA] Updated: (HHH-1663) <any/> with collection will produce "AssertionFailure: collection was not processed by flush()"
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1663?page=all ]
Steve Ebersole updated HHH-1663:
--------------------------------
Summary: <any/> with collection will produce "AssertionFailure: collection was not processed by flush()" (was: <any> mapping will produce AssertionFailure: collection was not processed by flush())
Fix Version: 3.2.1
Assign To: Steve Ebersole
The scenario is that you have an <any/> mapping where the reference is an entity with a mapped collection. The situation is that during flush, AnyType calls into SessionImplementor.bestGuessEntityName() which in turn forces the entity to initialize. However, it is being initialized in the midts of a flush. The solution is to not initialize the proxy in bestGuessEntityName()...
> <any/> with collection will produce "AssertionFailure: collection was not processed by flush()"
> -----------------------------------------------------------------------------------------------
>
> Key: HHH-1663
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1663
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.0.5, 3.1.3
> Environment: Hibernate 3.1.3, Oracle 9.0.1
> Reporter: Robert Herschke
> Assignee: Steve Ebersole
> Fix For: 3.2.1
> Attachments: AssertionFailureTest.zip
>
>
> I have the following mapping:
> <class name="A">
> <id name="idx">
> <generator class="uuid"/>
> </id>
> <property name="test"/>
> <any name="any" id-type="string" meta-type="string" cascade="none">
> <column name="any_type"/>
> <column name="any_id"/>
> </any>
> </class>
> and:
> <class name="B">
> <id name="idx">
> <generator class="uuid"/>
> </id>
> <set name="as">
> <key column="B_as_idx" not-null="false"/>
> <one-to-many class="A"/>
> </set>
> </class>
> Now I do the following:
> At first I like to create some objects:
> Session s = sf.openSession();
> Transaction tx = s.beginTransaction();
>
> A a = new A();
> Serializable idx = s.save(a);
> B b = new B();
> s.save(b);
>
> a.setAny(b);
> s.update(a);
>
> b.getAs().add(a);
> s.update(b);
>
> tx.commit();
> s.close();
> At next I like to modify A:
> s = sf.openSession();
> tx = s.beginTransaction();
> A a2 = (A)s.get(A.class, idx);
> a2.setTest("hallo!");
> s.update(a2);
>
> tx.commit();
> s.close();
> And it crashes at the second commit() with:
> Exception in thread "main" org.hibernate.AssertionFailure: collection was not processed by flush()
> at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:144)
> at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:305)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
> at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324)
> at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
> at test.Test.main(Test.java:53)
> I've attached a testcase, but please change the hibernate.ora.cfg.xml with your parameters.
--
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
19 years, 6 months
[Hibernate-JIRA] Updated: (ANN-37) @SqlInsert(), @SqlUpdate(), @SqlDelete(), @Loader()
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-37?page=all ]
Emmanuel Bernard updated ANN-37:
--------------------------------
Fix Version: 3.2.1
> @SqlInsert(), @SqlUpdate(), @SqlDelete(), @Loader()
> ---------------------------------------------------
>
> Key: ANN-37
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-37
> Project: Hibernate Annotations
> Type: Improvement
> Components: binder
> Versions: 3.1beta3
> Reporter: Emmanuel Bernard
> Priority: Trivial
> Fix For: 3.2.1
> Attachments: customsqlannotations.patch, customsqlannotationsusingcheck.patch
>
>
> @SqlInsert(statement="", callable=false),
> @SqlUpdate(statement="", callable=false),
> @SqlDelete(statement="", callable=false),
> @Loader(namedQuery="")
--
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
19 years, 6 months
[Hibernate-JIRA] Updated: (ANN-37) @SqlInsert(), @SqlUpdate(), @SqlDelete(), @Loader()
by László Benke (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-37?page=all ]
László Benke updated ANN-37:
----------------------------
Attachment: customsqlannotationsusingcheck.patch
Okay, now using check instead of style.
> @SqlInsert(), @SqlUpdate(), @SqlDelete(), @Loader()
> ---------------------------------------------------
>
> Key: ANN-37
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-37
> Project: Hibernate Annotations
> Type: Improvement
> Components: binder
> Versions: 3.1beta3
> Reporter: Emmanuel Bernard
> Priority: Trivial
> Attachments: customsqlannotations.patch, customsqlannotationsusingcheck.patch
>
>
> @SqlInsert(statement="", callable=false),
> @SqlUpdate(statement="", callable=false),
> @SqlDelete(statement="", callable=false),
> @Loader(namedQuery="")
--
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
19 years, 6 months
[Hibernate-JIRA] Commented: (ANN-37) @SqlInsert(), @SqlUpdate(), @SqlDelete(), @Loader()
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-37?page=com... ]
Max Rydahl Andersen commented on ANN-37:
----------------------------------------
cool.
style= should probably be check=
> @SqlInsert(), @SqlUpdate(), @SqlDelete(), @Loader()
> ---------------------------------------------------
>
> Key: ANN-37
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-37
> Project: Hibernate Annotations
> Type: Improvement
> Components: binder
> Versions: 3.1beta3
> Reporter: Emmanuel Bernard
> Priority: Trivial
> Attachments: customsqlannotations.patch
>
>
> @SqlInsert(statement="", callable=false),
> @SqlUpdate(statement="", callable=false),
> @SqlDelete(statement="", callable=false),
> @Loader(namedQuery="")
--
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
19 years, 6 months