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: Max R. A. (JIRA) <no...@at...> - 2006-07-07 13:07:01
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=all ] Max Rydahl Andersen closed HBX-697: ----------------------------------- Fix Version: 3.2LATER Resolution: Fixed thanks for reporting with both a test and patch! Seldom now a days ;) applied in svn > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > Fix For: 3.2LATER > Attachments: HibernatePropertySourceProvider.patch, hbtools697.sql, hbtools697.zip > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-07 11:20:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-469?page=all ] Max Rydahl Andersen closed HBX-469: ----------------------------------- Fix Version: 3.2beta6 Resolution: Fixed should be fixed now. > Named Query DAO methods with Primitive types fail to compile > ------------------------------------------------------------ > > Key: HBX-469 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-469 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.1beta1 > Reporter: James Schopp > Fix For: 3.2beta6 > > > if you define a name query that receives a primitive or wrapper parameter, then the DAO method for the name query will always be generated with "primitive" type. This failsto compile, since the call to query.setParameter("paramName", value); takes an object, not a primitive. For example: > <query name="com.mycom.persistence.Account.findCommercialAccountById"> > from Account where accountTypeClass='C' and accountNumber=:accountNumber > <query-param name="accountNumber" type="java.lang.Long" /> > </query> > This generates the code > public List findCommercialAccountById(long accountNumber) { > Query query = getSession(false) > .getNamedQuery("com.alldata.ecis.persistence.Account.findCommercialAccountById"); > query.setParameter("accountNumber", accountNumber); > return query.list(); > } > This code does not compile. > I beleive the fix might be as simple as modifying Cfg2JavaTool.asFinderArgumentList(): > if ( type instanceof PrimitiveType ) { > typeClass = ( (PrimitiveType) type ).getPrimitiveClass(); > } > else { > typeClass = type.getReturnedClass(); > } > I think this should always return the type.getReturnedClass(), and never the primitive... > ALSO: it would ne nice to have another Cfg2JavaTool function like > asFinderArgumentList > but that generates the list as parameters to the call, not the function definition. > For example, if a named query takes params: > Long accountNumer, String accountName > then, maybe have function called > asFinderCallerArgumentList() > which would return > accountNumer, accountName -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-07 11:20:55
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-539?page=all ] Max Rydahl Andersen closed HBX-539: ----------------------------------- Resolution: Rejected as wanted ;) > daohome.vm named query velocity tests broken > -------------------------------------------- > > Key: HBX-539 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-539 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.1beta2 > Reporter: George Lindholm > > > The tests in daohome.vm for type of named query are broken: > With this hbm.xml: > <query name="NcContactcountAll"> > <query-param name="one" type="string"/> > <query-param name="two" type="int"/> > select count(*) from NcContact > </query> > and with the current daohome.vm: > #if($queryName.startsWith($clazz.entityName)) > queryName $queryName startsWith clazz $clazz.entityName > #set($methname=$c2j.unqualify($queryName)) > #set($params=$cfg.namedQueries.get($queryName).parameterTypes) > #set($argList=$c2j.asFinderArgumentList($params,$clazz)) > methname = $methname > #if($jdk5 && $methname.startsWith("find")) > public ${pojo.importType("java.util.List")}<${declarationName}> $methname($argList) { > #elseif ($methname.startsWith("count")) > public int $methname($argList) { > #else > public ${pojo.importType("java.util.List")} $methname($argList) { > #end > you get: > queryName NcContactcountAll startsWith clazz NcContact > methname = NcContactcountAll > public List NcContactcountAll(java.lang.String one, int two) { > There is no way that methname (aka queryName) can begin with both $clazz.entityName AND > "find"|"count" at the same time. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-07 11:18:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-544?page=all ] Max Rydahl Andersen closed HBX-544: ----------------------------------- Fix Version: 3.1beta5a Resolution: Fixed String should be java.lang.String ...and with freemarker you should get a better message. Reopen or create a new issue if it is not so. > Non-primitive type for query-param causes Exception > --------------------------------------------------- > > Key: HBX-544 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-544 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.1beta3 > Reporter: George Lindholm > Fix For: 3.1beta5a > > > <query name="ca.db.NcContact.findGroupMembers"> > <query-param name="group2" type="String"/> > </query> > gives me: > Exception while generating code > Reason: > org.hibernate.tools.hbm2x.ExporterException: > MethodInvocationException while processing template daohome.vm. > Invocation of method 'asFinderArgumentList' in class > org.hibernate.tool.hbm2x.Cfg2JavaTool threw exeption class > java.lang.NullPointerException: null -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-07 11:14:55
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-698?page=all ] Max Rydahl Andersen resolved HBX-698: ------------------------------------- Resolution: Rejected rejecting this since I can't reproduce it against other common db's and I can't see how I can guard against faulty jdbc drivers. Let me know if Derby guys have suggestions or possibly can explain why they freeze the machine. > HBX/Eclipse hang if database doesn't exist. > ------------------------------------------- > > Key: HBX-698 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-698 > Project: Hibernate Tools > Type: Improvement > Components: consoleconfiguration > Versions: 3.2beta6 > Environment: Hibernate 3.1.3, Eclipse 3.2 Callisto, Derby 10.1.2.1 (Eclipse feature) > Reporter: Brice Laurencin > > > If the database doesn't exist, the system hang hard, and it is hard to recover... hard reboot required. It is a bit boring. > The Eclipse log gives a > !ENTRY org.hibernate.eclipse 2 30000 2006-07-06 11:34:34.760 > !MESSAGE WARN main org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata > !STACK 0 > org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, Traffic, which was not found. > at org.apache.derby.client.net.NetConnectionReply.parseRDBNFNRM(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source) > at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.<init>(Unknown Source) > at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) > at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23) > at java.sql.DriverManager.getConnection(Unknown Source) > at java.sql.DriverManager.getConnection(Unknown Source) > at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) > at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) > at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216) > at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265) > at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) > at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) > at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:133) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:119) > at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:123) > at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) > at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) > at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) > at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) > at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-07 11:12:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-698?page=comments#action_23564 ] Max Rydahl Andersen commented on HBX-698: ----------------------------------------- those are done in a background job - sounds like an issue to report to derby for them to not kill your machine ;) e.g. when I try to do this with HQL it takes about 4-5 second (where I can use eclipse for other tasks) for it to tell me I can't connect. > HBX/Eclipse hang if database doesn't exist. > ------------------------------------------- > > Key: HBX-698 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-698 > Project: Hibernate Tools > Type: Improvement > Components: consoleconfiguration > Versions: 3.2beta6 > Environment: Hibernate 3.1.3, Eclipse 3.2 Callisto, Derby 10.1.2.1 (Eclipse feature) > Reporter: Brice Laurencin > > > If the database doesn't exist, the system hang hard, and it is hard to recover... hard reboot required. It is a bit boring. > The Eclipse log gives a > !ENTRY org.hibernate.eclipse 2 30000 2006-07-06 11:34:34.760 > !MESSAGE WARN main org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata > !STACK 0 > org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, Traffic, which was not found. > at org.apache.derby.client.net.NetConnectionReply.parseRDBNFNRM(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source) > at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.<init>(Unknown Source) > at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) > at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23) > at java.sql.DriverManager.getConnection(Unknown Source) > at java.sql.DriverManager.getConnection(Unknown Source) > at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) > at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) > at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216) > at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265) > at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) > at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) > at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:133) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:119) > at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:123) > at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) > at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) > at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) > at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) > at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-07 10:53:58
|
refresh() should raise IllegalArgumentException if the entity is not managed ---------------------------------------------------------------------------- Key: EJB-205 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-205 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jeremy S. (JIRA) <no...@at...> - 2006-07-07 07:28:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1348?page=comments#action_23563 ] Jeremy Spring commented on HHH-1348: ------------------------------------ Hi, in my application, the above code fix works in that the primary key is no longer being referenced, but it is now referencing other defined properties within the class, none of which are actually referenced by the property-ref specifier. I think this needs to be looked at again. Jeremy > Join w/ Foreign Key within a Single Object not functioing > --------------------------------------------------------- > > Key: HHH-1348 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1348 > Project: Hibernate3 > Type: Bug > Environment: Webshpere 5.0 > Reporter: Michael Lambert > > > I have a legacy database I need to join into using something other than the main objects primary key and it simply wont let me join on any field other than the primary key. > No matter what I insert into "property-ref" it ALWAYS uses the objects primary key in the inner join: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > <hibernate-mapping package="com.dcx.ps.gpsis.ibsc.data.entities" default-lazy="false"> > <class > name="HPerson" > table="PIBPERSN"> > <cache usage="read-write" /> > <id name="id" column="I_PERSN_IBSC" type="long"> > <generator class="increment"/> > </id> > <timestamp name="lastUpdated" column="T_STMP_UPD" /> > <property name="lastUpdatedBy" type="string" column="I_USER_UPD" not-null="true" /> > <property name="tid" column="I_USER_LDAP" type="string" not-null="true" unique="true" /> > <property name="description" column="N_USER_LDAP" type="string" not-null="true"/> > <set name="positions" inverse="true" cascade="save-update"> > <cache usage="read-write" /> > <key column="I_PERSN_IBSC" /> > <one-to-many class="HPosition" /> > </set> > <join table="PUSRPRF" inverse="true"> > <key column="I_USER_LDAP" property-ref="tid" /> > <property name="firstName" type="string" column="N_FIRST" /> > <property name="lastName" type="string" column="N_LAST" /> > </join> > </class> > <query name="findPersonsByName"> > <![CDATA[ > from HPerson person where person.firstName like :firstname and person.lastName like :lastname > ]]> > </query> > <query name="findPersonsByFirstName"> > <![CDATA[ > from HPerson person where person.firstName like :firstname > ]]> > </query> > <query name="findPersonsByLastName"> > <![CDATA[ > from HPerson person where person.lastName like :lastname > ]]> > </query> > <query name="findPersonByTid"> > <![CDATA[ > from HPerson person where person.tid like :tid > ]]> > </query> > <query name="findPersons"> > <![CDATA[ > from HPerson > ]]> > </query> > </hibernate-mapping> > Results in the following query and error when I execute any query (in this case findPersonByTid has been run): > could not execute query: > [select hperson0_.I_PERSN_IBSC as I1_4_, hperson0_.T_STMP_UPD as T2_4_, hperson0_.I_USER_UPD as I3_4_, hperson0_.I_USER_LDAP as I4_4_, hperson0_.N_USER_LDAP as N5_4_, hperson0_1_.N_FIRST as N2_5_, hperson0_1_.N_LAST as N3_5_ from T5279KN.PIBPERSN hperson0_ left outer join T5279KN.PUSRPRF hperson0_1_ on hperson0_.I_PERSN_IBSC=hperson0_1_.I_USER_LDAP where hperson0_.I_USER_LDAP like ?] > COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0401N The data types of the operands for the operation "=" are not compatible. SQLSTATE=42818 > Where the outter join SHOULD be hperson0_.I_USER_LDAP =hperson0_1_.I_USER_LDAP; I_PERSN_IBSC is the primary key. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacob L E B. C. (JIRA) <no...@at...> - 2006-07-07 06:07:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=all ] Jacob L E Blain Christen updated HBX-697: ----------------------------------------- Attachment: HibernatePropertySourceProvider.patch tiny patch to return out early (first check) with null if the passed-in object is a null value > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > Attachments: HibernatePropertySourceProvider.patch, hbtools697.sql, hbtools697.zip > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-06 22:35:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-389?page=all ] Emmanuel Bernard resolved ANN-389: ---------------------------------- Resolution: Rejected This is a valid mapping. This does make sense in some use cases. > @ManyToMany without mappedBy should be recognized as an error > ------------------------------------------------------------- > > Key: ANN-389 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-389 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Reporter: Christopher G. Stach II > > > Instead of letting the user know that something might get hosed, it creates two join tables, one for each direction. I don't know when this would be the preferred behavior. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Adrian S. (JIRA) <no...@at...> - 2006-07-06 21:02:56
|
Property pointed to by "mappedBy" not found if defined in superclass of class referenced by "targetType" -------------------------------------------------------------------------------------------------------- Key: ANN-390 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-390 Project: Hibernate Annotations Type: Bug Environment: Windows XP SP2, Eclipse 3.2 final, WTP 1.5 final HibernateTools-3.2.0.200607060659-nightly.zip with relevant jars in org.hibernate.eclipse_3.2.0.200607060659-nightly plugin replaced with same date jars built from SVN. Removed WTP plugins from Hibernate Tools dist since I already had them loaded. I realize that this does not exactly match the build drivers for the nightly I'm using, but I don't think this is the issue here. Reporter: Adrian Sampaleanu When trying to open session factory in the Hibernate Console, I get: org.hibernate.AnnotationException: mappedBy reference an unknown property: com.tirawireless.jump.jdm.model.task.DeploymentTaskImpl.deploymentPlan in com.tirawireless.jump.jdm.model.plan.DeploymentPlanImpl.deploymentTasks at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:503) ..... The relevant property and annotation is as follows: @OneToMany(targetEntity = DeploymentTaskImpl.class, mappedBy = "deploymentPlan", fetch = FetchType.LAZY) @OrderBy(clause = "name ASC") @Cascade({CascadeType.SAVE_UPDATE}) public Set<DeploymentTask> getDeploymentTasks() The "deploymentPlan" property is _not_ defined in DeploymentTaskImpl, but is defined in it's superclass. I would think that it should be visible when establishing the mapping above. Have not found this issue addressed in either the forums or JIRA. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christopher G. S. II (JIRA) <no...@at...> - 2006-07-06 20:52:05
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-389?page=comments#action_23560 ] Christopher G. Stach II commented on ANN-389: --------------------------------------------- If I wasn't clear enough, this is for bidirectional relationships. > @ManyToMany without mappedBy should be recognized as an error > ------------------------------------------------------------- > > Key: ANN-389 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-389 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Reporter: Christopher G. Stach II > > > Instead of letting the user know that something might get hosed, it creates two join tables, one for each direction. I don't know when this would be the preferred behavior. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christopher G. S. II (JIRA) <no...@at...> - 2006-07-06 20:24:03
|
@ManyToMany without mappedBy should be recognized as an error ------------------------------------------------------------- Key: ANN-389 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-389 Project: Hibernate Annotations Type: Bug Components: binder Versions: 3.2.0.cr1 Reporter: Christopher G. Stach II Instead of letting the user know that something might get hosed, it creates two join tables, one for each direction. I don't know when this would be the preferred behavior. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: David H. (JIRA) <no...@at...> - 2006-07-06 18:41:00
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-261?page=all ] David Hay updated ANN-261: -------------------------- Attachment: hibernate-annotations-3.2.0.CR1-fk.patch Attached a new patch that includes support for a @ForeignKey annotation on a unidirectional @OneToMany mapping. > Allow specifying foreign key constraint name using annotations > -------------------------------------------------------------- > > Key: ANN-261 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-261 > Project: Hibernate Annotations > Type: Improvement > Components: binder > Versions: 3.1beta8 > Reporter: Paul Barry > Priority: Minor > Attachments: hibernate-annotations-3.2.0.CR1-fk.patch, hibernate-annotations-fk.patch > > > Using hbm.xml configuration for many-to-one, there is a foreign-key property that allows you to specify the name of the FK constraint. It would be nice if there was something similar for annotations, such as @ManyToOne ( constraintName = "FK_WHATEVER"). Also, a sensible default would be nice to, for example FK_TABLE_NAME_COLUMN_NAME, rather than FK20708CF6792111. I know Oracle has a 30 char limit for constraint names, so there would have to me some logic to find a way to abbreviate it. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Sanjiv J. (JIRA) <no...@at...> - 2006-07-06 18:13:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-175?page=comments#action_23558 ] Sanjiv Jivan commented on HB-175: --------------------------------- I think this is a serious bug. Gavin wrote "This is intended functionality (for performance we don't include the discriminator). You can force the behaviour you desire by adding a where attribute the the collection mapping." The problem with simply adding a "where" attribute on the collection mapping is that it does limit the objects being placed in the collection to be of the right type. However if the collection mapped to one sublass (say subChilds_1) is made empty (when the user wants to delete all associations of this subclass), hibernate issues a delete command that delete all subclass rows for the given parent. For example "delete from Child child0_ where child0_.parent_id=?" Hibernate should to be aware of the subclass discriminator associations and add the appropriate "where discriminator_column = ?" for both reads and writes. Can you explain the performace reasongs why the discriminator isn't being added? AFAICT is just ant additional where conditional, which is how discriminator based subclass mapping works for regular loads of subclasses. > One-to-many association does not correctly discriminate when a subclass is specified > ------------------------------------------------------------------------------------ > > Key: HB-175 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-175 > Project: Hibernate2 > Type: Bug > Components: core > Versions: 2.0.1 > Environment: Gentoo Linux, Sun Java 1.4.1 > Reporter: Peachawat Peachavanish > > > When using one-to-many association from 'Parent' to 'SubChild_1' and 'SubChild_2' where 'SubChild_1' and 'SubChild_2' are subclasses of 'Child', the generated SQL for hydrating a 'Parent' does not appropriate include 'where' clause to discriminate 'SubChild_1' or 'SubChild_2'. > Class Declaration > ================= > 'Child.java' > public abstract class Child{} > 'SubChild_1.java' > public class SubChild_1 extends Child {} > 'SubChild_2.java' > public class SubChild_2 extends Child {} > 'Parent.java' > public class Parent { > private List subChilds_1 = new ArrayList(); > private List subChilds_2 = new ArrayList(); > } > Mapping > ======= > 'Child.hbm.xml' > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 2.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> > <hibernate-mapping> > <class name="Child" discriminator-value="_"> > <id name="id"> > <generator class="native"/> > </id> > <discriminator column="CHILDTYPE"/> > <property name="aProperty"/> > <subclass name="SubChild_1" discriminator-value="1"/> > <subclass name="SubChild_2" discriminator-value="2"/> > </class> > </hibernate-mapping> > 'Parent.hmb.xml' > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 2.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> > <hibernate-mapping> > <class name="Parent"> > <id name="id"> > <generator class="native"/> > </id> > <property name="aProperty"/> > <list name="subChilds_1" lazy="false" cascade="all"> > <key column="parent_id"/> > <index column="idx"/> > <one-to-many class="SubChild_1"/> > </list> > <list name="subChilds_2" lazy="false" cascade="all"> > <key column="parent_id"/> > <index column="idx"/> > <one-to-many class="SubChild_2"/> > </list> > </class> > </hibernate-mapping> > Generated SQL when perform session.find() > ========================================= > Hibernate: select child0_.id as id__, child0_.idx as idx__, child0_.id as id from Child child0_ where child0_.parent_id=? > There is no 'where CHILDTYPE=?' discriminating clause. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacob L E B. C. (JIRA) <no...@at...> - 2006-07-06 18:03:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=all ] Jacob L E Blain Christen updated HBX-697: ----------------------------------------- Attachment: hbtools697.sql minor update to the sql in the zip, i didnt test the inserts before uploading =/ > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > Attachments: hbtools697.sql, hbtools697.zip > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Sanjiv J. (JIRA) <no...@at...> - 2006-07-06 17:58:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134?page=comments#action_23556 ] Sanjiv Jivan commented on HHH-1134: ----------------------------------- Here's another example with a more detailed description of the problem http://forum.hibernate.org/viewtopic.php?t=935374 > subclass tag with discriminator in one to many mapping > ------------------------------------------------------ > > Key: HHH-1134 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134 > Project: Hibernate3 > Type: Bug > Components: core > Environment: hibernate 3.0.5, Oracle > Reporter: Dilip Ranjith > > > Consider the following hbm.xml file > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > <hibernate-mapping > > > <class > name="DCDTO" > table="ACCDC" > dynamic-update="true" > > > <id > name="ID" > type="java.lang.String" > > > <column > name="DCINFOID" > /> > <generator class="sequence"> > <param name="sequence">DSEQ</param> > <!-- > To add non XDoclet generator parameters, create a file named > hibernate-generator-params-DebtorCreditorDTO.xml > containing the additional parameters and place it in your merge dir. > --> > </generator> > </id> > <discriminator > column="accountType" > not-null="true" > type="java.lang.String" > force="true" > insert="true" > /> > <property > name="creditMax" > type="java.lang.Double" > update="true" > insert="true" > column="creditMax" > /> > <subclass > name="CDTO" > dynamic-update="true" > dynamic-insert="true" > discriminator-value="C" > > > </.subclass> > <subclass > name="DDTO" > dynamic-update="true" > dynamic-insert="true" > discriminator-value="D" > > > </.subclass> > </class> > </hibernate-mapping> > DCDTO is the super class while DDTO and CDTO are its child classes > If in a mapped object say TDTO there are a set of CDTOs and a separate set of DDTOs > when we get TDTO the where clause "where accountType='D' " is not there when the query for set of DDTOs are generated. so instead of a set of DDTOs i am getting a set of both DDTO's and CDTO's -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacob L E B. C. (JIRA) <no...@at...> - 2006-07-06 17:58:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=all ] Jacob L E Blain Christen updated HBX-697: ----------------------------------------- Attachment: hbtools697.zip as requested, i put together a small example to demonstrate the issue. > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > Attachments: hbtools697.zip > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-06 16:44:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-388?pag= e=3Dcomments#action_23554 ]=20 Emmanuel Bernard commented on ANN-388: -------------------------------------- I've lost hours on issues involving @Index which turned out to be user mist= akes. Can you provide a simple runnable test case + the SchemaExport logs? I do h= ave a unit test for such a case and it works for me. org.hibernate.test.annotations.various.IndexTest (Truck) > @Index doesn't create index on Oracle; @Index doesn't override the name o= f auto-created index on a joined column > -------------------------------------------------------------------------= --------------------------------------- > > Key: ANN-388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/A= NN-388 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Environment: hibernate 3.2.0.cr1, Oracle 9i > Reporter: CLEMENT S=C3=A9bastien > > > With the following code, I couldn't create a foreign key index in Oracle. > I use hibernate 3.2.0.cr1. > Thanks=20 > @ManyToOne=20 > @JoinColumn(name=3D"locationOid", nullable=3Dfalse)=20 > @Index(name=3D"FK_location")=20 > public Location getLocation() {=20 > return location; > }=20 --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2006-07-06 16:08:57
|
@Index doesn't create index on Oracle; @Index doesn't override the name of = auto-created index on a joined column ---------------------------------------------------------------------------= ------------------------------------- Key: HHH-1883 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH= -1883 Project: Hibernate3 Type: Bug Versions: 3.2.0 cr1 =20 Environment: hibernate 3.2.0.cr1, Oracle 9i Reporter: CLEMENT S=C3=A9bastien With the following code, I couldn't create a foreign key index in Oracle. I use hibernate 3.2.0.cr1. Thanks=20 @ManyToOne=20 @JoinColumn(name=3D"locationOid", nullable=3Dfalse)=20 @Index(name=3D"FK_location")=20 public Location getLocation() {=20 return location; }=20 --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-06 15:31:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-369?page=comments#action_23553 ] Emmanuel Bernard commented on ANN-369: -------------------------------------- Year, Everything is an issue for Derby. ( Sorry, couldn't resist ;-) ) > @CollectionOfElements on a Map uses reserved word "key" as column name > ---------------------------------------------------------------------- > > Key: ANN-369 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-369 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0cr1, MySQL 5 > Reporter: Martin > Assignee: Emmanuel Bernard > Attachments: dont_use_key_for_maps.diff > > > This annotation > [User.java] > @CollectionOfElements > public Map<String, String> getMisc() > results in this create table statement: > create table User_misc (User_id bigint not null, element varchar(255), key varchar(255), primary key (User_id, key)) type=InnoDB > But "KEY" is a reserved word, so MySQL won't create that table. The default column name should either change or be enclosed by backticks. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ashley C. (JIRA) <no...@at...> - 2006-07-06 15:28:02
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-369?page=comments#action_23552 ] Ashley Collins commented on ANN-369: ------------------------------------ This is also an issue for Derby DB http://forum.hibernate.org/viewtopic.php?t=959861 Thanks. Ashley > @CollectionOfElements on a Map uses reserved word "key" as column name > ---------------------------------------------------------------------- > > Key: ANN-369 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-369 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0cr1, MySQL 5 > Reporter: Martin > Assignee: Emmanuel Bernard > Attachments: dont_use_key_for_maps.diff > > > This annotation > [User.java] > @CollectionOfElements > public Map<String, String> getMisc() > results in this create table statement: > create table User_misc (User_id bigint not null, element varchar(255), key varchar(255), primary key (User_id, key)) type=InnoDB > But "KEY" is a reserved word, so MySQL won't create that table. The default column name should either change or be enclosed by backticks. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Eric C. (JIRA) <no...@at...> - 2006-07-06 13:32:00
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1276?page=comments#action_23551 ] Eric Coupal commented on HHH-1276: ---------------------------------- Is it working with Hibernate 3.0.5? > Add outer join support to Criteria API > -------------------------------------- > > Key: HHH-1276 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1276 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 > Reporter: Jeremy Haile > Attachments: patch.txt > > > Here's a patch that allows users to specify a joinType when calling createCriteria and createAlias on the Criteria interface. This allows you to specify outer joins when creating Criteria. If you have any questions or see anything I missed - let me know. I have tested and am currently using the patch with no problems. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Brice L. (JIRA) <no...@at...> - 2006-07-06 12:49:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-698?page=comments#action_23550 ] Brice Laurencin commented on HBX-698: ------------------------------------- In fact, it is happening when I try to expend Session or Database in the Hibernate Configurations view, on the Hibernate perspective. > HBX/Eclipse hang if database doesn't exist. > ------------------------------------------- > > Key: HBX-698 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-698 > Project: Hibernate Tools > Type: Improvement > Components: consoleconfiguration > Versions: 3.2beta6 > Environment: Hibernate 3.1.3, Eclipse 3.2 Callisto, Derby 10.1.2.1 (Eclipse feature) > Reporter: Brice Laurencin > > > If the database doesn't exist, the system hang hard, and it is hard to recover... hard reboot required. It is a bit boring. > The Eclipse log gives a > !ENTRY org.hibernate.eclipse 2 30000 2006-07-06 11:34:34.760 > !MESSAGE WARN main org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata > !STACK 0 > org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, Traffic, which was not found. > at org.apache.derby.client.net.NetConnectionReply.parseRDBNFNRM(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source) > at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.<init>(Unknown Source) > at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) > at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23) > at java.sql.DriverManager.getConnection(Unknown Source) > at java.sql.DriverManager.getConnection(Unknown Source) > at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) > at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) > at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216) > at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265) > at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) > at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) > at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:133) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:119) > at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:123) > at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) > at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) > at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) > at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) > at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Genandiy D. (JIRA) <no...@at...> - 2006-07-06 12:46:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-700?page=all ] Genandiy Donchyts updated HBX-700: ---------------------------------- Attachment: Test.hbm.xml results of reverse-engineering > Custom type mapping is not possible when reverse-engineering Oracle TIMESTAMP(3) types > -------------------------------------------------------------------------------------- > > Key: HBX-700 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-700 > Project: Hibernate Tools > Type: Bug > Components: reverse-engineer > Environment: 3.2 svn, Oracle 10g, Oracle JDBC Driver version - "10.2.0.1.0" > Reporter: Genandiy Donchyts > Attachments: Test.hbm.xml, hbm2java.cfg.xml, schema.sql > > Original Estimate: 1 hour > Remaining: 1 hour > > When reverse-engineering Oracle database containint column with TIMESTAMP(3) type it is not recognized as a TIMESTAMP and "serializable" type is used instead of timestamp. This happens because of the bug in Oracle JDBC driver since it returns OTHER (1111) instead of TIMESTAMP(93). > When type-mapping is provided in the form: > <type-mapping> > <sql-type jdbc-type="TIMESTAMP(3)" hibernate-type="timestamp" /> > </type-mapping> > ... it is not used because hibernate can't find TIMESTAMP(3) JDBC data type. > JDBCReader.java, processBasicColumns(Table table, ProgressListener progress): > ... > //TODO: column.setSqlType(sqlTypeName); //this does not work 'cos the precision/scale/length are not retured in TYPE_NAME > //column.setSqlType(sqlTypeName); > ... > it would be nice to have this sqlTypeName set to Column and used during comparison with <type-mapping>, then mapping from "TIMESTAMP(3)" to "timestamp" would work. Currently only 1111 ("OTHER") is passed to Column and as result column does not know anything about "TIMESTAMP(3)" > ----- > To reproduce an issue try to create simple Oracle database with one table: > create table test(id TIMESTAMP(3)); > and run reverse-engineering task over it. > ------ > HACK: custom handling of TIMESTAMP(*) types: > Modify JDBCReader.java: > private void processBasicColumns(Table table, ProgressListener progress) { // get the columns > ... > String sqlTypeName = (String) columnRs.get("TYPE_NAME"); > String columnName = (String) columnRs.get("COLUMN_NAME"); > // HACK: custom handling of TIMESTAMP(*) > if(sqlTypeName.startsWith("TIMESTAMP")) { > sqlType = java.sql.Types.TIMESTAMP; > } > ... > See also forum post: http://forum.hibernate.org/viewtopic.php?t=961625&start=0&postdays=0&postorder=asc&highlight= -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |