- This topic has 9 replies, 2 voices, and was last updated 19 years ago by Brian Fernandes.
-
AuthorPosts
-
emylonasMemberI’m following the procedure described on Hibernate Mapping Tutorial, only with my own set of application tables. Everything goes smooth until the actual mapping part. Not that the mapping doesn’t succeed. It does. But there’s this set of mappings file indicating this error:
Severity Description Resource In Folder Location Creation Time Id
2 The content of element type “class” must match “(meta*,subselect?,cache?,synchronize*,comment?,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array|query-list)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,(query|sql-query)*)”. Tblwohours.hbm.xml max/src/com/MDSI/MAXIMUMFactory line 18 October 18, 2005 11:57:26 AM 2428It’s not on every mapping file, only on 17 out of 58, but i have no idea what this means, nor why the mapping didn’t perform correclty for this tables.
Thanks a lot.
Eduardo
emylonasMemberMy computer info:
OSMicrosoft Windows XP Professional Version 2002
Service Pack 2Eclipse 3.1.1
Build id: M20050929-0840Java
j2sdk1.5.0_04
MyEclipse
Version 4.0.2 GA
Build Id 20051010-4.0.2-GAHope this helps
emylonasMemberI believe that another important information is that these 17 files do not map the table PK as id, but as regular properties…
emylonasMemberI corrected the property mappings to id mappings and the Errors are gone, but my problem doesn’t end here.
In neither of theses 17 files the relationships were read. there are no many-to-many mappings, even though there’s at least one for each of these tables.
I figured that happened because none of the PK’s or FK were recognized by MyEclipse.
I wonder why the first 41 tables are OK and the last 17 not so much.
Thanks a lot to all
emylonasMemberWell… It just so happens that i repeated the mapping procedure for these 17 files separately, but kept the target to the same folder so i would keep the good mappings.
And the result is that it worked. All the PK’s and FK’s were recognized, which means my id and many-to-many mappings were created.
I hope this problem i had helps somebody.
Thank you all.
Brian FernandesModeratorEduardo,
Thank you for following up with your experience. What you’re saying that is; when created the mapping for all 58 files at one go, 17 files had their relationship information missing, but if you regenerated those 17 files individuallly, everything worked as expected?
That is quite strange indeed – could you tell us what database you are using? Also, when you expand any of those 17 tables in the DB Browser view, do you see the PK and FK annotations?
How long did the mapping process take approximately, can you check your .log file for any relevant exceptions that were recorded?Best,
Brian.
emylonasMember@Support-Brian wrote:
Eduardo,
Thank you for following up with your experience. What you’re saying that is; when created the mapping for all 58 files at one go, 17 files had their relationship information missing, but if you regenerated those 17 files individuallly, everything worked as expected?
That is quite strange indeed – could you tell us what database you are using? Also, when you expand any of those 17 tables in the DB Browser view, do you see the PK and FK annotations?
How long did the mapping process take approximately, can you check your .log file for any relevant exceptions that were recorded?Best,
Brian.Hello, Brian.
What you described is exactly what happened. I’m running Oracle 9i, but it doesn’t seem to me to be database related. And yes, when i expand the tables on DB Browser i can see the PK’s and FK’s, no problem with that.
The mapping process didn’t take too long. From what i’ve experienced so far it seemed quite normal to me.
As for the log thing, i can send you all the generated Exceptions in a file if you want to, but i can tell you it was generated 17 Exceptions. All of them are exactly the same, the only difference is the table name. You can see one of them below. It seems there are too many open cursors. maybe rst.close() and stmt.close() are not being executed…
Hope this helps. If you want anything, let me know.
!ENTRY com.genuitec.eclipse.hibernate 4 4 2005-10-18 10:32:40.238 !MESSAGE Unable to retrieve column metadata for table TBLWOINFO !STACK 0 java.sql.SQLException: ORA-01000: maximum open cursors exceeded at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289) at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:120) at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:586) at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:385) at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:413) at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:119) at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:92) at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.java:950) at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:802) at oracle.jdbc.OracleDatabaseMetaData.getPrimaryKeys(OracleDatabaseMetaData.java:2926) at net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getPrimaryKeys(SQLDatabaseMetaData.java:897) at com.genuitec.eclipse.sqlexplorer.model.TableNode.getPK(TableNode.java:261) at com.genuitec.eclipse.hibernate.core.HibernateMappedObject.<init>(HibernateMappedObject.java:138) at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard$1.execute(NewHibernateMappingWizard.java:131) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:98) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:110) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:830) at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.performFinish(NewHibernateMappingWizard.java:209) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:349) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.run(NewHibernateMappingAction.java:40) at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.run(NewHibernateMappingAction.java:47) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) 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:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)
Brian FernandesModeratorEduardo,
As you concluded, this issue was clearly caused by the cursor limit being exceeded – which ideally should not have happened at all.
I have filed an internal bug report against this and we’ll review the generation code to plug the leak.
Thank you for following up,
Best,
Brian.
emylonasMemberVery nice, Brian.
I’m glad to help. And once again, MyEclipse Forum proves to be very very good.
Congratulations and keep up the good work.
Eduardo
Brian FernandesModeratorEduardo,
Thank you for the compliments 🙂
Supportive, positive users like you play an important role in taking MyEclipse forward (and it keeps the devs going too 😉 )
Thanks once again, we appreciate it.
Brian. -
AuthorPosts