From: <leg...@at...> - 2003-11-28 12:39:15
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Fri, 28 Nov 2003 6:38 AM Body: hmm...I see similar behavior when running this from inside eclipse. When run as debug: classcastexception When run as app: works fine... Gotta be some weird classloader shit....i'm looking into it --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 6:38 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-11-28 13:25:15
|
The following comment has been added to this issue: Author: Panagiotis Louridas Created: Fri, 28 Nov 2003 7:24 AM Body: If I do remove these lines---I am running ant from the command line--- I cannot run the test at all, so I do need them. This is what I get for removing them: [java] java.lang.ExceptionInInitializerError [java] at ProxyTest$1.run(Unknown Source) [java] at junit.swingui.TestRunner$16.run(TestRunner.java:623) [java] Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log [java] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532) [java] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272) [java] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246) [java] at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395) [java] at net.sf.hibernate.cfg.Configuration.<clinit>(Configuration.java:86) [java] ... 2 more [java] Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log [java] at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416) [java] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525) [java] ... 6 more [java] Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log [java] at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412) [java] ... 7 more --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Fix Fors: 2.1 rc1 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 7:24 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-11-28 13:30:18
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Fri, 28 Nov 2003 7:29 AM Body: That looks to me like some really messed up .jar dependencies! I can run your tests just fine from eclipse. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Fix Fors: 2.1 rc1 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 7:29 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-11-28 13:54:15
|
The following comment has been added to this issue: Author: Panagiotis Louridas Created: Fri, 28 Nov 2003 7:54 AM Body: Running ant -v confirms that, apart from hibernate2.jar and all the jars in hibernate/lib, the only other jars included are the postgres drivem the ant jars and the j2sdk tools. The only related dependency I see there is the one between hibernate/lib/junit.jar and hibernate/lib/commons-logging.jar Here is the classpath as output from ant: /home/panos/src/java/HibernateReport3/build/classes /home/panos/src/java/HibernateReport3/src /usr/local/hibernate-2.0/hibernate2.jar /usr/local/hibernate-2.0/lib/commons-lang.jar /usr/local/hibernate-2.0/lib/commons-logging.jar /usr/local/hibernate-2.0/lib/dom4j.jar /usr/local/hibernate-2.0/lib/junit.jar /usr/share/pgsql/pg73jdbc3.jar /usr/local/apache-ant-1.5.3-1/lib/xml-apis.jar /usr/local/apache-ant-1.5.3-1/lib/xercesImpl.jar /usr/local/apache-ant-1.5.3-1/lib/optional.jar /usr/local/apache-ant-1.5.3-1/lib/ant.jar /usr/java/j2sdk/lib/tools.jar --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Fix Fors: 2.1 rc1 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 7:54 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-11-28 14:12:15
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Fri, 28 Nov 2003 8:11 AM Body: From the FAQ at http://www.hibernate.org/119.html: Unit Testing I get a ClassCastException when I try to call Hibernate from inside JUnit. Fix 1 (Gareth Cronin) Anyone using log4j/commons and JUnit should change the junit/runner/excluded.properties file inside junit.jar to look like this (it will get rid of all annoying Jakarta issues): excluded.0=sun.* excluded.1=com.sun.* excluded.2=org.omg.* excluded.3=javax.* excluded.4=sunw.* excluded.5=java.* excluded.6=org.xml.sax.* excluded.7=org.w3c.dom.* excluded.8=org.apache.log4j.* excluded.9=org.apache.commons.* Fix 2 (Eric Everman) Another fix for this is to turn off class reloading in JUnit. Your problem is commons-log, not hibernate. And your solution about shortcutting the threadcontextclassloader will for sure mess up every library that uses reflection. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Fix Fors: 2.1 rc1 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 8:11 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-11-28 14:47:15
|
The following comment has been added to this issue: Author: Panagiotis Louridas Created: Fri, 28 Nov 2003 8:46 AM Body: I tried solution (2) and it works fine. Thanks a lot Max, and sorry for taking up your time. You made at least a few people aroung here pack happy for the weekend. I really appreciate your excellent feedback. In retrospect it seems amazing that, although reflection would be mangled, it has been several months that junit has been used in this way without hibernate carping... Just a suggestion: I had browsed the FAQs and I had seen the item; however, I had been getting no ClassCastException; even now, I get a LogConfigurationException. To be sure, I might have investigated anyway. Still, perhaps others would be saved from trouble if the heading in that FAQ were changed to something like: "using hibernate and junit"? It seems to me that the advice applies *anyway*, ClassCastException or not. Best Regards, Thanks again, Panos. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Fix Fors: 2.1 rc1 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 8:46 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-11-28 15:21:20
|
The following comment has been added to this issue: Author: Max Rydahl Andersen Created: Fri, 28 Nov 2003 9:21 AM Body: Yeah - i'll go change the wording to "I get an exception when running junit" or something like that instead. Don't like the "hibernate and junit" as a problem in one sentence - since the culprit ain't hibernate, but mostly junit and the jakarta libs that messes things up ;) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Fix Fors: 2.1 rc1 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 9:21 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-11-28 15:34:15
|
The following comment has been added to this issue: Author: Panagiotis Louridas Created: Fri, 28 Nov 2003 9:34 AM Body: Great. If you happen by Athens, let me buy you a beer. Best Regards, Panos. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-506 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-506 Summary: Non-deterministic? failure of generated proxies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Fix Fors: 2.1 rc1 Versions: 2.0.3 Assignee: Reporter: Panagiotis Louridas Created: Fri, 28 Nov 2003 3:59 AM Updated: Fri, 28 Nov 2003 9:34 AM Environment: redhat linux 9, j2se 1.4.2 (build 1.4.2-b28), postgres, hibernate 2.0.3 Description: Suppose we have a class hierarchy A <- B, A <- C. Both class B and C have a method getX(). Suppose, moreover, that we have a class R that contains a reference to A. If we do a query on class R and then a query on class B or C, we *sometimes* get a ClassCastException for the generated proxy when we try to call getX(). In my environment, the same test case succeeds or fails upon repeated execution. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |