You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <leg...@at...> - 2003-10-20 11:35:40
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-412 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-412 Summary: OSCache support for Hibernate 2.1 Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 Assignee: Reporter: Mathias Bogaert Created: Mon, 20 Oct 2003 6:34 AM Updated: Mon, 20 Oct 2003 6:34 AM Environment: OSCache 2.0 and Hibernate 2.1 (CVS as from yesterday) Description: Attached is an example how to integrate OpenSymphony OSCache and Hibernate's 2.1 caching system. Because of the fact that the cache is not reponsible for refreshing, the nice fail-over feature of OSCache is not used (yet). --------------------------------------------------------------------- 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-10-20 09:29:18
|
The following comment has been added to this issue: Author: Dominik Roblek Created: Mon, 20 Oct 2003 3:56 AM Body: Thanks for help. The problem really appeared because of CGLIB tried to instantiate an instance of the instrumented class and this instantiation was not possible at the Hibernate configuration time because of poor design of my class. I fixed it and now it works fine. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Sat, 18 Oct 2003 6:29 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- 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-10-20 04:24:02
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-410 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-410 Summary: unable to use hbm2java with middlegen . I have a generator-class for an id but it seems to complain. Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: Reporter: sudhir srinivasan Created: Sun, 19 Oct 2003 9:36 PM Updated: Sun, 19 Oct 2003 9:36 PM Environment: windows, jdk1.4.1 Description: I am trying to use hbm2java with middlegen generated hbm.xml files This is my build file task foor hgm2java. <target name="hbm2java" depends="middlegen" description="Generate .java from .hbm files."> <echo>running a search</echo> <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="hbm2java.class.path" > <arg value="--output=${build.classes.dir}"/> <arg value="--config=${basedir}/hbm2java.xml"/> <arg value="${build.dir}/gen-src/airline/hibernate/Channel.hbm.xml"/> </java> </target> Here is the file generated by middlegen . <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <!-- Created by Middlegen Hibernate plugin http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ --> <class name="airline.hibernate.Channel" table="channels" > <!-- simple properties --> <id generator-class="assigned" name="channelId" type="int" column="channel_id" not-null="true" length="3" > <property name="description" type="java.lang.String" column="description" length="255" > <property name="hits" type="int" column="hits" length="1" > <property name="lastUpdated" type="java.sql.Timestamp" column="last_updated" length="19" > <property name="site" type="java.lang.String" column="site" length="255" > <property name="creator" type="java.lang.String" column="creator" length="255" > <property name="publisher" type="java.lang.String" column="publisher" length="255" > <!-- associations --> </class> </hibernate-mapping> here is error [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "generator-class" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(68) [java] org.xml.sax.SAXParseException: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] org.jdom.JDOMException: Error on line 68 of document file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) --------------------------------------------------------------------- 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-10-20 03:30:53
|
The following comment has been added to this issue: Author: sudhir srinivasan Created: Sun, 19 Oct 2003 9:43 PM Body: Ok that was a middlegen issue. Previously the generated xml was - <id generator-class="assigned" name="channelId" type="int" column="channel_id" not-null="true" length="3" > Changed the template in hibernate plugin for middlegen to generate it with " />" Now next error - The ant task and the xml file are otherwise same. java.lang.NullPointerException [java] at net.sf.hibernate.tool.hbm2java.ClassMapping.initWith(ClassMapping.java:194) [java] at net.sf.hibernate.tool.hbm2java.ClassMapping.<init>(ClassMapping.java:73) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:99) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-410 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-410 Summary: unable to use hbm2java with middlegen . I have a generator-class for an id but it seems to complain. Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: Reporter: sudhir srinivasan Created: Sun, 19 Oct 2003 9:36 PM Updated: Sun, 19 Oct 2003 9:36 PM Environment: windows, jdk1.4.1 Description: I am trying to use hbm2java with middlegen generated hbm.xml files This is my build file task foor hgm2java. <target name="hbm2java" depends="middlegen" description="Generate .java from .hbm files."> <echo>running a search</echo> <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="hbm2java.class.path" > <arg value="--output=${build.classes.dir}"/> <arg value="--config=${basedir}/hbm2java.xml"/> <arg value="${build.dir}/gen-src/airline/hibernate/Channel.hbm.xml"/> </java> </target> Here is the file generated by middlegen . <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <!-- Created by Middlegen Hibernate plugin http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ --> <class name="airline.hibernate.Channel" table="channels" > <!-- simple properties --> <id generator-class="assigned" name="channelId" type="int" column="channel_id" not-null="true" length="3" > <property name="description" type="java.lang.String" column="description" length="255" > <property name="hits" type="int" column="hits" length="1" > <property name="lastUpdated" type="java.sql.Timestamp" column="last_updated" length="19" > <property name="site" type="java.lang.String" column="site" length="255" > <property name="creator" type="java.lang.String" column="creator" length="255" > <property name="publisher" type="java.lang.String" column="publisher" length="255" > <!-- associations --> </class> </hibernate-mapping> here is error [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "generator-class" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(28) [java] org.xml.sax.SAXParseException: Attribute "not-null" must be declared for element type "id". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] Oct 19, 2003 10:32:33 PM net.sf.hibernate.tool.hbm2java.CodeGenerator$1 error [java] SEVERE: Error parsing XML: file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml(68) [java] org.xml.sax.SAXParseException: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [java] at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) [java] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) [java] org.jdom.JDOMException: Error on line 68 of document file:/C:/eclipse/workspace/bloggagg/build/gen-src/airline/hibernate/Channel.hbm.xml: The element type "property" must be terminated by the matching end-tag "</property>". [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707) [java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689) [java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:93) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:443) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) [java] at org.apache.tools.ant.Task.perform(Task.java:341) [java] at org.apache.tools.ant.Target.execute(Target.java:309) [java] at org.apache.tools.ant.Target.performTasks(Target.java:336) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1255) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569) [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335) [java] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172) [java] at java.lang.Thread.run(Thread.java:536) --------------------------------------------------------------------- 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-10-19 20:40:03
|
The following issue has been updated: Updater: Max Rydahl Andersen (mailto:xa...@xa...) Date: Sun, 19 Oct 2003 3:13 PM Comment: Attempt to fix it ;) Changes: Attachment changed to compositeidsqlloader.patch --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-407&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-407 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-407 Summary: Composite keys do not work with native createSQLQuery Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Versions: 2.1 beta 4 2.1 beta 5 Assignee: Max Rydahl Andersen Reporter: David Morris Created: Thu, 16 Oct 2003 12:19 PM Updated: Sun, 19 Oct 2003 3:13 PM Description: Composite key columns are not found when replacing bracketed names. See thread http://forum.hibernate.org/viewtopic.php?t=924785 for more details. --------------------------------------------------------------------- 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-10-19 04:11:24
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-409 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-409 Summary: SchemaUpdate fails on MySQL 4.0.11 because table name case sensitivity Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: Reporter: Toni Bennasar Obrador Created: Sat, 18 Oct 2003 5:44 PM Updated: Sat, 18 Oct 2003 5:44 PM Environment: Mandrake Linux 9.1 on x86, using MySQL 4.0.11 and official MySQL JDBC v3.0.9 , and Hibernate 2.0.3 Description: Hello. I have the following problems: I try to do a SchemaUpdate over a MySQL DB over database where the update should add some fields to some table, but the SchemaUpdate try to re-create the table, with <<SQLException>> results... I did a debug to see what happens and the problem is at net.sf.hibernate.tool.hbm2ddl.DatabaseMetadata at line 47 , where the tool finds if the table exists or not, to create or update the table, : public TableMetadata getTableMetadata(String name) throws HibernateException { ... String[] types = {"TABLE"}; ResultSet rs = null; try { try { THIS>>rs = meta.getTables(null, "%", name.toUpperCase(), types); while ( rs.next() ) { if ( name.equalsIgnoreCase( rs.getString("TABLE_NAME") ) ) { table = new TableMetadata(rs, meta); tables.put( name.toUpperCase(), table ); break; } The line 47 is rs=meta.getTables(null, "%", name.toUpperCase(),Types); The problem is that hibernate creates the tables (with SchemaExport) with lower case, and MySQL is case sensitive for table names on Unix (see http://www.mysql.com/doc/en/Name_case_sensitivity.html). But the .getTables call finds the upper case table name. Then, never is found, and it try to create the table when it exists. The fix is remove the .toUpperCase() : rs = meta.getTables(null, "%", name, types); or SchemaExport should create the tables with upper case. Hibernate is great. Thanks for all. --------------------------------------------------------------------- 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-10-18 12:11:49
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 18 Oct 2003 6:20 AM This has been discussed and rediscussed -many- times and I am sticking with the current behaviour. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-406 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-406 Summary: graph loading breaks on complex hierarchies Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: Andrey Volozin Created: Thu, 16 Oct 2003 9:57 AM Updated: Sat, 18 Oct 2003 6:20 AM Environment: Pentium IV 2.40 GHz, Windows XP, JDK 1.3 Description: I have a relatively complex hierarchy of objects: A is common superclass B, C, D are subclasses D incapsulates collections of B and C here is my hbm.xml file: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="A"> <id name="id"> <generator class="hilo"> <param name="table">hi_value</param> <param name="column">next_value</param> <param name="max_lo">100</param> </generator> </id> <discriminator column="class_name"/> <property name="f1"/> <subclass name="B"> <property name="f2"/> </subclass> <subclass name="C"> <property name="f3"/> </subclass> <subclass name="D"> <set name="lnkB" cascade="all"> <key column="d_id"/> <one-to-many class="B"/> </set> <set name="lnkC" cascade="all"> <key column="d_id"/> <one-to-many class="C"/> </set> <property name="f4"/> </subclass> </class> </hibernate-mapping> here are the classes: public abstract class A { private Long id; private String f1; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getF1() { return f1; } public void setF1(String f1) { this.f1 = f1; } } public class B extends A { private String f2; public String getF2() { return f2; } public void setF2(String f2) { this.f2 = f2; } } public class C extends A { private String f3; public String getF3() { return f3; } public void setF3(String f3) { this.f3 = f3; } } public class D extends A { private String f4; private Collection lnkB; private Collection lnkC; public String getF4() { return f4; } public void setF4(String f4) { this.f4 = f4; } public Collection getLnkB() { return lnkB; } public void setLnkB(String lnkB) { this.lnkB = lnkB; } public String getLnkC() { return lnkC; } public void setLnkC(String lnkC) { this.lnkC = lnkC; } } I persisted data to the database using the following code: public class TestMain { static Session session; static SessionFactory sessionFactory; public static Collection createB() throws HibernateException, SQLException { Collection results = new HashSet(); B b = new B(); b.setF2("foo"); results.add(b); b = new B(); b.setF2("bar"); results.add(b); return results; } public static Collection createC() throws HibernateException, SQLException { Collection results = new HashSet(); C c = new C(); c.setF3("foo"); results.add(c); c = new C(); c.setF3("bar"); results.add(c); return results; } public static D createD(Collection b, Collection c) throws HibernateException, SQLException { D d = new D(); d.setF1("foo"); d.setLnkB(b); d.setLnkC(c); session.save (d); System.out.println ("Persisting D"); return d; } public static void main(String[] args) { D d; try { sessionFactory = new Configuration().configure().buildSessionFactory(); if (sessionFactory == null) { System.out.println ("null session factory returned"); return; } System.out.println ("Got Session Factory"); session = sessionFactory.openSession(); Collection b = createB(); Collection c = createC(); d = createD(b, c); session.flush(); session.connection().commit(); System.out.println ("Committing"); session.close(); } catch (MappingException e){ System.out.println (e); } catch (HibernateException e) { System.out.println(e); } catch (Throwable e) { System.out.println (e); e.printStackTrace(); } } } then I started my application again but instead of persistence I did retrieval (I looked up id of D instance in the database): D d = (D) session.load(D.class, new Long(1615)); But it failed with the message: Object with id: 1618 was not of the specified subclass: C (loaded object was of wrong class) Indeed, the object with id 1618 had "B" in the discriminator field and database record corresponded to B instance. --------------------------------------------------------------------- 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-10-18 12:11:37
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 18 Oct 2003 6:22 AM HIbernate uses Introspector.decapitalize() in order to be compliant with the JavaBeans spec. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-405 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-405 Summary: SchemaExport unable to find getter for tO or cC properties. Type: Bug Status: Closed Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: Reporter: Brian Duguid Created: Thu, 16 Oct 2003 9:03 AM Updated: Sat, 18 Oct 2003 6:22 AM Environment: Coding and using tool in JBuilder 9 Enterprise Description: The SchemaExport tool works fantastic with the exception of compiling for properties that have the second letter in uppercase even though the first leter is lowercase. For example, I have an object that is used to store e-mail communications. The "to," "cc," and "bcc" addresses properties are written as tO, cC, and bCC so the getter and setters are "pretty" (getTO(), getCC(), getBCC()). I am able to fix the error by having the first two letters of the property as lowercase and the third letter as uppercase is acceptable. i.e. property bcC with getBcC() works fine. The error that is thrown read as: ERROR [main] (Configuration.java:233) - Could not compile the mapping document net.sf.hibernate.PropertyNotFoundException: Could not find a getter for bcC in class fdot.prm.directory.email.EmailRecord at net.sf.hibernate.util.ReflectHelper.getGetter(ReflectHelper.java:206) at net.sf.hibernate.util.ReflectHelper.reflectedPropertyType(ReflectHelper.java:260) at net.sf.hibernate.mapping.Value.setTypeByReflection(Value.java:92) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:912) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:294) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1095) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:273) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:838) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:792) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:746) at fdot.prm.directory.DDLExporter.main(DDLExporter.java:29) rethrown as net.sf.hibernate.MappingException: Problem trying to set property type by reflection: Could not find a getter for bcC in class fdot.prm.directory.email.EmailRecord at net.sf.hibernate.mapping.Value.setTypeByReflection(Value.java:103) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:912) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:294) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1095) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:273) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:838) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:792) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:746) at fdot.prm.directory.DDLExporter.main(DDLExporter.java:29) Caused by: net.sf.hibernate.PropertyNotFoundException: Could not find a getter for bcC in class fdot.prm.directory.email.EmailRecord at net.sf.hibernate.util.ReflectHelper.getGetter(ReflectHelper.java:206) at net.sf.hibernate.util.ReflectHelper.reflectedPropertyType(ReflectHelper.java:260) at net.sf.hibernate.mapping.Value.setTypeByReflection(Value.java:92) ... 10 more ERROR [main] (Configuration.java:233) - Could not compile the mapping document net.sf.hibernate.MappingException: duplicate import: EmailRecord at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:60) at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:108) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:165) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1095) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:273) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:841) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:792) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:746) at fdot.prm.directory.DDLExporter.main(DDLExporter.java:29) Error initializing configuration: duplicate import: EmailRecord Thanks. --------------------------------------------------------------------- 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-10-18 12:11:27
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 18 Oct 2003 6:29 AM Ah yeah, I think CGLIB tries to instantiate an instance of the class when it creates a "proxy factory". Well, you can ask the CGLIB guys about this. But I won't change Hibernate - it is now using CGLIB as recommended by the CGLIB guys. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Sat, 18 Oct 2003 6:29 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- 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-10-18 12:11:24
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 18 Oct 2003 6:25 AM This is an interesting observation. I'm half inclined to accept your patch. OTOH, it seems to be a problem specifically with the JCS cache architecture. (For example, it would not affect the new HashtableCache.) Note that we are de-emphasizing JCS! Anyway, I'll give it some thought when I do the distributed cache stuff with Bela, but for now this kind of stuff -can- actually be handled in the pluggable cache layer by passing properties, etc. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-404 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-404 Summary: Caching problem with same class mapped in many sessionFactories Type: Bug Status: Closed Priority: Minor Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: William Drai Created: Wed, 15 Oct 2003 6:20 PM Updated: Sat, 18 Oct 2003 6:25 AM Description: I want to map the same class in two different sessionFactories using two different databases. As the cache region is defined only by the class name, the cache is not able to differentiate instances of the same class with the same id in different databases. I have made a patch for Hibernate 2.0.3 which just add a new parameter 'cache-region-prefix' in the session factory configuration and it works perfectly. As the caching system is completely being refactored, it would be really cool if this simple fix was included in the refactoring. Thanks. William --------------------------------------------------------------------- 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-10-18 12:11:17
|
Message: The following issue has been re-assigned. Assignee: Max Rydahl Andersen (mailto:xa...@xa...) Assigner: Gavin King (mailto:ga...@in...) Date: Sat, 18 Oct 2003 6:27 AM Comment: Max, I think you understand this issue, so please take a look, but check with me before changing anything. TIA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-407 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-407 Summary: Composite keys do not work with native createSQLQuery Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Versions: 2.1 beta 4 2.1 beta 5 Assignee: Max Rydahl Andersen Reporter: David Morris Created: Thu, 16 Oct 2003 12:19 PM Updated: Sat, 18 Oct 2003 6:27 AM Description: Composite key columns are not found when replacing bracketed names. See thread http://forum.hibernate.org/viewtopic.php?t=924785 for more details. --------------------------------------------------------------------- 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-10-18 12:11:10
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 18 Oct 2003 6:19 AM WTF?! Please do not do this! --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-408 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-408 Summary: test Type: Task Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Assignee: Reporter: HeYu Created: Thu, 16 Oct 2003 9:29 PM Updated: Sat, 18 Oct 2003 6:19 AM Environment: test Description: test --------------------------------------------------------------------- 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: William R. L. <wr...@ex...> - 2003-10-17 18:44:51
|
All, I'm trying to do an inner join within Hibernate, but I'm having some difficulties and am hoping there's some knowledgeable people on the list. I have two objects: a Session object and an Account object, which can be joined in a query with session.field = account.field4; however, I don't have any mappings defined in the Hibernate .hbm.xml files to this effect. Table Structure, session.field1 = account.field4: Session Account ------- ------- id id field1 <-| field3 field2 |-> field4 Even though I don't have the mappings defined between objects in the Hibernate configuration files (for reasons I won't go into), I want to do an inner join and return objects of type Session only if account.field3 equals a particular value. In SQL, I could do this using something like: SELECT * FROM session LEFT JOIN account ON Session.field1 = account.field4 WHERE account.field3 = 'value' However, I can't seem to get Hibernate to perform this kind of functionality. This is what I'm using as a Hibernate Query right now: String query = "FROM session IN CLASS org.express.test.Session " + "WHERE field1 = '" + field1 + "' "; Can someone point me in the right direction? Thanks, in advance. -- _ __ __ ___ _| | William R. Lorenz <wr...@ex...> \ V V / '_| | http://www.clevelandlug.net/ ; "Every revolution was \./\./|_| |_| first a thought in one man's mind." - Ralph Waldo Emerson |
From: <leg...@at...> - 2003-10-17 02:33:12
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-408 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-408 Summary: test Type: Task Status: Unassigned Priority: Major Project: Hibernate2 Assignee: Reporter: HeYu Created: Thu, 16 Oct 2003 9:29 PM Updated: Thu, 16 Oct 2003 9:29 PM Environment: test Description: test --------------------------------------------------------------------- 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-10-16 22:20:57
|
The following comment has been added to this issue: Author: Andrey Volozin Created: Thu, 16 Oct 2003 1:32 PM Body: Yes, there is not very elegant workaround - to change hbm.xml like this: <hibernate-mapping> <class name="A"> <id name="id"> <generator class="hilo"> <param name="table">hi_value</param> <param name="column">next_value</param> <param name="max_lo">100</param> </generator> </id> <discriminator column="class_name"/> <property name="f1"/> <subclass name="B"> <property name="f2"/> </subclass> <subclass name="C"> <property name="f3"/> </subclass> <subclass name="D"> <set name="lnkB" cascade="all" where="class_name='B'"> <key column="d_id"/> <one-to-many class="B"/> </set> <set name="lnkC" cascade="all" where="class_name='B'"> <key column="d_id"/> <one-to-many class="C"/> </set> <property name="f4"/> </subclass> </class> </hibernate-mapping> --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-406 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-406 Summary: graph loading breaks on complex hierarchies Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: Andrey Volozin Created: Thu, 16 Oct 2003 9:57 AM Updated: Thu, 16 Oct 2003 9:57 AM Environment: Pentium IV 2.40 GHz, Windows XP, JDK 1.3 Description: I have a relatively complex hierarchy of objects: A is common superclass B, C, D are subclasses D incapsulates collections of B and C here is my hbm.xml file: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="A"> <id name="id"> <generator class="hilo"> <param name="table">hi_value</param> <param name="column">next_value</param> <param name="max_lo">100</param> </generator> </id> <discriminator column="class_name"/> <property name="f1"/> <subclass name="B"> <property name="f2"/> </subclass> <subclass name="C"> <property name="f3"/> </subclass> <subclass name="D"> <set name="lnkB" cascade="all"> <key column="d_id"/> <one-to-many class="B"/> </set> <set name="lnkC" cascade="all"> <key column="d_id"/> <one-to-many class="C"/> </set> <property name="f4"/> </subclass> </class> </hibernate-mapping> here are the classes: public abstract class A { private Long id; private String f1; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getF1() { return f1; } public void setF1(String f1) { this.f1 = f1; } } public class B extends A { private String f2; public String getF2() { return f2; } public void setF2(String f2) { this.f2 = f2; } } public class C extends A { private String f3; public String getF3() { return f3; } public void setF3(String f3) { this.f3 = f3; } } public class D extends A { private String f4; private Collection lnkB; private Collection lnkC; public String getF4() { return f4; } public void setF4(String f4) { this.f4 = f4; } public Collection getLnkB() { return lnkB; } public void setLnkB(String lnkB) { this.lnkB = lnkB; } public String getLnkC() { return lnkC; } public void setLnkC(String lnkC) { this.lnkC = lnkC; } } I persisted data to the database using the following code: public class TestMain { static Session session; static SessionFactory sessionFactory; public static Collection createB() throws HibernateException, SQLException { Collection results = new HashSet(); B b = new B(); b.setF2("foo"); results.add(b); b = new B(); b.setF2("bar"); results.add(b); return results; } public static Collection createC() throws HibernateException, SQLException { Collection results = new HashSet(); C c = new C(); c.setF3("foo"); results.add(c); c = new C(); c.setF3("bar"); results.add(c); return results; } public static D createD(Collection b, Collection c) throws HibernateException, SQLException { D d = new D(); d.setF1("foo"); d.setLnkB(b); d.setLnkC(c); session.save (d); System.out.println ("Persisting D"); return d; } public static void main(String[] args) { D d; try { sessionFactory = new Configuration().configure().buildSessionFactory(); if (sessionFactory == null) { System.out.println ("null session factory returned"); return; } System.out.println ("Got Session Factory"); session = sessionFactory.openSession(); Collection b = createB(); Collection c = createC(); d = createD(b, c); session.flush(); session.connection().commit(); System.out.println ("Committing"); session.close(); } catch (MappingException e){ System.out.println (e); } catch (HibernateException e) { System.out.println(e); } catch (Throwable e) { System.out.println (e); e.printStackTrace(); } } } then I started my application again but instead of persistence I did retrieval (I looked up id of D instance in the database): D d = (D) session.load(D.class, new Long(1615)); But it failed with the message: Object with id: 1618 was not of the specified subclass: C (loaded object was of wrong class) Indeed, the object with id 1618 had "B" in the discriminator field and database record corresponded to B instance. --------------------------------------------------------------------- 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-10-16 21:15:32
|
The following issue has been updated: Updater: David Morris (mailto:dmm...@ce...) Date: Thu, 16 Oct 2003 12:20 PM Changes: Attachment changed to compositekey.patch --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-407&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-407 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-407 Summary: Composite keys do not work with native createSQLQuery Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 beta 4 2.1 beta 5 Assignee: Reporter: David Morris Created: Thu, 16 Oct 2003 12:19 PM Updated: Thu, 16 Oct 2003 12:20 PM Description: Composite key columns are not found when replacing bracketed names. See thread http://forum.hibernate.org/viewtopic.php?t=924785 for more details. --------------------------------------------------------------------- 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-10-16 17:34:13
|
The following comment has been added to this issue: Author: Andrey Volozin Created: Thu, 16 Oct 2003 12:32 PM Body: I did some research and probably (IMHO) the reason is that it doesn't use discriminator value in SQL "where" clause when loading collection. So it loads the data from all the collections instead of one particular. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-406 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-406 Summary: graph loading breaks on complex hierarchies Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: Andrey Volozin Created: Thu, 16 Oct 2003 9:57 AM Updated: Thu, 16 Oct 2003 9:57 AM Environment: Pentium IV 2.40 GHz, Windows XP, JDK 1.3 Description: I have a relatively complex hierarchy of objects: A is common superclass B, C, D are subclasses D incapsulates collections of B and C here is my hbm.xml file: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="A"> <id name="id"> <generator class="hilo"> <param name="table">hi_value</param> <param name="column">next_value</param> <param name="max_lo">100</param> </generator> </id> <discriminator column="class_name"/> <property name="f1"/> <subclass name="B"> <property name="f2"/> </subclass> <subclass name="C"> <property name="f3"/> </subclass> <subclass name="D"> <set name="lnkB" cascade="all"> <key column="d_id"/> <one-to-many class="B"/> </set> <set name="lnkC" cascade="all"> <key column="d_id"/> <one-to-many class="C"/> </set> <property name="f4"/> </subclass> </class> </hibernate-mapping> here are the classes: public abstract class A { private Long id; private String f1; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getF1() { return f1; } public void setF1(String f1) { this.f1 = f1; } } public class B extends A { private String f2; public String getF2() { return f2; } public void setF2(String f2) { this.f2 = f2; } } public class C extends A { private String f3; public String getF3() { return f3; } public void setF3(String f3) { this.f3 = f3; } } public class D extends A { private String f4; private Collection lnkB; private Collection lnkC; public String getF4() { return f4; } public void setF4(String f4) { this.f4 = f4; } public Collection getLnkB() { return lnkB; } public void setLnkB(String lnkB) { this.lnkB = lnkB; } public String getLnkC() { return lnkC; } public void setLnkC(String lnkC) { this.lnkC = lnkC; } } I persisted data to the database using the following code: public class TestMain { static Session session; static SessionFactory sessionFactory; public static Collection createB() throws HibernateException, SQLException { Collection results = new HashSet(); B b = new B(); b.setF2("foo"); results.add(b); b = new B(); b.setF2("bar"); results.add(b); return results; } public static Collection createC() throws HibernateException, SQLException { Collection results = new HashSet(); C c = new C(); c.setF3("foo"); results.add(c); c = new C(); c.setF3("bar"); results.add(c); return results; } public static D createD(Collection b, Collection c) throws HibernateException, SQLException { D d = new D(); d.setF1("foo"); d.setLnkB(b); d.setLnkC(c); session.save (d); System.out.println ("Persisting D"); return d; } public static void main(String[] args) { D d; try { sessionFactory = new Configuration().configure().buildSessionFactory(); if (sessionFactory == null) { System.out.println ("null session factory returned"); return; } System.out.println ("Got Session Factory"); session = sessionFactory.openSession(); Collection b = createB(); Collection c = createC(); d = createD(b, c); session.flush(); session.connection().commit(); System.out.println ("Committing"); session.close(); } catch (MappingException e){ System.out.println (e); } catch (HibernateException e) { System.out.println(e); } catch (Throwable e) { System.out.println (e); e.printStackTrace(); } } } then I started my application again but instead of persistence I did retrieval (I looked up id of D instance in the database): D d = (D) session.load(D.class, new Long(1615)); But it failed with the message: Object with id: 1618 was not of the specified subclass: C (loaded object was of wrong class) Indeed, the object with id 1618 had "B" in the discriminator field and database record corresponded to B instance. --------------------------------------------------------------------- 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-10-16 17:23:05
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-407 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-407 Summary: Composite keys do not work with native createSQLQuery Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Versions: 2.1 beta 4 2.1 beta 5 Assignee: Reporter: David Morris Created: Thu, 16 Oct 2003 12:19 PM Updated: Thu, 16 Oct 2003 12:19 PM Description: Composite key columns are not found when replacing bracketed names. See thread http://forum.hibernate.org/viewtopic.php?t=924785 for more details. --------------------------------------------------------------------- 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-10-16 15:04:54
|
The following comment has been added to this issue: Author: Andrey Volozin Created: Thu, 16 Oct 2003 10:01 AM Body: sorry, here is a correction for class D: public class D extends A { private String f4; private Collection lnkB; private Collection lnkC; public String getF4() { return f4; } public void setF4(String f4) { this.f4 = f4; } public Collection getLnkB() { return lnkB; } public void setLnkB(String lnkB) { this.lnkB = lnkB; } public Collection getLnkC() { return lnkC; } public void setLnkC(Collection lnkC) { this.lnkC = lnkC; } } --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-406 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-406 Summary: graph loading breaks on complex hierarchies Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: Andrey Volozin Created: Thu, 16 Oct 2003 9:57 AM Updated: Thu, 16 Oct 2003 9:57 AM Environment: Pentium IV 2.40 GHz, Windows XP, JDK 1.3 Description: I have a relatively complex hierarchy of objects: A is common superclass B, C, D are subclasses D incapsulates collections of B and C here is my hbm.xml file: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="A"> <id name="id"> <generator class="hilo"> <param name="table">hi_value</param> <param name="column">next_value</param> <param name="max_lo">100</param> </generator> </id> <discriminator column="class_name"/> <property name="f1"/> <subclass name="B"> <property name="f2"/> </subclass> <subclass name="C"> <property name="f3"/> </subclass> <subclass name="D"> <set name="lnkB" cascade="all"> <key column="d_id"/> <one-to-many class="B"/> </set> <set name="lnkC" cascade="all"> <key column="d_id"/> <one-to-many class="C"/> </set> <property name="f4"/> </subclass> </class> </hibernate-mapping> here are the classes: public abstract class A { private Long id; private String f1; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getF1() { return f1; } public void setF1(String f1) { this.f1 = f1; } } public class B extends A { private String f2; public String getF2() { return f2; } public void setF2(String f2) { this.f2 = f2; } } public class C extends A { private String f3; public String getF3() { return f3; } public void setF3(String f3) { this.f3 = f3; } } public class D extends A { private String f4; private Collection lnkB; private Collection lnkC; public String getF4() { return f4; } public void setF4(String f4) { this.f4 = f4; } public Collection getLnkB() { return lnkB; } public void setLnkB(String lnkB) { this.lnkB = lnkB; } public String getLnkC() { return lnkC; } public void setLnkC(String lnkC) { this.lnkC = lnkC; } } I persisted data to the database using the following code: public class TestMain { static Session session; static SessionFactory sessionFactory; public static Collection createB() throws HibernateException, SQLException { Collection results = new HashSet(); B b = new B(); b.setF2("foo"); results.add(b); b = new B(); b.setF2("bar"); results.add(b); return results; } public static Collection createC() throws HibernateException, SQLException { Collection results = new HashSet(); C c = new C(); c.setF3("foo"); results.add(c); c = new C(); c.setF3("bar"); results.add(c); return results; } public static D createD(Collection b, Collection c) throws HibernateException, SQLException { D d = new D(); d.setF1("foo"); d.setLnkB(b); d.setLnkC(c); session.save (d); System.out.println ("Persisting D"); return d; } public static void main(String[] args) { D d; try { sessionFactory = new Configuration().configure().buildSessionFactory(); if (sessionFactory == null) { System.out.println ("null session factory returned"); return; } System.out.println ("Got Session Factory"); session = sessionFactory.openSession(); Collection b = createB(); Collection c = createC(); d = createD(b, c); session.flush(); session.connection().commit(); System.out.println ("Committing"); session.close(); } catch (MappingException e){ System.out.println (e); } catch (HibernateException e) { System.out.println(e); } catch (Throwable e) { System.out.println (e); e.printStackTrace(); } } } then I started my application again but instead of persistence I did retrieval (I looked up id of D instance in the database): D d = (D) session.load(D.class, new Long(1615)); But it failed with the message: Object with id: 1618 was not of the specified subclass: C (loaded object was of wrong class) Indeed, the object with id 1618 had "B" in the discriminator field and database record corresponded to B instance. --------------------------------------------------------------------- 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-10-16 15:00:36
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-406 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-406 Summary: graph loading breaks on complex hierarchies Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: Andrey Volozin Created: Thu, 16 Oct 2003 9:57 AM Updated: Thu, 16 Oct 2003 9:57 AM Environment: Pentium IV 2.40 GHz, Windows XP, JDK 1.3 Description: I have a relatively complex hierarchy of objects: A is common superclass B, C, D are subclasses D incapsulates collections of B and C here is my hbm.xml file: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="A"> <id name="id"> <generator class="hilo"> <param name="table">hi_value</param> <param name="column">next_value</param> <param name="max_lo">100</param> </generator> </id> <discriminator column="class_name"/> <property name="f1"/> <subclass name="B"> <property name="f2"/> </subclass> <subclass name="C"> <property name="f3"/> </subclass> <subclass name="D"> <set name="lnkB" cascade="all"> <key column="d_id"/> <one-to-many class="B"/> </set> <set name="lnkC" cascade="all"> <key column="d_id"/> <one-to-many class="C"/> </set> <property name="f4"/> </subclass> </class> </hibernate-mapping> here are the classes: public abstract class A { private Long id; private String f1; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getF1() { return f1; } public void setF1(String f1) { this.f1 = f1; } } public class B extends A { private String f2; public String getF2() { return f2; } public void setF2(String f2) { this.f2 = f2; } } public class C extends A { private String f3; public String getF3() { return f3; } public void setF3(String f3) { this.f3 = f3; } } public class D extends A { private String f4; private Collection lnkB; private Collection lnkC; public String getF4() { return f4; } public void setF4(String f4) { this.f4 = f4; } public Collection getLnkB() { return lnkB; } public void setLnkB(String lnkB) { this.lnkB = lnkB; } public String getLnkC() { return lnkC; } public void setLnkC(String lnkC) { this.lnkC = lnkC; } } I persisted data to the database using the following code: public class TestMain { static Session session; static SessionFactory sessionFactory; public static Collection createB() throws HibernateException, SQLException { Collection results = new HashSet(); B b = new B(); b.setF2("foo"); results.add(b); b = new B(); b.setF2("bar"); results.add(b); return results; } public static Collection createC() throws HibernateException, SQLException { Collection results = new HashSet(); C c = new C(); c.setF3("foo"); results.add(c); c = new C(); c.setF3("bar"); results.add(c); return results; } public static D createD(Collection b, Collection c) throws HibernateException, SQLException { D d = new D(); d.setF1("foo"); d.setLnkB(b); d.setLnkC(c); session.save (d); System.out.println ("Persisting D"); return d; } public static void main(String[] args) { D d; try { sessionFactory = new Configuration().configure().buildSessionFactory(); if (sessionFactory == null) { System.out.println ("null session factory returned"); return; } System.out.println ("Got Session Factory"); session = sessionFactory.openSession(); Collection b = createB(); Collection c = createC(); d = createD(b, c); session.flush(); session.connection().commit(); System.out.println ("Committing"); session.close(); } catch (MappingException e){ System.out.println (e); } catch (HibernateException e) { System.out.println(e); } catch (Throwable e) { System.out.println (e); e.printStackTrace(); } } } then I started my application again but instead of persistence I did retrieval (I looked up id of D instance in the database): D d = (D) session.load(D.class, new Long(1615)); But it failed with the message: Object with id: 1618 was not of the specified subclass: C (loaded object was of wrong class) Indeed, the object with id 1618 had "B" in the discriminator field and database record corresponded to B instance. --------------------------------------------------------------------- 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-10-16 14:09:04
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-405 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-405 Summary: SchemaExport unable to find getter for tO or cC properties. Type: Bug Status: Unassigned Priority: Minor Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: Reporter: Brian Duguid Created: Thu, 16 Oct 2003 9:03 AM Updated: Thu, 16 Oct 2003 9:03 AM Environment: Coding and using tool in JBuilder 9 Enterprise Description: The SchemaExport tool works fantastic with the exception of compiling for properties that have the second letter in uppercase even though the first leter is lowercase. For example, I have an object that is used to store e-mail communications. The "to," "cc," and "bcc" addresses properties are written as tO, cC, and bCC so the getter and setters are "pretty" (getTO(), getCC(), getBCC()). I am able to fix the error by having the first two letters of the property as lowercase and the third letter as uppercase is acceptable. i.e. property bcC with getBcC() works fine. The error that is thrown read as: ERROR [main] (Configuration.java:233) - Could not compile the mapping document net.sf.hibernate.PropertyNotFoundException: Could not find a getter for bcC in class fdot.prm.directory.email.EmailRecord at net.sf.hibernate.util.ReflectHelper.getGetter(ReflectHelper.java:206) at net.sf.hibernate.util.ReflectHelper.reflectedPropertyType(ReflectHelper.java:260) at net.sf.hibernate.mapping.Value.setTypeByReflection(Value.java:92) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:912) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:294) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1095) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:273) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:838) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:792) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:746) at fdot.prm.directory.DDLExporter.main(DDLExporter.java:29) rethrown as net.sf.hibernate.MappingException: Problem trying to set property type by reflection: Could not find a getter for bcC in class fdot.prm.directory.email.EmailRecord at net.sf.hibernate.mapping.Value.setTypeByReflection(Value.java:103) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:912) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:294) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1095) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:273) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:838) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:792) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:746) at fdot.prm.directory.DDLExporter.main(DDLExporter.java:29) Caused by: net.sf.hibernate.PropertyNotFoundException: Could not find a getter for bcC in class fdot.prm.directory.email.EmailRecord at net.sf.hibernate.util.ReflectHelper.getGetter(ReflectHelper.java:206) at net.sf.hibernate.util.ReflectHelper.reflectedPropertyType(ReflectHelper.java:260) at net.sf.hibernate.mapping.Value.setTypeByReflection(Value.java:92) ... 10 more ERROR [main] (Configuration.java:233) - Could not compile the mapping document net.sf.hibernate.MappingException: duplicate import: EmailRecord at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:60) at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:108) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:165) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1095) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:273) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:841) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:792) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:746) at fdot.prm.directory.DDLExporter.main(DDLExporter.java:29) Error initializing configuration: duplicate import: EmailRecord Thanks. --------------------------------------------------------------------- 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-10-16 11:31:28
|
The following comment has been added to this issue: Author: the_Ellessar Created: Thu, 16 Oct 2003 6:30 AM Body: I came across the same problem using SAPDB 7.4. I think it should either return null or a character. But what happens now is that I get a java.lang.StringIndexOutOfBoundsException. It is now not possible to use character type's if a value in the database can be null. Fix: Index: CharacterType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/CharacterType.java,v retrieving revision 1.5 diff -u -r1.5 CharacterType.java --- CharacterType.java 1 Mar 2003 12:15:28 -0000 1.5 +++ CharacterType.java 16 Oct 2003 11:13:30 -0000 @@ -12,7 +12,7 @@ public Object get(ResultSet rs, String name) throws SQLException { String str = rs.getString(name); - if (str==null) { + if (str == null || str.length() == 0) { return null; } else { --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-310 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-310 Summary: CharacterType.get(ResultSet rs, String name) on zero length String Type: Bug Status: Closed Priority: Blocker Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 Assignee: Reporter: Tim Schafer Created: Thu, 4 Sep 2003 11:03 AM Updated: Thu, 4 Sep 2003 9:31 PM Environment: Sun JDK 1.4.2 Mysql 4.0.13 Description: The get method of CharacterType is calling java.lang.String.charAt(0) on a String instance that has zero length This resulted rom trying to load a mapped object from a Mysql 4.0.13 record that has a blank column Sep 4, 2003 8:55:27 AM net.sf.hibernate.impl.IteratorImpl next SEVERE: could not get next result java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(Unknown Source) at net.sf.hibernate.type.CharacterType.get(CharacterType.java:19) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:59) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51) at net.sf.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:139) at net.sf.hibernate.collection.CollectionPersister.readElement(CollectionPersister.java:377) at net.sf.hibernate.collection.Set.readFrom(Set.java:242) at net.sf.hibernate.loader.Loader.doFind(Loader.java:175) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:602) at net.sf.hibernate.loader.CollectionLoader.initialize(CollectionLoader.java:82) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:2897) at net.sf.hibernate.collection.PersistentCollection.getInitialValue(PersistentCollection.java:128) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:74) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1959) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:396) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1889) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1716) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:109) at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:57) at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:70) at test.TestHibernate.main(TestHibernate.java:94) java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(Unknown Source) at net.sf.hibernate.type.CharacterType.get(CharacterType.java:19) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:59) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51) at net.sf.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:139) at net.sf.hibernate.collection.CollectionPersister.readElement(CollectionPersister.java:377) at net.sf.hibernate.collection.Set.readFrom(Set.java:242) at net.sf.hibernate.loader.Loader.doFind(Loader.java:175) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:602) at net.sf.hibernate.loader.CollectionLoader.initialize(CollectionLoader.java:82) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:2897) at net.sf.hibernate.collection.PersistentCollection.getInitialValue(PersistentCollection.java:128) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:74) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1959) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:396) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1889) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1716) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:109) at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:57) at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:70) at test.TestHibernate.main(TestHibernate.java:94) rethrown as net.sf.hibernate.LazyInitializationException: Hibernate lazy instantiation problem: String index out of range: 0 at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:81) at test.TestHibernate.main(TestHibernate.java:94) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(Unknown Source) at net.sf.hibernate.type.CharacterType.get(CharacterType.java:19) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:59) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51) at net.sf.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:139) at net.sf.hibernate.collection.CollectionPersister.readElement(CollectionPersister.java:377) at net.sf.hibernate.collection.Set.readFrom(Set.java:242) at net.sf.hibernate.loader.Loader.doFind(Loader.java:175) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:602) at net.sf.hibernate.loader.CollectionLoader.initialize(CollectionLoader.java:82) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:2897) at net.sf.hibernate.collection.PersistentCollection.getInitialValue(PersistentCollection.java:128) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:74) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1959) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:396) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1889) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1716) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:109) at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:57) at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:70) ... 1 more --------------------------------------------------------------------- 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-10-15 23:21:20
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-404 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-404 Summary: Caching problem with same class mapped in many sessionFactories Type: Bug Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: William Drai Created: Wed, 15 Oct 2003 6:20 PM Updated: Wed, 15 Oct 2003 6:20 PM Description: I want to map the same class in two different sessionFactories using two different databases. As the cache region is defined only by the class name, the cache is not able to differentiate instances of the same class with the same id in different databases. I have made a patch for Hibernate 2.0.3 which just add a new parameter 'cache-region-prefix' in the session factory configuration and it works perfectly. As the caching system is completely being refactored, it would be really cool if this simple fix was included in the refactoring. Thanks. William --------------------------------------------------------------------- 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-10-15 19:13:20
|
Message: The following issue has been closed. Resolver: Max Rydahl Andersen Date: Wed, 15 Oct 2003 2:13 PM This is expected behavior! set inherit="false" on stuff you don't want to "bubble down" to other elements. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-403 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-403 Summary: hbm2java- Composite-element inherits "extends" meta attribute from class. Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: toolset Fix Fors: 2.1 Versions: 2.0.3 Assignee: Max Rydahl Andersen Reporter: Jason Stiefel Created: Wed, 15 Oct 2003 12:28 PM Updated: Wed, 15 Oct 2003 2:13 PM Environment: JDK 1.4 Description: When using hbm2java a composite-element inherits the parent class "extends" meta attribute. For example, the class generated for the composite-element below will extend "LifecycleSupport" for some reason. :-) <hibernate-mapping> <class name="com.pwc.us.factiva.entity.Newsfeed" table="EXTRA_NEWSFEED"> <meta attribute="extends">com.pwc.us.factiva.entity.LifecycleSupport</meta> .... <list name="selectedMetadata" table="EXTRA_NEWSFEED_METADATA" cascade="none" lazy="true"> <key column="NEWSFEED_ID"/> <index column="INDEX"/> <composite-element class="com.pwc.us.factiva.entity.MetadataSelection"> <parent name="newsfeed"/> <property name="condition" type="com.pwc.us.factiva.entity.ConditionType" column="CONDITION_TYPE"/> <many-to-one name="metadata" column="METADATA_ID" class="com.pwc.us.factiva.entity.Metadata"/> </composite-element> </list> </class> </hibernate-mapping> --------------------------------------------------------------------- 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-10-15 17:45:20
|
Message: The following issue has been re-assigned. Assignee: Max Rydahl Andersen (mailto:xa...@xa...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-403 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-403 Summary: hbm2java- Composite-element inherits "extends" meta attribute from class. Type: Bug Status: Assigned Priority: Critical Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: Max Rydahl Andersen Reporter: Jason Stiefel Created: Wed, 15 Oct 2003 12:28 PM Updated: Wed, 15 Oct 2003 12:44 PM Environment: JDK 1.4 Description: When using hbm2java a composite-element inherits the parent class "extends" meta attribute. For example, the class generated for the composite-element below will extend "LifecycleSupport" for some reason. :-) <hibernate-mapping> <class name="com.pwc.us.factiva.entity.Newsfeed" table="EXTRA_NEWSFEED"> <meta attribute="extends">com.pwc.us.factiva.entity.LifecycleSupport</meta> .... <list name="selectedMetadata" table="EXTRA_NEWSFEED_METADATA" cascade="none" lazy="true"> <key column="NEWSFEED_ID"/> <index column="INDEX"/> <composite-element class="com.pwc.us.factiva.entity.MetadataSelection"> <parent name="newsfeed"/> <property name="condition" type="com.pwc.us.factiva.entity.ConditionType" column="CONDITION_TYPE"/> <many-to-one name="metadata" column="METADATA_ID" class="com.pwc.us.factiva.entity.Metadata"/> </composite-element> </list> </class> </hibernate-mapping> --------------------------------------------------------------------- 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 |