Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2007
    Posts
    28

    Question Unanswered: Is it possible to export data model in XML ?

    Hello everyone.

    I was wondering if it was possible to export a physical database model (db2) with XML?

    Right now I'm using Rational Software Architect (IBM) but I wasn't able to get the export/import XML feature to work.

    I just wasn't sure if it was even possible or not to export a database schema/data in XML.

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    You can use DB2's pureXML functions to build XML documents and export those. For the schema, you just query the DB2 catalog.

    What were your problems with the XML feature? (Which platform, which version of DB2, what exactly did you try, what was the exact error message?)
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Aug 2007
    Posts
    28
    Thanks for the reply!

    I'm also working at IBM, just a co-op though at RTP, NC.

    I tried the following:

    I went to Rational Software Architect, and once I connected to a database I then opened up a schema and selected one of the tables.

    I then clicked extra data as XML.

    I then clicked:
    com.ibm.db2.jcc.c.SqlException

    NOTE: I changed the naem to Blah.Blah_STORAGE during this paste so nothing confidential is shown. But the real name is valid.


    Code:
    com.ibm.db2.jcc.c.SqlException: "Blah.Blah_STORAGE" is an undefined name.
    	at com.ibm.db2.jcc.c.fg.e(Unknown Source)
    	at com.ibm.db2.jcc.c.fg.a(Unknown Source)
    	at com.ibm.db2.jcc.b.gb.g(Unknown Source)
    	at com.ibm.db2.jcc.b.gb.a(Unknown Source)
    	at com.ibm.db2.jcc.b.w.a(Unknown Source)
    	at com.ibm.db2.jcc.b.vb.g(Unknown Source)
    	at com.ibm.db2.jcc.c.fg.n(Unknown Source)
    	at com.ibm.db2.jcc.c.fg.a(Unknown Source)
    	at com.ibm.db2.jcc.c.fg.a(Unknown Source)
    	at com.ibm.db2.jcc.c.fg.executeQuery(Unknown Source)
    	at org.eclipse.wst.rdb.internal.core.connection.StatementAdapter.executeQuery(Unknown Source)
    	at com.ibm.etools.sqltoxml.SQLDatabaseObject.executeStatement(Unknown Source)
    	at com.ibm.etools.sqltoxml.SQLToXML.executeStatement(Unknown Source)
    	at com.ibm.etools.sqltoxml.SQLToXML.executeQuery(Unknown Source)
    	at com.ibm.etools.sqltoxml.SQLToXML.execute(Unknown Source)
    	at com.ibm.etools.sqltoxml.SQLToXML.execute(Unknown Source)
    	at com.ibm.ccl.xtt.sqlxml.ui.extract.XMLFromSQLPage.generateAllArtifacts(Unknown Source)
    	at com.ibm.ccl.xtt.sqlxml.ui.extract.GenerateXMLOperation.execute(Unknown Source)
    	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Unknown Source)
    	at org.eclipse.core.internal.resources.Workspace.run(Unknown Source)
    	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(Unknown Source)
    	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(Unknown Source)
    	at org.eclipse.jface.operation.ModalContext.run(Unknown Source)
    	at org.eclipse.jface.wizard.WizardDialog.run(Unknown Source)
    	at com.ibm.ccl.xtt.sqlxml.ui.extract.XMLFromSQLPage.generate(Unknown Source)
    	at com.ibm.ccl.xtt.sqlxml.ui.extract.GenerateXMLFromSQLWizard.performFinish(Unknown Source)
    	at org.eclipse.jface.wizard.WizardDialog.finishPressed(Unknown Source)
    	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(Unknown Source)
    	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Unknown Source)
    	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    	at org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
    	at org.eclipse.jface.window.Window.open(Unknown Source)
    	at com.ibm.ccl.xtt.sqlxml.ui.extract.ExtractDataAction.run(Unknown Source)
    	at org.eclipse.ui.internal.PluginAction.runWithEvent(Unknown Source)
    	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Unknown Source)
    	at org.eclipse.jface.action.ActionContributionItem.access$2(Unknown Source)
    	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(Unknown Source)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    	at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
    	at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
    	at org.eclipse.ui.internal.ide.IDEApplication.run(Unknown Source)
    	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown Source)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
    	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(Unknown Source)
    	at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
    	at org.eclipse.core.launcher.Main.run(Unknown Source)
    	at org.eclipse.core.launcher.Main.main(Unknown Source)
    I also tried to export the physical model in RSA of the database and got the following error:

    I clicked my project, clicked export, then seelected Data then Data model export wizard,

    I then get the following error:

    MITI.bridges.mimb.MIRModelBridge (initialization failure)

    Code:
    java.lang.NoClassDefFoundError: MITI.bridges.mimb.MIRModelBridge (initialization failure)
    	at java.lang.J9VMInternals.initialize(Unknown Source)
    	at com.ibm.datatools.metadata.wizards.miti.pages.MitiInitialExportPage.<init>(Unknown Source)
    	at com.ibm.datatools.metadata.wizards.miti.pages.MitiExportWizard.addPages(Unknown Source)
    	at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Unknown Source)
    	at org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(Unknown Source)
    	at org.eclipse.ui.internal.dialogs.ImportExportPage.getNextPage(Unknown Source)
    	at org.eclipse.jface.wizard.WizardDialog.nextPressed(Unknown Source)
    	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(Unknown Source)
    	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Unknown Source)
    	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    	at org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
    	at org.eclipse.jface.window.Window.open(Unknown Source)
    	at org.eclipse.ui.actions.ExportResourcesAction.run(Unknown Source)
    	at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(Unknown Source)
    	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Unknown Source)
    	at org.eclipse.jface.action.ActionContributionItem.access$2(Unknown Source)
    	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(Unknown Source)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    	at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
    	at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
    	at org.eclipse.ui.internal.ide.IDEApplication.run(Unknown Source)
    	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown Source)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
    	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(Unknown Source)
    	at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
    	at org.eclipse.core.launcher.Main.run(Unknown Source)
    	at org.eclipse.core.launcher.Main.main(Unknown Source)
    I googled this error and it seems that I have to set the class path....but I have no idea what the variable is called nor where I would set the class path.

    On an IBM forum someone said:
    I saw someone else said to do the following:
    With RDA v7.0, you need to set the PATH varible for Import/Export to

    "C:\Program Files\IBM\SDP70Shared\plugins\com.ibm.datatools.me tadata.wizards.miti.win32_1.0.0.v200611151024\Meta Integration\bin"
    The database is DB2 v8.2
    Software Architect v 7.0.0.3
    Windows Xp Pro


    What I'm trying to do is figure out a way to translate this database that is object oriented and make it into a DB2 database, and its data then re-read it into Rational Software Architect to create a physical data model, then I could just generate the DDL through its generation function since I can't directly reverse engineer the Object Oriented Database.

    I thought maybe XML could help me make this translation....do you have any better ideas?


    Thanks!
    Last edited by mr_coffee; 08-31-07 at 14:38.

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    If your real "Blah.Blah_STORAGE" is really valid and exists, it may be a good idea to collect a JDBC trace to see what is going on between RAD and DB2.

    p.s: If you want to, you can drop me an email.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •