Nome | url |
I think I've stumbled on a pretty dangerous bug. Assume the following case: Code: static Affiliate affiliate; @Transactional @Test @Rollback(false) public void testAffiliateCreate() { affiliate = dataPoolFactory.getAffiliate(); // get an object full of random-filled fields ... |
|
StatelessSession session = sf.openStatelessSession(); Transaction tx = session.beginTransaction(); try { Query qry = session.getNamedQuery("getAll"); qry.setMaxResults(maxResults); qry.setFirstResult(offset); final Iterator sc = qry.iterate(); ... |
user is one to one with address,i want to find users who's address is null ,i use the codes as follows: Session session = sessionFactory.openSession(); Criteria query = session.createCriteria(User.class); query.add(Restrictions.isNotNull("address")); query.setMaxResults(limit); List users = query.list(); it does't work i check the sql that hibernate generates ...from user this_ left outer join address address2_ on this_.Id=address2_.userId where this_.Id is not null limit ... |
Newbie Joined: Wed Sep 08, 2010 3:28 am Posts: 4 Hi ! I use JBoos 6M5 with Hibernate 3.5.5-Final in the past and all works fine, so i try the final 6 version with Hibernate 3.6.0.Final In the two version i have this error ( i am on ADABAS D database with a my own dialect and that's worked fine ) ... |
|
Maybe they don't want to fix issues, that don't have some forum background. That means, lot of people having the same problem. We provided test case and also the patch for the code. From test case, it should be clear what is happening. In previous bugs, I provided test case as a patch to test case suite, now as a standalone ... |
Hello, We are going to trouble of deeply investigating issues, creating test cases and raising issues to help improve the quality of Hibernate but there has been an agressive approach to reject or simply not look at obvious test cases showing reproducable issues - this is pretty frustrating. As a simple example here are some issues that currently impact us that ... |
Hi Guys I am sitting with this exception for almost the whole day . No clue about how to solve this . The following piece of code while running is giving me classcast exception. We are using Jboss 6 and Hibernate 3 to run this code. The full stack trace is below String sql = "select sarthakModel from SarthakModel customerModel WHERE ... |
|
Hi, I'm sorry for that, yes it might happen as we receive many issues which are actually user errors. The best way is to propose a fix as well and send a pull request via github, that's the easiest solution for us and provides a good hint about goodwill. Not saying you're report is bad, just that it might not have ... |
While using hibernate with CGLIB-generated proxies, I found out that one proxy is generated for classes in the same inheritance hierarchy. This can create problems. Suppose we have classes A, B subclass of A and C subclass of A. Suppose further that A has a method foo(), B has also a method foo() and C has a method foo(int); then CGLIB ... |
Author Message dia100 Post subject: The new 2.1: new (possible) bugs ? Posted: Mon Nov 03, 2003 12:11 pm Pro Joined: Mon Sep 08, 2003 4:30 pm Posts: 203 Hi all, Problem #1: I have some code which works fine on 2.0 . List newList = null; try { q =sess.getPersistentSession().createQuery( "from nemgmtinfo in class com.db.device.NEMgmtInfo"); newList = q.list(); ... |
Pro Joined: Mon Sep 08, 2003 4:30 pm Posts: 203 I have to make the post shorter. Again: Hi all, Problem #1: I have some code which works fine on 2.0 . List newList = null; try { q =sess.getPersistentSession().createQuery( "from nemgmtinfo in class com.db.device.NEMgmtInfo"); newList = q.list(); } catch (HibernateException e) { throw new DAOException(e); }catch (Throwable e) { e.printStackTrace(); ... |
Hi, I experimented a bit with hibernate and have some strange behaviour on rollback: Transaction hibernateTransaction = hibernateSession.beginTransaction(); Employee employee = new Employee(); // initialize employee here hibernateSession.save(employee); hibernateTransaction.commit(); Iterator iter = hibernateSession.iterate("from " + Employee.class.getName()"); while ( iter.hasNext() ) { System.out.println("found after commit" + iter.next()); } hibernateSession.delete(employee); //hibernateSession.flush(); hibernateTransaction.rollback(); iter = hibernateSession.iterate("from " + Employee.class.getName()); while ( iter.hasNext() ) { ... |
Newbie Joined: Sun Aug 31, 2003 1:29 pm Posts: 18 I've read this postings: http://forum.hibernate.org/viewtopic.php?t=549 and i think this IS a bug. To be sure i made a small sample with 3 classes: Person, Vehicle and Car A Test class shows the behavior. you can switch between the "working" and the "not working" saveOrUpdate with the static boolean inverse = true|false ... |
|
Hi, I'm very new, so please bear with me. I've got two tables user_groups and user_group_hierarchies. The later has two foreign keys (parent_id, child_id) to the primary key of the former (user_groups) table. This allows user_groups to be placed in a tree structure. I'm trying to return the parent_id as part of the user_group data when I query for user_groups. I ... |
Hiya I've been using 2.0.3 for some time, but I wanted some of the new 2.1 features, and so I downloaded 2.1rc1 and have been trying that out. Unfortuneately it doesn't work. I've tracked it down to the use of the the element inside a element. I use this to set the name of the generated class - I ... |
net.sf.hibernate.MappingException: bug in initComponentPropertyPaths at net.sf.hibernate.persister.AbstractPropertyMapping.initComponentPropertyPaths(AbstractPropertyMapping.java:140) at net.sf.hibernate.persister.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:111) at net.sf.hibernate.persister.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:80) at net.sf.hibernate.persister.AbstractEntityPersister.initPropertyPaths(AbstractEntityPersister.java:503) at net.sf.hibernate.persister.EntityPersister.postInstantiate(EntityPersister.java:112) at net.sf.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:155) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:720) at com.foobarcompany.Hibertest.Main.main(Main.java:35) Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at net.sf.hibernate.util.ArrayHelper.slice(ArrayHelper.java:61) at net.sf.hibernate.persister.AbstractPropertyMapping.initComponentPropertyPaths(AbstractPropertyMapping.java:135) ... |
Newbie Joined: Fri Dec 05, 2003 12:44 am Posts: 16 given the following mapping Code: |
|
Newbie Joined: Wed Jan 21, 2004 5:09 am Posts: 11 Hi. I need to make a custom type that - will set -1 on the object field if the db field is null - will store null in db if the object field value = -1 I made one. It works for save but an error is returned on get. I ... |
There is a bug in the JDK method Introspector.decapitalise() which causes the getSetter and getGetter methods in BasicPropertyAccessor to fail in certain esoteric situations. Consider: propertyName = ABcd Introspector.decapitalise() returns "ABcd" but should return "aBcd" This is because decapitalise() tries to return property names like URL as "URL" and not "uRL". However, to make this decision, it incorrectly just checks the ... |
Nick, if you want quicker attention, you should include: - the Hibernate debug logging before the error (including the generated SQL) - the Hibernate code you were executing at the time (your complete test case?!) - any applicable mapping files - the Hibernate configuration Otherwise you are not really giving much information to debug with. |
32. 2.1.2 bugs forum.hibernate.orgI'm using Sybase ASE 12.5 and Hibernate 2.1.2 seems to have introduces a couple of annoying bugs. I went back to beta 6 last night and it work fined. Therefore, I'm pretty sure the following two items represent 2.1.2 bugs. Hope someone can provide some insight into this: 1. "SybSQLException: Select expression results in more than one column having same name. ... |
BUG: AbstractEntityPersister is not detecting the Case Sensitive Columns from the hbm file Try this This will throw exception : Repeated column in mapping for class (line no 1000 in net.sf.hibernate.persister.AbstractEntityPersister) But try changing the column name to |
Group group = new Group(); course.getGroups().add(group); group.setCourse(course); Session session = obtainSession(); ... |
35. A Bug? forum.hibernate.orghibernate 2.1.2 I had the following configuration file ... Code: net.sf.hibernate.dialect.Oracle9Dialect oracle.jdbc.driver.OracleDriver ... |
Hi I need to have to classes with same name persisted by hibernate - of course they are in 2 different packages. Hibernate version is 2.1.3 (db is postgresql, but I suspect it has nothing to do with the problem, jre is sun 1.4.2 executed in eclipse) In the hibernate config file, I have the first one ... |
We started developing a medium web application (appr. 30k LOC) with hibernate about 9 months ago. in the beginning we struggled quite a bit and had some problems with synchronizing objects between sessions, mapping stuff and so on. but after some time we really started loving hibernate and i think we accumulated quite a bit of knowledge and best practices in ... |
I just upgrade to hibernate 2.1.3 with sqlserver and started having a problem where hibernate didn't translate the HQL -> SQL properly when using the sqlserver keyword "user" in the HQL. Unfortunately, sqlserver being irritable, it didn't error...it just returned the user for the given rows of the user table ("dbo") instead of User objects. Here's the log file. Code: 13:07:24,279 ... |
I found a bug! java.lang.ClassCastException at net.sf.hibernate.type.StringType.toString(StringType.java:47) at net.sf.hibernate.type.NullableType.toString(NullableType.java:78) at net.sf.hibernate.impl.Printer.toString(Printer.java:49) at net.sf.hibernate.impl.Printer.toString(Printer.java:82) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2270) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2228) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at persistencia.impl.CompraDbAO.salvar(CompraDbAO.java:79) at persistencia.impl.CompraDbAO.main(CompraDbAO.java:192) Exception in thread "main" My mapping: |
Hibernate latest version database mysql latest version Hi there, I have a one to many bidirectional relationship between a single person and many books, in my code : Session sess = factory.openSession(); Transaction y = sess.beginTransaction(); for(int i=0;i<10;i++) { Person p = (Person)sess.load(new Long(1)); Book b = new Book(); b.setXXX() b.setXXX() b.setXXX() b.setPerson(p); p.addToBooks(b); sess.flush(); t.commit(); } sess.close(); what i am ... |
Testcase: testOuterJoin took 42.827 sec Caused an ERROR IllegalArgumentException occurred calling getter of org.hibernate.test.Jay.id net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of org.hibernate.test.Jay.id at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(Ljava.lang.Object;)Ljava.lang.Object;(BasicPropertyAccessor.java:114) at net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(Ljava.lang.Object;)Ljava.io.Serializable;(AbstractEntityPersister.java:307) at net.sf.hibernate.proxy.HibernateProxyHelper.getIdentifier(Ljava.lang.Object;Lnet.sf.hibernate.persister.ClassPersister;)Ljava.io.Serializable;(HibernateProxyHelper.java:48) at net.sf.hibernate.type.EntityType.toString(Ljava.lang.Object;Lnet.sf.hibernate.engine.SessionFactoryImplementor;)Ljava.lang.String;(EntityType.java:85) at net.sf.hibernate.type.PersistentCollectionType.toString(Ljava.lang.Object;Lnet.sf.hibernate.engine.SessionFactoryImplementor;)Ljava.lang.String;(PersistentCollectionType.java:82) at net.sf.hibernate.impl.Printer.toString(Ljava.lang.Object;)Ljava.lang.String;(Printer.java:50) at net.sf.hibernate.impl.Printer.toString(Ljava.util.Iterator;)V(Printer.java:83) ... |
|
I have column ponedjeljak as char(1), it was declared in java: private char ponedjeljak='0'; public char getPonedjeljak() { return ponedjeljak; } public void setPonedjeljak(char ponedjeljak) { this.ponedjeljak=ponedjeljak; } After calling in code setPonedjeljak('1') I will get in database value 't' instead of '1'. Problem was because I had method: public boolean isPonedjeljak() { return '1'==getPonedjeljak(); } After I renamed method isPonedjeljak() ... |
Negative. The way this can happen is if you have shared your session between two threads, or called back into the session during flush. Since it happens unpredictably, I would bet on a threading problem. Note that since Hibernate itself is single threaded, and shares very little state between concurrent application threads, "sporadic" bugs are almost certainly NOT Hibernate bugs. |
Hi, I couple of days I downloaded a cvs snapshot of hibernate 3.0 The reason I did this was because I wanted to use the improved startup code (serialized mapping documents) in order to reduce the startup time in my program. I changed few lines in the source code in order to have hibernate generate and load serialized mapping files. Please ... |
private static final String RECOMENDATIONS_QUERY = "select ra.recommendationId, sum(ra.allocation * ra.allocation) " + "from " + RecommendedAllocation.class.getName() + " ra " + ... |
|
Newbie Joined: Sat Jan 31, 2004 3:56 pm Posts: 8 Hibernate version:2.1 Mapping documents: Actuele status van het aanvraagdossier. @author Cipal NV be.cipal.jade.jadeejbcommon.hibernate.AuditPojo false ... |
Hi I'm trying to connect to a non-existent server (this happens for example, when I disconnect my machine from the network) in which case when I try to create the SessionFactory I get an infinite, repeating, exception loop. This is my code: Code: public synchronized void setConfiguration(Configuration configuration) throws HibernateException { ... |
|
Newbie Joined: Mon Dec 13, 2004 2:32 am Posts: 8 Hi Everybody, I don't know if it is really is a BUG, but I would like the folks at hibernate to definatly have a look at this problem. After roughly a week and half of painful debugging, I figured out the problem with hibernate generating only a "PARTIAL QUERY" for the ... |
Hibernate version: 2.1 I think I have identified a bug in the class BasicPropertyAccessor used by hibernate. I have a bean in which I have properties which are called names like xUnit and zIndex. Notice that the first part of the names are a single letter (x and z respectively). Hibernate is unable to find my corresponding getter methods getXUnit and ... |
|
|
|
Using ImprovedNamingStrategy but getting odd output. I am not sure if it is a bug or if it is by-design. When placing an explicit column name and using ImprovedNamingStrategy. I am inclined to think it is a bug but I see that it is released in Hibernate 3. Q: Is this a bug or am I doing something wrong? Code: input ... |
http://opensource.atlassian.com/project ... se/HB-1483 Gavin closed this with the comment "test case ran fine once i fixed the bug in your mapping (node name on composite-id tag)" But, I don't have a composite-id element in my mapping. Gavin? Was that closure meant for that bug? And as far as runnable code for the test case, How do you set up two database ... |
It is interessting that a bug if mine gets rejected (HHH-384: CacheMode Get has no effect on flush) with the explaination that everything works as it should, but it still gets fixed in 3.0.2 --> improved CacheMode.GET/IGNORE, disabled cache put Can somebody pls explain that to me? Obviously my original assumption was correct and there was a bug and it was ... |
public String getIdentitySelectString(String table, String column, int type) throws MappingException { return type==Types.BIGINT ? "select dbinfo('serial8') from systables where tabid=1" : "select dbinfo('sqlca.sqlerrd1') from systables where tabid=1"; } ... |
In the Hibernate 3.0 Quickstart with TomCat tutorial, there is a table on page 1 outlining the required jars. I think there is one mandatory jar library that is missing - namely asm.jar. asm.jar provides the org.objectweb.asm.Type required by the SessionFactoryImplementation. Is this correct? If so, I'll file a bug on it. -david- |
Author Message min9081 Post subject: Is there any bug in HibernatTemplate()? Posted: Fri May 20, 2005 4:13 pm Newbie Joined: Tue May 17, 2005 1:48 pm Posts: 3 Location: New York Hibernate 2.0 I tried to use hibernate to insert student record into Oracle9i. Looking at the Log, it seems like it works okay right before excuting insert statement. ... |
Hi, in Hibernate 2.1.7 there seems to be a bug in which java strings are mapped to long data types in Oracle. This bug is fixed in Hibernate 3.0 but unfortunately I am using Spring, which only works for Hibernate 2.1. Is there a patch for the older version of hibernate which can fix this? Thanks |
|
I am mapping a legacy database model with Hibernate. Now I got an ConstraintViolationException. I think it is a bug. Here is simple test case which show my problem: Hibernate version: 3.0.4/3.05 Mapping documents: |
Hibernate version: 3.0.5 Hi, i found 2 documentation errors in version 3.0.5 of the hibernate documentation. The errors exist in the html and pdf documentation. 1. In Chapter "7.3.4. Using an " In the mapping example there is the following many-to-many tag : Since the outer-join attribute is deprecated the fetch attribute should be used : |
|
|
I am new to this forum however I believe I have found a bug and I'm asking it here prior to submitting it to the issue tracker. Environment: Hibernate-3.0.5 Postgres 7.2.1 SpringFramework 1.2 org.hibernate.cfg.SettingsFactory.buildSettings(Properties props) line74 makes a call to conn.getMetaData(); By making this call a transaction begins. Then in the finally block of this method a call is made to ... |
Hibernate version: 3.0.5 Hi forum, I don't really need an answer to this one as I already discovered a workaround - so this is just to let you know. But, if anyone wants more specific info, just say so. The situation is as follows: I have a postgresql database (PostgreSQL 7.4.7 on i386-pc-linux-gnu, compiled by GCC gcc-3.3.gcc-opt (GCC) 3.3.5 (Debian 1:3.3.5-8ubuntu2) ... |
Hi there, perhaps this is another Bug in HibernateTools 3.0 Alpha4. If the hashCode() Method is generate it will not ensure that a mandantory field isn't null. So the following scenario will lead to a NPE: A User creates a new Object by opening a dialog so the default Constructor will be used. No Mandantory field is set so far if ... |
Why does the first set fail to delete, while the second set works just fine? Is this a bug or am I missing something in my mapping? |